Skip to content

perf(mpt): specialize common RLP headers - #666

Closed
Qumeric wants to merge 1 commit into
codex/storage-trie-lookup-cachefrom
codex/mpt-common-rlp-headers
Closed

perf(mpt): specialize common RLP headers#666
Qumeric wants to merge 1 commit into
codex/storage-trie-lookup-cachefrom
codex/mpt-common-rlp-headers

Conversation

@Qumeric

@Qumeric Qumeric commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Stacked on #665.

Specialize the canonical RLP headers used by nearly every resolved MPT node: short list headers, one-byte long-list headers, and fixed 32-byte child references. Uncommon and malformed forms retain the generic alloy_rlp decoder as a checked fallback.

Benchmark results

Block 24001988, prove-stark, RVR, g7e.2xlarge: before, with specialized headers.

metric before with this PR delta
execute_metered_insns 640,063,687 635,122,863 −4,940,824 (−0.77%)
metered_rows_unpadded 923,404,883 918,512,602 −4,892,281 (−0.53%)
metered_main_cells_unpadded 46,872,486,323 46,712,135,069 −160,351,254 (−0.34%)
metered_interaction_cells_unpadded 14,381,062,111 14,298,657,640 −82,404,471 (−0.57%)
total_cells 63,193,141,279 62,961,656,223 −231,485,056 (−0.37%)

Block 24003902

RVR execution: #665, this PR.

metric #665 this PR delta
execute_metered_insns 511,200,060 510,039,370 −1,160,690 (−0.23%)
metered_rows_unpadded 691,954,121 690,800,979 −1,153,142 (−0.17%)
metered_main_cells_unpadded 30,054,639,856 30,015,457,221 −39,182,635 (−0.13%)
metered_interaction_cells_unpadded 11,974,365,720 11,954,965,713 −19,400,007 (−0.16%)
metered_memory_unpadded_bytes 574,055,559,407 573,582,845,194 −472,714,213 (−0.08%)
memory-triggered segment cuts 51 51 0

@Qumeric

Qumeric commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Collapsed into #684 together with the other two RLP PRs. They were one idea split across three stacked PRs; #684 carries the union plus an rlp module and differential tests against alloy_rlp.

@Qumeric Qumeric closed this Jul 28, 2026
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.

1 participant