Skip to content

perf(mpt): align witness nodes for keccak - #669

Closed
Qumeric wants to merge 1 commit into
valery/guest-keccak-spongefrom
codex/mpt-keccak-witness-alignment
Closed

perf(mpt): align witness nodes for keccak#669
Qumeric wants to merge 1 commit into
valery/guest-keccak-spongefrom
codex/mpt-keccak-witness-alignment

Conversation

@Qumeric

@Qumeric Qumeric commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Stacked on #668.

Aligns serialized witness nodes to the XORIN instruction’s 8-byte boundary so decode-side hashes can absorb aligned full blocks without staging copies. The empty-trie and unresolved-digest paths derive padding from the same format rule.

Benchmark result

Block 24001988 with a freshly generated witness, comparing #668 with this PR:

metric #668 this PR delta
execute_metered_insns 616,699,072 612,242,650 −0.72%
metered_rows_unpadded 885,302,449 886,118,413 +0.09%
metered_main_cells_unpadded 45,292,782,124 45,477,219,624 +0.41%
metered_interaction_cells_unpadded 13,866,568,650 13,781,282,045 −0.62%
metered_memory_unpadded_bytes 737,157,581,407 740,893,173,617 +0.51%
memory-triggered segment cuts 68 69 +1

The instruction saving does not compensate for the larger witness’s main-cell, memory, and segment regressions, so this change is not being kept.

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