Skip to content

Conversation

@bhartnett
Copy link
Contributor

As a sync optimization we can skip executing the block when we have a block access list available for a finalized block. In this case we simply apply the BAL and then persist the ledger changes without executing the transactions.

The function which applies the BAL to the state, loops through each account and writes the last update for each type of change (balance, nonce, code, storage). This should be much faster than executing the full block.

This feature is also used when replaying blocks on startup which should speed up that part which was previously rather slow.

@bhartnett bhartnett marked this pull request as draft January 21, 2026 12:19
@bhartnett
Copy link
Contributor Author

One problem with this optimization is that receipts cannot be generated without executing the block and so this idea may not be viable if we want to support querying historical receipts via JSON-RPC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant