perf(l1, l2): pipeline VM merklelization#5084
Merged
Conversation
Oppen
requested changes
Oct 28, 2025
Contributor
Oppen
left a comment
There was a problem hiding this comment.
Do not merge this until:
- It has a proper implementation that does not duplicate half the codebase;
- It has proper documentation: text in docs, reliable comments, and those comments correctly linking to the text docs.
As it is now, this is horrible and brittle.
pablodeymo
commented
Oct 29, 2025
pablodeymo
commented
Oct 29, 2025
Benchmark for c40e7f5Click to view benchmark
|
Oppen
reviewed
Oct 31, 2025
| && !self.pending_removal.contains(&path) | ||
| && self.db().flatkeyvalue_computed(path.clone()) | ||
| { | ||
| if pathrlp.len() == 32 && !self.dirty && self.db().flatkeyvalue_computed(path.clone()) { |
Contributor
There was a problem hiding this comment.
This is a bit extreme and might introduce noticeable overhead due to always traversing the trie during merkleization, never taking advantage of the flat key-value.
Oppen
approved these changes
Oct 31, 2025
Oppen
reviewed
Oct 31, 2025
Oppen
reviewed
Oct 31, 2025
Benchmark for f94898fClick to view benchmark
|
Oppen
reviewed
Oct 31, 2025
| ) -> FxHashMap<Address, Account> { | ||
| // Default state has sender with some balance to send Tx, it can be overwritten though. | ||
| let mut initial_state = BTreeMap::from([( | ||
| let mut initial_state = FxHashMap::from_iter(vec![( |
Contributor
There was a problem hiding this comment.
Suggested change
| let mut initial_state = FxHashMap::from_iter(vec![( | |
| let mut initial_state = FxHashMap::from_iter([( |
Oppen
reviewed
Oct 31, 2025
| Ok(account_updates) | ||
| } | ||
|
|
||
| pub fn get_state_transitions_tx(&mut self) -> Result<Vec<AccountUpdate>, VMError> { |
Contributor
There was a problem hiding this comment.
There's a function in utils that might do this work for us.
Benchmark for 7a9142fClick to view benchmark
|
Benchmark for 57ef91aClick to view benchmark
|
Benchmark for ea7fe5aClick to view benchmark
|
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 6, 2025
**Motivation** The `Execution Breakdown` pie chart was broken after #5084 **Description** This PR is a quick fix of the pie chart, the idea is to have a complete rework in a follow-up PR but for now it serves to avoid showing misleading info, now the chart effectively measures `execute_block_pipeline` + the sync store step after it: - Now that Block Execution and Merkleization are part of `execute_block_pipeline` we removed the Trie update measure (merkleization) from the chart because it will be happening concurrently with execution. - We added a new `Other (pipeline diff)` measure, that takes the whole `execute_block_pipeline` and removes the execution from it (aka the missing merkleization measure). | Main | This PR | | ---- | ---- | | <img width="741" height="427" alt="image" src="https://github.com/user-attachments/assets/3025cd92-6355-4365-92de-f9eb4039d97e" /> | <img width="744" height="465" alt="image" src="https://github.com/user-attachments/assets/7e2f7784-0666-4984-aef8-cd39e10f6ca7" /> |
xqft
pushed a commit
that referenced
this pull request
Nov 11, 2025
**Motivation** We want to parallelize VM execution and merkelization. **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> Closes #issue_number --------- Co-authored-by: Mario Rugiero <mrugiero@gmail.com> Co-authored-by: Lucas Fiegl <iovoid@users.noreply.github.com> Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com> Co-authored-by: Javier Chatruc <jrchatruc@gmail.com>
xqft
pushed a commit
that referenced
this pull request
Nov 11, 2025
**Motivation** The `Execution Breakdown` pie chart was broken after #5084 **Description** This PR is a quick fix of the pie chart, the idea is to have a complete rework in a follow-up PR but for now it serves to avoid showing misleading info, now the chart effectively measures `execute_block_pipeline` + the sync store step after it: - Now that Block Execution and Merkleization are part of `execute_block_pipeline` we removed the Trie update measure (merkleization) from the chart because it will be happening concurrently with execution. - We added a new `Other (pipeline diff)` measure, that takes the whole `execute_block_pipeline` and removes the execution from it (aka the missing merkleization measure). | Main | This PR | | ---- | ---- | | <img width="741" height="427" alt="image" src="https://github.com/user-attachments/assets/3025cd92-6355-4365-92de-f9eb4039d97e" /> | <img width="744" height="465" alt="image" src="https://github.com/user-attachments/assets/7e2f7784-0666-4984-aef8-cd39e10f6ca7" /> |
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
We want to parallelize VM execution and merkelization.
Description
Closes #issue_number