Releases: onflow/flow-go
v0.41.3
What's Changed
- [Access] Remove v0.41 compatibility override by @peterargue in #7424
Full Changelog: v0.41.2...v0.41.3
v0.41.2
What's Changed
- [Access] Fix version compatibility list - v0.41 by @peterargue in #7421
Full Changelog: v0.41.1...v0.41.2
15th May 2025 - Height Co-orindated Upgrade on Mainnet26 at Block Height 113162222
What's Changed
EVM Pectra Update
- set Pectra upgrade timestamp to Jun 3rd 2025 by @j1010001 in #7371
- Update to and enable EVM Pectra hard-fork by @m-Peter in #7328
- updating Pectra upgrade timestamps by @j1010001 in #7384
Data Availability
- update websockets cli flag by @peterargue in #7253
- Only log version control overrides once by @peterargue in #7266
- change list_subscription to list_subscriptions by @illia-malachyn in #7317
- Refactor storage collections for access node by @zhangchiqing in #7093
- Add support for multi-store reading of collections & transactions in Access Nodes by @fxamacker in #7321
- Add support for multi-store reading of events, lightTransactionResults, etc. (BadgerDB & Pebble) by @fxamacker in #7335
- Backport websockets API fixes to v0.41 by @peterargue in #7387
Storage
- Close BadgerDB before db init functions return error by @fxamacker in #7229
- Remove old code in
initBadgerDB()
by @fxamacker in #7230 - Optimize storing execution receipts in BadgerDB by @fxamacker in #7238
- Optimize speed & memory for generating db keys (BadgerDB and Pebble) by @fxamacker in #7243
- Discard BadgerDB transaction when iterator is closed by @fxamacker in #7254
- Add
Closer
to Batch interface and use it to prevent memory leak (BadgerDB & Pebble) by @fxamacker in #7257 - Add db Seeker for up to ~50x speedup & ~18x less memory seeking key in range (BadgerDB, Pebble) by @fxamacker in #7255
- Fix batch remove in ServiceEvents to use the correct batch (BadgerDB, Pebble) by @fxamacker in #7323
- Add database multiReader, multiIterator, multiSeeker (BadgerDB, Pebble) by @fxamacker in #7320
- Remove unneeded lock in storage Callbacks and document it isn't safe for concurrent use by @fxamacker in #7352
- Update DB.Reader() API to not return error by @fxamacker in #7354
- Fix deadlock in batch writes by @zhangchiqing in #7341
- Support NodeDisallowList for db migration by @fxamacker in #7361
- Refactor to rename blocklist to disallowlist for consistency by @fxamacker in #7363
Crypto
Cadence
- Update to Cadence v1.3.4 and atree v0.10.0 by @turbolent in #7261
- Update to Cadence v1.4.0 by @turbolent in #7353
CI/CD
- Modify CI to support custom linter plugin by @jordanschalm in #7322
- Create pipeline to handle image promotion from private registry to public by @sjonpaulbrown in #6826
- Update build workflow to support GitHub App by @sjonpaulbrown in #7350
- Remove workflows in favor of centralized build workflow by @sjonpaulbrown in #7362
Misc
- Disable block profiler by @zhangchiqing in #7215
- Add Execution, Cadence, and Metering parameters to the Protocol State by @jordanschalm in #7020
- Add string function to StateCommitment type, use in place of marshalJSON by @Kay-Zee in #7194
- Update build tools to support injection of cadence deploy key by @sjonpaulbrown in #6932
- Logging level adjustments by @jordanschalm in #7174
- Create in-memory transaction storage by @illia-malachyn in #7197
- In-memory storage for light tx results and tx results error messages by @illia-malachyn in #7205
- Add in-memory storage for events by @illia-malachyn in #7207
- Simple leader selection utility by @jordanschalm in #7160
- Add in-memory collection storage by @illia-malachyn in #7220
- Adds bridge to fvm bootstrapping by @joshuahannan in #7053
- PoC: Linter for constrained mutation of types by @jordanschalm in #7310
- Enable custom
structwrite
linter in CI by @jordanschalm in #7326 - Fix bug in bootstrapping duplicate node ID test by @jordanschalm in #7333
- Add in-memory registers storage by @illia-malachyn in #7233
- Improve remote debugger by @turbolent in #7001
- Remove database dependency from consensus builder by @zhangchiqing in #7347
- Remove account storage format v2 migration by @turbolent in #7344
- Update BN2 Makefile to shift repo cloning & fix pvc deletion by @sjonpaulbrown in #7349
- Improve size check in HexStringToIdentifier by @j1010001 in #7346
- Localnet hooks for TPS loader by @janezpodhostnik in #7165
- Add additional test to check for state commitment changes by @janezpodhostnik in #7377
- Reduce state extraction w/o migration by ~29 minutes (~2.5x speedup) by @fxamacker in #7373
- adding compatibility for v0.41 by @j1010001 in #7385
Full Changelog: v0.40.0...v0.41.0
v0.40.2
What's Changed
- [Access] Allow small gap between streaming start and indexed height - v0.40 by @peterargue in #7360
- [Access] Update websockets events and account status reponses to use json-cdc by @peterargue in #7359
Full Changelog: v0.40.1...v0.40.2
v0.40.1
What's Changed
- [v0.40] Logging level adjustments by @jordanschalm in #7267
- [Access] change list_subscription to list_subscriptions - v0.40 by @peterargue in #7318
Full Changelog: v0.40.0...v0.40.1
10th April 2025 - Third Height Co-orindated Upgrade on Mainnet26 at Block Height 109384800
What's Changed
Cadence
- Update to Cadence v1.3.4 and atree v0.10.0 by @turbolent in #7260
Data Availability - Websocket streaming
- Implement integration test for new websockets by @UlyanaAndrukhiv in #6907
- check for correct err in ReadJSON method by @illia-malachyn in #7065
- OK response should not contain error message by @illia-malachyn in #7037
- Properly handle subscription errors in data providers by @illia-malachyn in #7046
- Pass irrecoverable context to ws handler by @illia-malachyn in #7154
- Changed max subscription error code to 429 by @Guitarheroua in #7158
- Refactor validator into own module by @peterargue in #7102
- Refactor Access API RPC handler into rpc engine by @peterargue in #7103
- Refactor common Access API structs into models by @peterargue in #7104
- Refactor access subscriptions by @peterargue in #7105
- Fix and refactor validation logic in data providers by @illia-malachyn in #7140
- update websockets cli flag by @peterargue in #7252
EVM
Execution
- Migrate last executed block from badger to pebble by @zhangchiqing in #7117
Storage
- Update pebble dir path by @zhangchiqing in #7141
- Release Pebble batch resource to reduce memory use by @fxamacker in #7153
Util
- Update util to read results from pebble by @zhangchiqing in #7092
- Read storage stats by @zhangchiqing in #7131
Misc
- Remove anti-pattern of ignoring irrecoverable error channel by @peterargue in #7155
- v0.40 disable block profiler by @zhangchiqing in #7223
- Jan/hcu prep v0.40 compatibility by @j1010001 in #7249
Full Changelog: v0.39.5...v0.40.0
v0.38.4
What's Changed
- [v0.38] Backport: Use
SafetyData
to avoid double-proposing instead ofmyLastProposedView
by @jordanschalm in #7079
Full Changelog: v0.38.3...v0.38.4
Protocol Upgrade - EFM Recovery at Block View 20504725, Block Height 108630638
What's Changed
⬆️ Coordinated Upgrades for all Node Roles
This is a mechanism built into the Protocol State which enables view-coordinated upgrades to the Protocol State data model. This mechanism can be leveraged to implement coordinated behavioural changes ("protocol upgrades") for all node roles, including for backward-incompatible upgrades. Previously such upgrades were supported only for Execution Nodes and the Execution stack via the Height Coordinated Upgrade mechanism and VersionBeacon smart contract.
This release completes the upgrade feature and implements the first such coordinated upgrade, which will be used to enable EFM Recovery (see below). Further details are in the working group meeting notes.
Related PRs
- KVStore Model Upgrade &
Chunk.ServiceEventCount
Model Upgrade Logic by @jordanschalm in #6796 - Chunk Data Model supports per-chunk service event mapping by @jordanschalm in #6744
- DKG Result Submission Backward Compatibility by @jordanschalm in #6827
- [BFT] Database migration for
flow.DKGEndState
by @durkmurder in #6861 - CBOR Encoding is compatible with stricter network decode mode by @jordanschalm in #6879
🌟 Epoch Fallback Mode Recovery
Epoch Fallback Mode (EFM) is a operational mode triggered when an epoch transition fails for any reason. While in EFM, the current epoch is extended in perpetuity and epoch transitions are disabled. This has the effect of disabling changes to the node operator committee. Also, automatic reward payout is disabled and reverts to a manual governance transaction.
EFM Recovery provides a mechanism to recover from epoch failures using a governance transaction. Previously, recovery from EFM required a network upgrade (spork). With EFM Recovery, a governance transaction is used to resume epoch transitions. Further details are in the design document.
EFM Recovery is available in this release, but must be enabled via a coordinated upgrade (see above).
Related PRs
- Feature: EFM Recovery by @jordanschalm in #6885
- [EFM] Added a service event to update
EpochExtensionViewCount
by @durkmurder in #6272 - [EFM] Telemetry consumers for KV store state machines by @durkmurder in #6291
- [EFM] Add
EjectIdentity
service event by @durkmurder in #6296 - [EFM] minor polishing by @AlexHentschel in #6309
- Updated documentation of
FinalizationSafetyThreshold
by @AlexHentschel in #6384 - [EFM] Renamed EpochCommitSafetyThreshold -> FinalizationSafetyThreshold by @durkmurder in #6318
- [EFM] Documentation of mapping from NodeID -> DKG index by @AlexHentschel in #6428
- [EFM] Extended documentation where generalized protocol logic meets bootstrapping implementation by @AlexHentschel in #6452
- [EFM] Update
protocol.DKG
to useIndexMap
by @durkmurder in #6338 - [EFM] Update DKG engine to submit a valid DKG index map by @durkmurder in #6490
- [EFM] Updated type conversion of
EpochCommit
by @durkmurder in #6494 - [EFM] Enable previously disabled tests by @durkmurder in #6496
- [EFM] Updated type conversion of
EpochRecover
by @durkmurder in #6506 - EFM Recovery: Fixes from Benchnet Testing by @jordanschalm in #6620
- EFM Integration Test Part 2 by @kc1116 in #6424
- [EFM] Refactored encoding and decoding of DKG data during bootstrapping by @durkmurder in #6745
- updating the term
DKG key
as it is outdated by @AlexHentschel in #6735 - Random beacon comments by @tarakby in #6590
- [EFM] Recoverable Random Beacon State Machine by @durkmurder in #6771
- Re-enable test
TestProtocolVersionUpgrade
by @jordanschalm in #6752 - [EFM]
EpochCommit
is backward compatible by @durkmurder in #6795 - [BFT] Node ejected before epoch recovery by @durkmurder in #6632
- [BFT] Epoch Recovery integration test by @durkmurder in #6823
- [EFM] Recoverable Random Beacon State Machine follow up updates by @durkmurder in #6815
- [EFM] Fix bugs from Benchnet testing by @jordanschalm in #6898
- Use
SafetyData
to avoid double-proposing instead ofmyLastProposedView
by @jordanschalm in #6921 - [EFM] Extra flags for the recovery command line tool by @durkmurder in #6935
- [EFM] Extra consistency checks for DKG Index Map by @durkmurder in #6936
- Add metric for current kvstore version by @jordanschalm in #6953
- [EFM] Unit tests for excluding/including recovery epoch participants by @durkmurder in #6968
🪨 Storage Layer
- [Storage Refactor] Init pebble DB in scaffold. by @zhangchiqing in #6949
⛰️ Access API
- [Access] Disable registers db pruning by default by @peterargue in #7017
- Validation of error message on transaction replay is broken by @m-Peter in #7026
- Generate random string with maxLen symbols instead of UUID by @illia-malachyn in #7007
- [Access] Update model Block REST API Response by @UlyanaAndrukhiv in #6884
- Add feature flag for new websockets stream API by @illia-malachyn in #7024
- Return error if --state-stream-addr no configured. by @illia-malachyn in #7010
- Updates core contracts and transactions to use correct import placeholders by @joshuahannan in #7027
- [Access] Tuning API logging by @peterargue in #7048
- Update EVM
ViewProvider
to return blockView
at its end state by @m-Peter in #7050
❓ Miscellaneous
- Rename MonotonousCounter to MonotonicCounter by @peterargue in #6998
- Refactor Consensus Sealing Engine+Core:
engine.Unit
->ComponentManager
by @tim-barry in #6934 - Use ExecutionParameters contract in bootstrapping by @joshuahannan in #6986
Breaking Changes
ServiceEventCount
field added toChunk
. After the Protocol State Upgrade to version 2, this field will be activated. When active, this field's presence changes the canonical encoding and hashing forChunk
and all entities which use it (for example:ExecutionResult
andBlock
). Clients which are not using a compatible version offlow-go
will compute incorrect IDs for these entities.
Full Changelog: v0.38.3...v0.39.0
18th Feb 2025 Second Height Co-orindated Upgrade on Mainnet26 at block height 103983000
What's Changed
- [v0.38] Update to Cadence v1.3.3 by @turbolent in #7060
- add access compatibility with cadence fixes by @j1010001 in #7063
Full Changelog: v0.38.2...v0.38.3
18th Feb 2025 Height Co-ordinated Upgrade on Mainnet26 at block height 103957477
The Flow network has been upgraded!
This release brings a major enhancement to on-chain state storage with Account Storage Format v2, improving both the scalability and resiliency of the network.
✅ What is Included in This Upgrade?
- Optimized Account Storage Format v2 for improved efficiency and scalability
- Zero-Downtime State Migration - an innovative new method to seamlessly roll out the new account storage format on the live network without requiring any downtime.
🔹 What’s New in Account Storage Format v2?
The Account Storage Format v2 enhances how the on-chain state is stored and processed, resulting in significantly reduced memory usage on the Execution nodes.
The Execution State is a Merkle tree, which holds the user data (account token balances, NFTs, smart contracts deployed etc.) as payloads in its leaves. This update optimizes the storage format for the payloads resulting in fewer, more compactly serialized payloads. Fewer payloads in turn reduce the size of the MTrie, making Flow more efficient in handling state.
With this update,
- The number of payloads will be reduced by 25-30%, reducing the on-disk storage footprint of the execution data. This will improve RAM, Disk and CPU efficiency, not only for execution nodes but also for all databases, indexers, and caches that store and serve execution data such as the access node.
- The number of vertices in the MTrie will also be reduced by 25-30% reducing the in-memory storage footprint of the data for execution nodes, which hold the execution state in memory. With this size reduction, execution nodes will see more than an 11% reduction in memory usage (RAM) improving their stability and capacity to accommodate memory spikes during peak usage.
This improvement will also help slow down future memory growth rate as new accounts are created, further ensuring that Flow scales efficiently.
Read more about this change here 👉 GitHub Issue #3584
🔹How Will Account Storage v2 Be Rolled Out? Zero-Downtime Migration!
To deploy the new Account Storage Format without any network downtime, an innovative approach called Zero-Downtime Migration has been introduced.
Zero-Downtime Migration uses system transactions to migrate small batches of accounts, running in the background without affecting network operations. The ambient process takes several days to complete.
With this approach, the new Account Storage Format will be deployed gradually and seamlessly without requiring any action from developers or users, ensuring zero disruption to the network.
🔜 Upcoming improvements
This upgrade also lays the foundation for several upcoming improvements that will be rolled out as part of the next set of updates. These include:
- Websocket Streaming API endpoints aimed at improving the user experience of dApps.
- The ability to deploy protocol upgrades including downwards-incompatible changes for all node types to the live Mainnet - without requiring any network downtime!
- Easy recovery from epoch transition failures, again requiring no downtime.
This upgrade marks another significant step in Flow’s journey toward scaling to petabytes of on-chain data. 🚀
❗Breaking change
There is a breaking change to streaming Access API in this upgrade.
Several AccessAPI and ExecutionDataAPI streaming endpoints include a message_index
field in the response which indicates the order of messages sent by the server so the client can detect if they missed processing any. Previously, some endpoints used 1 as the first index in a stream while others used 0. After the HCU, all endpoints will be consistent regarding message_index and start from index 0.
APIs that will affected (Protobuf definition) -
- SubscribeEvents - field message_index
- SendAndSubscribeTransactionStatuses - field message_index
- SubscribeAccountStatuses - field message_index
These streaming APIs are fairly recent, therefore most apps will not be impacted.
⚠️ Deprecation
- The
protocol_version
field of the NodeVersionInfo endpoint of the Access API is deprecated and will be removed in a future release.
Commit list
Account Storage Format v2 Migration
- Cadence Account Storage Map Migration by @turbolent in #6761
- Enable storage format v2 for all but mainnet by @janezpodhostnik in #6864
- Enable storage format v2 on mainnet by @janezpodhostnik in #6988
NOTE: Account Storage Format v2 is implemented in PRs in repo onflow/cadence.
Zero downtime (Recovering from failed epoch switchover)
- Add test cases documenting CBOR's behaviour with omitted and extra fields by @jordanschalm in #6880
Data Availability
- Reduce logging from version control by @peterargue in #6342
- Reduce logging on some access endpoints by @peterargue in #6340
- Update event parsing validator to support ResourceDestroyed events by @peterargue in #6356
- Updated go-ds-pebble version by @UlyanaAndrukhiv in #6411
- Add compatible range to Node Version Info endpoint by @UlyanaAndrukhiv in #6294
- Added metrics for transaction validator by @Guitarheroua in #6239
- Stop Control feature for AN by @Guitarheroua in #6202
- Implemented options to fail or warn when payer is not able to pay by @Guitarheroua in #6297
- Use Indexed height when checking payer balance by @AndriiDiachuk in #6292
- Enforce prune threshold by @Guitarheroua in #6345
- Improve error messages when querying old blocks by @UlyanaAndrukhiv in #6554
- Store Transaction Result error messages in db by @UlyanaAndrukhiv in #6468
- Refactor executionNodesForBlockID by encapsulating its parameters into a struct by @UlyanaAndrukhiv in #6499
- Improve bounds checking in rest converters by @AndriiDiachuk in #6567
- Make REST message size limit configurable by @AndriiDiachuk in #6596
- Change SendAndSubscribe endpoint's MessageIndex to start at 0 by @AndriiDiachuk in #6598
- Add util command to backfill tx error messages db by @UlyanaAndrukhiv in #6525
- Refactor REST Routes Package by @UlyanaAndrukhiv in #6616
- Add support for ignoring version beacon events for compatible versions by @peterargue in #6535
- Add new websocket handler and skeleton for its deps by @illia-malachyn in #6630
- Add implementation BlockProvider by @UlyanaAndrukhiv in #6636
- Implement keepalive routine with ping-ponging to ws connection in ws controller by @UlyanaAndrukhiv in #6757
- Add unit test for websocket controller by @illia-malachyn in #6762
- Fix mocking in connection unittests by @peterargue in #6822
- Add implementation for events data providers and account statuses data providers by @AndriiDiachuk in #6766
- ws controller error handling by @illia-malachyn in #6798
- Implement inactivity tracker by @UlyanaAndrukhiv in #6817
- Add implementation for transaction statuses data providers by @AndriiDiachuk in #6818
- Response limit tracker by @Guitarheroua in #6814
- Make WebSocket responses from data providers consistent with Access REST API responses by @UlyanaAndrukhiv in #6802
- Fix access connection tests for latest version of testing library by @peterargue in #6917
- Unify subscription id with client message id by @illia-malachyn in #6847
- Heartbeat interval not reset correctly in streaming endpoints. by @AndriiDiachuk in #6848
- Make response for data providers consistent. by @AndriiDiachuk in #6846
- Add deprecate message to legacy ws handler and controller by @illia-malachyn in #6918
- Add arguments getter for data providers by @UlyanaAndrukhiv in htt...