feat(l1): implement debug_intermediateRoots endpoint#6703
Conversation
Compute the intermediate state root after each transaction in a block. Uses a non-destructive peek at cumulative state transitions to build AccountUpdates, then applies them to a fresh trie opened from the parent state root for each transaction. Changes across layers: - levm: add GeneralizedDatabase::peek_state_transitions (read-only) - vm: add Evm::execute_tx_by_index for single-tx execution - blockchain: add Blockchain::compute_intermediate_roots with timeout - rpc: add IntermediateRootsRequest handler
|
Lines of code reportTotal lines added: Detailed view |
Benchmark Results ComparisonNo significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: FibonacciRecursive
Benchmark Results: ManyHashes
Benchmark Results: MstoreBench
Benchmark Results: Push
Benchmark Results: SstoreBench_no_opt
|
Execute a block with one transfer, then query intermediateRoots. Assert the response contains one state root per transaction.
Summary
debug_intermediateRootsRPC endpoint that returns the intermediate state root after each transaction in a blockGeneralizedDatabase::peek_state_transitions()— a non-destructive read of cumulative state transitionsEvm::execute_tx_by_index()for single-transaction execution without tracingBlockchain::compute_intermediate_roots()with timeout supportCloses part of #6572