On average, Flow sees 500,000-1 million transactions per day, with sufficient room to support 10 times transaction throughput growth – even with sequential transaction execution. While scaling transactions per second (TPS) for the core protocol will always be a high priority, it is essential that the protocol is also able to scale for state growth as more data is being stored on-chain.
With the below upgrades, the barriers to running a node and data accessibility are significantly reduced. Users will benefit from secure, permissionless access to the network without sacrificing noticeable hardware requirements on their computer. They will not have to rely on third parties for data or network access when they use apps.
Initiatives
Flow’s execution state resides fully in memory, which works great for supporting high transaction throughput. However, it doesn’t scale well once pushed beyond hundreds of gigabytes of on-chain data; for reference, an execution node needs a minimum of ~800GB of RAM.
Trie size can be reduced by 15 percent by optimizing the execution state data structure (Atree register inlining). Execution node memory requirements can also be lowered by ~50 percent by moving the execution state from memory to disk. This will significantly reduce the cost of operating execution nodes and make scaling the single execution state to hundreds of TBs with minimum impact on transaction throughput possible.
For Flow to achieve its scaling potential, concurrent execution is key. Deterministic concurrent execution – of non-conflicting transactions – serves as the foundation for scaling transaction throughput. It involves executing transactions in a single block on multiple cores.
Realistically, not all transactions within a block can be executed simultaneously. Yet, as the on-chain transaction load increases, concurrent execution will become increasingly necessary to maintain transaction execution speeds while interacting with a single state.
Rate-limited Access API is challenging for many developers building on Flow. The rate limit exists because the Access API still relies on execution nodes for script execution and events. Multiple initiatives have been introduced to remove this bottleneck.
All execution data should be available through the execution data sync protocol by adding the last missing piece – transaction results.
Launching execution data sync for observer nodes enables anyone to trustlessly download execution data from staked or unstated peers and run the event streaming API.
Finally, integrating execution state indexing and local script execution on access and observer nodes will allow developers to run their own nodes and execute scripts at any block with no rate limiting.
Current progress
Atree register inlining is estimated to be completed by the end of August 2023. State migration will still need to be accomplished before deploying this optimized execution state, which will take place during a future Flow network upgrade.
A proof of concept trial for storing the execution state on disk concluded with encouraging results, with less than a 60 percent reduction of data access speeds from storing the execution state in Pebble DB on SSD. The design is being workshopped to complete the second milestone in Q3 2023, laying the foundation for reduced execution node memory usage by approximately 50 percent.
Foundational work for concurrent execution concluded with refactoring the execution runtime (FVM) to ensure Flow can run multiple execution threads with no side effects. The UUID generation that caused transaction conflicts was also refactored, and work on refactoring further causes of transaction conflicts and concurrent execution blockers – including fee deduction, side effects caused by programs cache, and Cadence type checker integration – has begun.
Later this year, the work to enable trustless access to the complete set of the execution data available on the public network, with access and observer nodes enabled to execute scripts locally should be wrapped up.
Roadmap goals
Keep reading
Quickstarts
Stay up to date with the latest news on Flow.
Stay up to date with the latest news on Flow.