perf(l1): avoid opening tries#5145
Merged
Merged
Conversation
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
|
Benchmark Block Execution Results Comparison Against Main
|
edg-l
approved these changes
Nov 3, 2025
pablodeymo
reviewed
Nov 3, 2025
jrchatruc
approved these changes
Nov 3, 2025
jrchatruc
enabled auto-merge
November 3, 2025 17:53
pablodeymo
approved these changes
Nov 3, 2025
xqft
pushed a commit
that referenced
this pull request
Nov 11, 2025
**Motivation** Currently to get a storage we are: * getting the block header to obtain the state root * getting the account to get the storage root * reading the value The first step isn't needed because the state root is the same through the block, and the second isn't needed because since we're using a path-based DB we can directly get the value (without even using the trie, if the FKVs are computed). **Description** We make the VM database ask by state_root instead of block hash (skipping step 1), and we skip reading the account storage root when the FlatKeyValues are computed for it. --------- Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com> Co-authored-by: Javier Chatruc <jrchatruc@gmail.com> Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Currently to get a storage we are:
The first step isn't needed because the state root is the same through the block, and the second isn't needed because since we're using a path-based DB we can directly get the value (without even using the trie, if the FKVs are computed).
Description
We make the VM database ask by state_root instead of block hash (skipping step 1), and we skip reading the account storage root when the FlatKeyValues are computed for it.