Up to 2x faster Transaction Time To Finality coming to Flow with Crescendo

Flow is on the verge of a significant update with the upcoming Crescendo network upgrade. This major update will make Flow fully EVM equivalent, roll out Cadence 1.0, and include several scaling, security, and performance enhancements. Among these, a crucial performance boost is the acceleration of the transaction’s Time To Finality (TTF). TTF is projected to improve by 30 to 50% on the mainnet post-launch, marking a significant stride in Flow’s network performance.

This post aims to provide a concise overview of the TTF improvements, outlining its benefits and the roadmap of this feature in alignment with the Crescendo launch. By doing so, we hope to keep you informed and excited about the upcoming changes.

What is Time to Finality (TTF)?

Time to finality is the duration the blockchain requires to guarantee the inclusion of a transaction. In other words, when the flow protocol finalizes a transaction, the transaction is guaranteed to be executed.

Finalization is the first step in the transaction lifecycle, followed by transaction execution and then sealing of the execution result that includes the transaction.

Why does TTF matter?

To put it simply, TTF is the amount of time the client who submitted a transaction has to wait before being certain that the transaction was included on the chain. TTF thus plays a crucial role in determining how responsive an application built on the blockchain can be - the shorter the TTF, the smaller the wait for the end user and hence the more responsive the app is perceived as.

TTF on Flow

Flow has been designed to scale without sharding while maintaining composability and decentralization (read more about it here). It does this by separation of consensus & compute. Block consensus is done exclusively by the consensus nodes running the Jolteon-variant of HotStuff, while transaction execution is done exclusively by the execution nodes.

For TTF on Flow, the clock starts when a transaction is submitted to the access node and includes the following:

  1. Inclusion of the transaction in a transaction batch (in flow terminology ‘collection’) by the Collection nodes.
  2. The Consensus nodes (all together forming the Consensus committee) then assemble blocks from the collection.

Given the intentionally large number of collection nodes and consensus nodes in the network to keep the network decentralized, several factors influence the TTF that a transaction may experience, such as network conditions, availability of collection nodes and consensus nodes, processing time within the node software etc. Currently, the TTF on Flow is around 6 seconds.

TTF improvements

Over the past year, the Flow Foundation and the Flow community at large have made several improvements to the node software with the aim of improving all network metrics. Some of these improvements include:

  1. Networking layer improvements
  2. Update to Jolteon consensus algorithm
  3. Update to the consensus follower

A recent major improvement was to streamline Flow’s cryptography stack and switch the low-level library, which our stack is built on top, from ‘relic’ to BLST (see change).

Early benchmarks show that these changes have significantly improved block time, i.e. the time it takes for the consensus nodes to decide on the next block. However, the improved block time has not yet translated to an improvement in TTF, and that is mainly because it is gated by the cruise control system, which ensures that the epoch switchover always happens on the same day of the week (Wednesday). This is necessary to ensure that all business processes, such as staking, delegation, and liquid staking, offered by exchanges, DeFi applications and node operators occur on a defined and reliable pattern. In other words, Flow is sitting on a treasure trove of unrealized improvements to TTF.

To realize the TTF improvements while also maintaining the epoch switch-over consistency, certain protocol parameters need to be adjusted- including the number of views per epoch. While the parameter adjustment is fairly straightforward and involves the governance committee for Flow coming together and submitting a transaction, care must be taken to ensure that the values are accurate and that they do not introduce any side effects (akin to tuning a watch).

Following is a roadmap which lists out all the major milestones to eventually realize the TTF gains.

Roadmap

Milestone Release Status
BLST Crypto library update Height Coordinated Upgrade in Feb 2024. Done :white_check_mark:
Data analysis to measure consensus block rate improvements March 2024 Done :white_check_mark:
Core Protocol Working Group to bring the community up to speed 28th March 2024 Done :white_check_mark:
Core Protocol Working Group subcommittee to research on-chain parameter adjustments April 2024 Done :white_check_mark:
Blog post which does a deep dive April 2024 :fast_forward:
Service committee multi-sign meeting to submit a transaction to adjust the on-chain parameters. Crescendo launch :checkered_flag:

Technical details

We invite you all to the Flow Core Working Group meeting on March 28th (see calendar), where we will discuss this change in more technical detail.

If you are interested in looking at the tentative results, you can find them here.

9 Likes

Marked the Core Protocol Working Group to bring the community up to speed as Done :white_check_mark:

2 Likes

Core Protocol Working Group subcommittee to research on-chain parameter adjustments :white_check_mark: Done

1 Like

In the upcoming Core Protocol Working Group Meeting on April 25th ( :point_right: agenda), we’ll briefly summarize the result from the expert sub-working group (March 28). If you are interested, come and join us (see see calendar for all Working Group meetings) - we’d love to have you