refactor(core): Refactor Patricia Merkle Trie (avoid compulsive hashing)#2687
Merged
Conversation
Lines of code reportTotal lines added: Detailed view |
Benchmark for ffa87ebClick to view benchmark
|
Benchmark for 1c71d11Click to view benchmark
|
Benchmark for f2fefcbClick to view benchmark
|
Benchmark for eb0b028Click to view benchmark
|
Benchmark for 3db09e5Click to view benchmark
|
Benchmark for 80e45a7Click to view benchmark
|
Benchmark for 48f8dd6Click to view benchmark
|
Benchmark for e5cd2a7Click to view benchmark
|
Benchmark for 87221b4Click to view benchmark
|
Benchmark for 13158c5Click to view benchmark
|
Benchmark for 37a4d2bClick to view benchmark
|
Benchmark for 4ff614dClick to view benchmark
|
Benchmark for 614171dClick to view benchmark
|
Arkenan
requested changes
May 23, 2025
Collaborator
Arkenan
left a comment
There was a problem hiding this comment.
Thanks for the PR! A lot of great changes. Left some comments.
Benchmark for c0d893fClick to view benchmark
|
Benchmark for ac86e9eClick to view benchmark
|
Benchmark for 7908bafClick to view benchmark
|
mpaulucci
approved these changes
May 27, 2025
Oppen
reviewed
May 28, 2025
pedrobergamini
pushed a commit
to pedrobergamini/ethrex
that referenced
this pull request
Aug 24, 2025
…ng) (lambdaclass#2687) **Motivation** <!-- Why does this pull request exist? What are its goals? --> Refactor the Patricia Merkle Trie to avoid rehashing the affected part of the trie every time it is modified. Delay hashing until its hash is required. <!-- A clear and concise general description of the changes this PR introduces --> Replaces node hash references by either a `NodeHash` as before (for unbuffered nodes) or a node itself (for modified nodes). <!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 --> Closes #issue_number
edg-l
added a commit
that referenced
this pull request
Apr 22, 2026
Migrate Amsterdam support from bal@v5.6.1 to bal@v5.7.0 (eels_commit 524b44617e410ab21b5122f0be5113b62a0e76ee, devnets/bal/4). - EIP-7928 (PR #2730): widen BAL index from u16 to u32 across StorageChange/CodeChange/BalanceChange/NonceChange, recorder, checkpoint, BalAddressIndex and all helpers. - EIP-8037 (PR #2687): dynamic cost_per_state_byte derived from block gas limit. New VM fields for per-block state-gas costs, gated by Fork::Amsterdam. 120M block gas keeps cpsb = 1174. - EIP-8037 (PRs #2698, #2733): SSTORE 0->N->0 reservoir refill via clamp-and-spill; per-frame state_gas_refund absorbed on success, discarded on revert; remainder spills to VM-level pending reservoir. - EIP-7976: calldata floor raised from 10 to 16 gas per token (Amsterdam-gated), with unweighted token count per spec. - EIP-7981: access-list data bytes (20/addr, 32/key) folded into floor-token count; applies in both regular and floor arms; mempool intrinsic-gas path mirrored. - EIP-8037 (PR #2689): top-level tx failure zeroes execution state_gas_used and refunds the reservoir; intrinsic state gas preserved. Routed through refund_sender. - EIP-7708 (PR #2717): audit confirmed invariants (lex-ordered burn logs, no coinbase priority-fee log, SELFDESTRUCT-dest coalescing) already held; added regression tests. - EIP-8037 (PR #2595): audit confirmed code-deposit state-gas discard on both oversized-code and deposit-OOG halts; added regression tests. Infra: .fixtures_url_amsterdam, Makefile, hive config and docs bumped to bal@v5.7.0 / devnets/bal/4. Tests: 185 levm tests green; new files cover EIP-8037 CPSB, refund clamp-and-spill, top-level reset, code-deposit discard, and combined EIP-7976+7981 scenarios.
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
Refactor the Patricia Merkle Trie to avoid rehashing the affected part of the trie every time it is modified. Delay hashing until its hash is required.
Replaces node hash references by either a
NodeHashas before (for unbuffered nodes) or a node itself (for modified nodes).Closes #issue_number