Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ACP194, which proposes running block ordering (consensus) and execution independently and concurrently to maintain safe processing under congestion while stabilizing fees and waiting times.
This article translates, summarizes, and expands on the following proposal.
Overview
ACP194 proposes a mechanism that decouples block ordering (consensus) from transaction execution so the two can run concurrently. This improves the efficiency of processes that previously waited for one another, increases the amount of gas processed per second, and reduces latency variability.
Specifically, consensus first determines only the block's order and adds it to a queue. An executor then processes transactions asynchronously, and subsequent blocks incorporate the results to formally settle them. Worst-case gas cost validation and new charging rules help maintain safety while preventing denial-of-service (DoS) attacks.
The mechanism improves throughput, increases resilience to temporary pauses, and lays the groundwork for future features such as encrypted mempools and VRFs.
Streaming Asynchronous Execution (SAE) uses a queue to decouple consensus, which determines transaction order, from execution, which updates state in that order. Consensus determines only the ordering of items in the queue. A concurrent execution stream processes the queue in order and produces a delayed state root, a hash summarizing the state. This state root is recorded in a later consensus round. Validation when enqueuing a transaction is lightweight. The design assumes a guarantee that transactions accepted into the queue will be executed in the agreed order and reflected in a state root recorded in a subsequent round.
flowchart LR IN[Transactions] --> C[Consensus (order only)] C --> Q[Queue (ordered)] Q --> E[Execution Stream (sequential execution)] E --> SR[Delayed stateRoot] SR --> L[Later Consensus (record)]
Motivation
Performance improvements
Reduce context switching by running consensus and execution concurrently
SAE runs consensus and execution concurrently in separate streams. This reduces switching and mutual waiting between the two processes. As a result, the time the VM spends executing instructions (VM time) approaches elapsed real time (wall time). Consequently, actual gas processed per wall-clock second increases without raising the configured gas per VM-second, improving throughput.
Accelerate receipt and state computation with execution-only clients
A lightweight execution-only client without consensus functionality can process the queue in the order established by consensus. This client need not compute a state root or update the Merkle tree on every execution. Deferring expensive updates enables it to display transaction receipts and calculate intermediate states quickly. Users see execution results sooner, while the results remain consistent with the network's eventual state root recorded in a later round.
Smooth stop-the-world events
Events such as database compaction can temporarily pause node processing. Because consensus and execution run independently in SAE, consensus can continue ordering transactions while execution is paused.
When execution resumes, it processes the transactions added to the queue during the pause in order. Rather than concentrating the impact of the pause in a single block, the system spreads processing across multiple blocks. This helps avoid sudden spikes in processing delay and reduces the variability in response times experienced by users.
Increase short-term throughput through eager acceptance
Consensus determines transaction order first, and execution processes transactions in that order. This makes it easier for consensus to continuously accept transactions into the queue and reduces bottlenecks during admission. Because consensus fixes the order and execution deterministically produces the same results, the security model and consistency remain unchanged. Execution results are summarized in a state root and recorded in a subsequent consensus round.
Enable third-party accounting for non-data-dependent transactions before execution
The results of non-data-dependent transactions that are unlikely to be affected by other transactions in the same batch, such as simple EOA-to-EOA value transfers, are relatively predictable before execution. A custodian can identify transactions addressed to its own EOAs in the queue and immediately update users' displayed balances. Execution subsequently proceeds in the agreed order, and recording the state root brings the displayed balances into agreement with the network's records.
Future features
Use VRFs during execution
With SAE, consensus first fixes only the order of transactions, which are then processed during execution. This makes it possible to safely access a VRF (Verifiable Random Function) during execution. Operations such as lotteries and allocations that require randomness anyone can verify afterward can be handled correctly in the execution phase.
Mitigate front-running with encrypted mempools
Even if the contents of the mempool (the holding area for unexecuted transactions) are encrypted, SAE allows consensus to fix ordering before the contents are decrypted and executed. This makes it harder to front-run transactions by reading their contents and reordering them before the order is determined. This describes a prerequisite for the mechanism; an encrypted mempool itself is the subject of a separate proposal.
User stories
Advanced DeFi trader
A trader runs an optimized execution-only client locally, without consensus functionality, and quickly executes the queue ordered by consensus. This enables the trader to obtain results based on the same ordering earlier than the network records them, supporting faster high-frequency trading (HFT) decisions and risk management. The final record is reflected in the network as a state root in a subsequent round.
Custodian
A custodian monitors the queue and extracts transactions addressed to its own EOAs. It can immediately update the displayed balances of its users based on its own display policy. Execution then proceeds, and the state root recorded in subsequent consensus brings network records and the displayed balances into agreement.
sequenceDiagram participant User as User participant Cons as Consensus (ordering) participant Q as Queue (ordered) participant Exec as Execution (in order) participant Chain as Record (state root) User->>Cons: Submit transaction Cons->>Q: Fix order and enqueue Exec->>Q: Execute from head of queue Exec-->>Chain: Submit delayed state root Chain-->>Cons: Record in later round
This flow clearly separates immediate ordering from the slightly delayed execution and recording of the state root. It provides a foundation well suited to using VRFs during execution and introducing encrypted mempools.
Explanation
In conventional synchronous execution, a block proceeds from proposal to verification to acceptance. Validity is determined by executing transactions in the block first and obtaining their results before consensus accepts it. At acceptance, the execution results are incorporated into the ledger, so the transactions are settled immediately.
flowchart LR
I[Proposed] --> E[Executed] --> A[Accepted/Settled]
SAE takes a different approach. A block is considered valid and accepted by consensus first if its transactions can pay their fees at their future execution time. The accepted block enters a FIFO execution queue and is executed asynchronously. A later block references its execution results and settles all transactions in that block.
flowchart LR
I[Proposed] --> A[Accepted]
A -->|variable delay| E[Executed]
E -->|τ seconds| S[Settled]
A -. guarantees .-> S
The guarantee from A to S in the diagram indicates that at acceptance, the transactions satisfy the execution feasibility requirement (ability to pay fees) and can therefore eventually settle.
Block lifecycle
Block proposal
The way a block proposer (block builder) is selected does not change. However, builders no longer need to execute transactions and verify their results while constructing the block.
The builder collects new transactions using the most recently settled state as its starting point. It applies worst-case bounds to the preceding unsettled blocks before proposing the new block.
Worst-case bounds include conditions such as ensuring that a sender's balance is at least sufficient to pay fees and that the sender can pay the maximum required base fee. Meeting these bounds guarantees that fees can be paid even when execution is deferred, enabling the block to be safely proposed to consensus.
The worst-case bounds include at least the following.
- The minimum sender account balance (sufficient to pay fees)
- The maximum base fee that may be required
When validating the proposal, all validators must verify that the builder applied the worst-case bounds correctly. This ensures that the block can be executed after acceptance, in the sense that the fee payment requirements are satisfied.
This mechanism establishes only whether transactions can pay their fees. It cannot establish that a transaction will not revert or that it will not exhaust its gas limit. In other words, worst-case bounds guarantee only the ability to pay fees.
Block acceptance
When consensus accepts a block, it enters the FIFO execution queue.
Block execution
Each client runs a block executor concurrently, continuously executing blocks in FIFO order. The executor deterministically records the start and end times of each block's execution.
The executor's timestamp is derived from two sources.
- The timestamp in the block header.
- The total gas consumed and charged during execution.
The execution timestamp recorded by the block executor uses finer time units than the block header timestamp. For example, if headers use seconds, the executor may record time in milliseconds. This enables execution lasting less than a second to be handled accurately.
Execution flow
- Start execution Once a block enters the execution queue, the executor begins processing it when it reaches the front of the queue.
- Adjust the timestamp If the executor's current timestamp is earlier than the block's timestamp, the executor advances its timestamp to match the block's timestamp. Because this advances time without actual processing, unused gas capacity accumulates and gas excess, which is used to calculate prices, decreases accordingly.
- Execute the block The executor executes the block using the state from the most recently executed, but not yet settled, block.
- Update the timestamp based on gas usage After execution, the executor advances its timestamp based on the amount of gas used in the block.
- Adjust gas excess As execution advances the timestamp, gas excess increases and is reflected in the fee algorithm.
- Become eligible for settlement The block now has a recorded execution timestamp and is ready to proceed toward settlement.
Block settlement
An executed block is settled when a subsequent block incorporates its execution results and is accepted by consensus. Execution alone does not formally settle the block. Its results become part of the chain's formal record when incorporated into a later block.
Block settlement (step by step)
- Settlement timing An executed block is considered settled when a subsequent block incorporates its execution results and consensus accepts that subsequent block.
- Incorporated data (state root) The subsequent block sets its state root to the state root of the last executed block being settled. This reflects the execution results up to that point on the chain.
- Incorporated data (receipt root) The subsequent block sets its receipt root to the root of a Merkle Patricia Trie (MPT) containing all receipts since the most recent settlement. The receipts may span multiple blocks.
- Determine which executed blocks to settle The subsequent block's timestamp is used to make this determination. If its timestamp is at least the target block's execution timestamp plus the constant delay, the target block is settled.
- Purpose of the constant delay This fixed waiting period acts as a buffer that smooths occasional processing delays in the block executor. It reduces the effect of individual delays on settlement timing.
Specification
Background
The mechanism for determining gas prices builds on earlier proposals, ACP103 and ACP176.
For more on ACP103, see the following article.
[ACP103] Understanding dynamic fees on the Avalanche P-Chain
For more on ACP176, see the following article.
[ACP176] Understanding dynamic gas adjustment in Avalanche EVM
ACP103 introduced the following variables.
| Variable | Description |
|---|---|
| Target gas consumption per second | |
| Minimum gas price | |
| Constant used to update the gas price | |
| Gas capacity added per second |
ACP176 further introduced a mechanism to adjust dynamically, with the following definitions.
Consumption beyond the target is tracked as excess , and the gas price is calculated from it as follows.
Gas charging
Three quantities are introduced for each transaction.
- Gas limit, the maximum gas declared by the transaction.
- Gas used, the amount of gas actually consumed.
- Gas charged, the amount of gas for which the transaction is charged.
The definition is as follows.
Here, is a constant that determines the minimum gas charge based on the gas limit. is rounded upward. In integer arithmetic, it can be expressed as follows.
Calculations that previously used actual gas consumption now use instead of . For example, the excess is updated using .
Block size
Let (seconds) be the constant delay from block execution to settlement.
The maximum block size is expressed as follows.
A block is invalid if the sum of its transactions' gas limits exceeds .
Queue size
Before adding a block to the queue, check whether the current queue size exceeds the limit.
The maximum execution queue size is given by the following formula.
If the queue size already exceeds when a new block is added, the new block is invalid. This ensures that the block size limit always depends only on .
Block executor
When SAE is activated, the block executor's timestamp is initialized to the timestamp of the most recently accepted block.
Before executing a block with timestamp , the executor updates the timestamp and excess as follows.
It then calculates the gas price from the resulting and executes the block.
After block execution, if a total of gas was charged, the executor updates its values as follows.
is a timestamp that advances based on both gas consumption and real time. The result of must not be rounded up or down to an integer. Gas accumulation must retain fractional values so they can be added accurately.
The updated becomes the block's execution timestamp.
Handling changes to the gas target
If changes within a block, both the consensus and execution threads adopt the new after processing that block.
- The queue size limit is calculated using the parent block's .
- The time required for block execution also uses the parent block's .
Block settlement
When a block with timestamp is proposed, previously executed blocks whose execution completion time is no later than are considered settled.
In other words, a block's execution results are formally settled on-chain only after a fixed delay has elapsed.
Here, represents execution time in fractional seconds and, unlike the block header timestamp , is not an integer.
The proposed block must contain the state root of the most recently settled block.
If the proposed block newly settles any blocks, it must include the following execution result data.
receiptsRootlogsBloomgasUsed
The calculation of receiptsRoot follows EIP2718.
The difference is that receipts from all blocks being settled together are concatenated before constructing the tree.
For more on EIP2718, see the following article.
[EIP2718] Understanding extensible Ethereum transactions
If the block executor is behind, the node may be unable to immediately determine which blocks executed before the proposed block can now be considered settled. In that case, validators must defer their validity judgment until the executor catches up.
Block validity and construction
First determine the range of blocks to settle in the proposed block. Then calculate the following two worst-case bounds for the preceding blocks that remain unsettled.
-
Worst-case excess Simulate the block executor's update equations directly, substituting for . This gives a conservative upper bound on the value of used to calculate prices.
-
Worst-case account balance For each sender, use the gas price derived from the worst-case calculated above and deduct the maximum possible gas cost for the transaction from the balance. Also deduct the transaction's value, the amount transferred. This verifies that the sender has enough funds even under worst-case conditions.
Finally, populate the block header's baseFeePerGas with the gas price calculated from the worst-case at the start of block execution.
This allows builders to safely propose only blocks that have been verified to meet fee payment requirements, without executing them first.
Configuration parameters
SAE exposes and as configuration parameters. and are automatically derived from .
The recommended settings for the C-Chain are as follows.
| Parameter | Description | C-Chain value |
|---|---|---|
| Delay between execution and settlement | 5 seconds | |
| Ratio used to determine the minimum gas charge from the gas limit | 2 |
The specification defines gas fee calculations, block and queue size controls, executor behavior, and settlement rules consistently, enabling safe and efficient asynchronous execution.
Compatibility
ACP194 changes the semantics of several fields within a block. A detailed list of these changes is expected when the reference implementation is complete.
The main fields expected to change at the time of writing are as follows.
stateRootreceiptsRootlogsBloomgasUsedextraData
Changes to settlement timing and the treatment of execution results alter how these fields are interpreted. Existing clients and tools may therefore require adjustments to accommodate the changes.
Reference implementation
At the time of writing, the reference implementation of ACP194 is still under development. The proposal is expected to be updated with an implementation example once it is complete.
Security
Transaction validity based on the worst case
To prevent denial-of-service (DoS) attacks against execution, SAE requires an upper-bound check on the ability to pay transaction fees in addition to ordinary transaction validity checks, such as nonce and signature verification. This is called worst-case cost validity.
It checks whether each transaction can be paid for even if it consumes its entire gas limit. This condition accounts for the following two worst-case assumptions.
- Each transaction consumes the maximum amount of gas specified by its gas limit.
- The gas excess (, the consumption above the target) at execution time is maximized, resulting in the highest gas price.
For blocks in the queue, the excess immediately before execution of block is a monotonically non-decreasing function of the gas usage of preceding blocks. Reducing the gas consumption of a block therefore cannot increase subsequent excess, and the gas price of later blocks cannot exceed the corresponding prediction.
Assuming that all transactions consume their maximum gas yields the worst-case excess. The worst-case gas cost of each transaction can be calculated from the resulting gas price. If the sender can pay this worst-case cost, it can also pay the actual execution cost.
Acceptance based on worst-case cost validity therefore helps guarantee that the transaction will eventually settle.
DoS protection for the queue
Worst-case cost validity protects the execution stage against DoS, but the queue remains exposed to a different type of attack.
For example, an attacker could submit many simple transfers (normally using around 21k gas), each with a gas limit equal to that of an entire block. Although each would actually consume only 21k gas, the queue would reserve a very large worst-case cost. Repeated attempts could artificially inflate the estimated worst-case costs of other users' transactions.
To address this, gas charging is modified. Previously, charges were based on gas actually consumed (gas used), whereas SAE uses the following definition.
Here, is a tuning parameter.
- With , setting a high gas limit still affects the estimates, but the sender is charged for the entire declared limit.
- With , conversely, a large attack can be mounted with little actual gas consumption.
The proposed value is . The goal is to allow headroom for gas consumption up to twice the estimate while removing the incentive to declare an unjustifiably high gas limit.
Upper bound on queue DoS
The following quantities are used to quantify the effect of a DoS attack.
- Let be the actual excess and its corresponding gas price.
- Let be the worst-case excess and its corresponding gas price.
The DoS effect of an attacker, Mallory, can then be expressed as follows.
This is the ratio between the worst-case estimate and the actual price. The maximum discrepancy caused by the attack can be expressed as follows.
Substituting gives the following.
This is the resulting bound.
Applying the proposed parameters gives the following.
The attacker can therefore force users to pay, at most, approximately 12% more in gas prices.
Since gas prices regularly fluctuate by more than 12% on real networks, the proposal considers this effect unlikely to be a major problem. However, its potential impact on the health of the bidding mechanism still warrants attention.
Appendix
JSON-RPC methods
With SAE, a transaction and its receipt, the record of its execution results, are not necessarily recorded in association with the same block. However, the API's behavior must not change as a result.
In particular, eth_getBlockReceipts must return the receipts corresponding to transactions included in the block, not the receipts settled by that block.
This ensures that existing applications are unaffected by the change.
Handling named blocks
The Ethereum mainnet API allows blocks to be retrieved using specific names, such as _latest_ and _pending_.
The API server interprets them according to the consensus mechanism. SAE maps them as follows.
- earliest The genesis block (the first block). This is unchanged.
- pending The most recently accepted block.
- latest The most recently executed block.
- safe / finalized The most recently settled block.
Because Snowman consensus provides strong finality guarantees, there is no difference in meaning between safe and finalized.
The latest block is also not subject to reorg risk, apart from the very small risk of local data corruption on the API node.
Observations on transaction prioritization
Under SAE, a simple value transfer between externally owned accounts (EOAs) is guaranteed to be executed once consensus accepts its block. In other words, execution of this type of transaction has been agreed upon without waiting for subsequent execution or settlement, so block builders may choose to defer these transactions and prioritize other, more complex transactions instead.
Such simple transfers can be identified by a gas limit of 21,000, indicating that the sender intends a pure value transfer without a contract call.
However, delaying such transfers can also delay the execution of subsequent transactions that depend on them, such as transactions relying on the recipient account's balance. Block builders must therefore decide which transactions to process and in what order based on network conditions and their optimization policies.
Conclusion
This article examined ACP194, which proposes decoupling and running block ordering (consensus) and execution concurrently so that processing can continue safely under congestion while fees and waiting times remain more stable.
