What's new in the Flow Mainnet 20 Spork?

What’s new in the Flow Mainnet 20 Spork?

This Flow mainnet spork (Nov, 2nd 2022) has several important updates to improve the network resiliency, scalability and support for decentralization.

BFT protection for Permissonless Access Node

Earlier in August, we announced the path to permissionless node operation and also released the observer node v1 as part of the last spork. Continuing on that journey of decentralization, this spork includes several major updates to the peer-to-peer networking layer to improve a node’s resilience to any byzantine nodes on the network have been made. These updates are prerequisites for the launch of the permissionless access nodes.

Notable updates include:

  • Improve authorization of messages sent over the staked peer-to-peer network
  • Adding a rate limiter to the unicast connections
  • Enabling the peer scoring mechanism on the gossip network to eliminate invalid subscriptions
  • Improved monitoring

Execution Storage Improvements

Flow protocol architecture is designed to benefit from having a few powerful execution nodes for fast execution without sacrificing the integrity and safety of the network. Consequently, execution node data storage has been designed such that access to the execution state data is as fast as possible by keeping the data in memory while also utilizing a disk-backed write-ahead-logs (WAL) system for reliability and recoverability. To expedite the recovery process, at specific intervals a separate process generates checkpoints so that only a small number of WALs have to be replayed from the last checkpoint.

There has been an ongoing effort spanning several sporks to improve both - the performance of the execution data storage and the checkpoint process. Below is a list of some of the most recent improvements.

Storage Optimization

To keep up with the growth in the number of accounts and number of cadence stored objects on the network, we continue to improve the efficiency of the execution storage based on the different access patterns reducing the overall memory requirements of an execution node. In this spork, we reduced the storage usage footprint by changing the way an account’s metadata is stored. This resulted in a 9% reduction in memory usage of the execution node and also reduced the rate at which an execution node’s memory usage grows as more accounts are created.

Checkpointer Redesign

The original design and implementation of the checkpoint process couldn’t scale as the network grew and started causing spikes in memory usage of up to 180% when generating a checkpoint. There were reports from execution node operators of their execution node going out of memory and restarting during times of high load on the system. The recovery from a checkpoint during a restart also took a long time. In this and the previous sporks, we have redesigned the checkpointing process to address both - memory usage and recovery. The memory usage during checkpointing now goes up by only 2-5% and the checkpointing process itself is almost five times faster. Execution node startup time from any given checkpoint has been reduced to up to 80% (4 minutes to 1 minute on Testnet). The faster read and write of the checkpoint files also help reduce the total downtime needed during the spork operation.

Notable updates include:

Rolling upgrade support

Reducing planned downtime and ultimately achieving zero-downtime network upgrades is high on the priority list for Flow and in this spork, the first step towards achieving that goal is being taken by adding support for height-coordinated execution and verification node restarts. This feature enables the nodes to restart at the exact same predetermined block height, removing the risks of execution forks and making the network upgrade easier to coordinate across all operators.

Notable updates include:

FVM Performance improvements

Performance improvements in this release deliver speed as well as memory usage improvements for the FVM (Flow virtual machine).

Notable updates include:

  • Optimized FVM so that it reuses the Cadence runtime environment where possible


This release includes Cadence v0.28.0. More on this here.

Other improvements

Other than these, there are several other updates and bug fixes listed here in the release notes.