Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nit(mpt): Remove unnecessary collapse_if_possible call #808

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

hashcashier
Copy link
Contributor

This aim of this PR is to remove a very subtle yet unused unblind call to prevent access to unused trie nodes. Such additional access, while having minor performance impact, prevents the delegation of execution witness generation to external clients that retrieve the minimum required trie nodes, such as zeth.

The PR modifies collapse_if_possible to avoid attempting to collapse the blinded child of an extension node. The reason is that because we assume the trie is correctly constructed prior to any execution, there is no need to unblind the child of the extension (which must be a branch) to attempt further collapse, because the execution did not unblind this child already and therefore did not perform any reads/writes to it.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.4%. Comparing base (2e943f4) to head (c89ece3).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
crates/mpt/src/node.rs 0.0% 3 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clabby clabby added this pull request to the merge queue Nov 15, 2024
Merged via the queue into op-rs:main with commit 433d4d9 Nov 15, 2024
15 of 16 checks passed
This was referenced Nov 14, 2024
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.

2 participants