fix(evm-ee): preserve bytecode code-hash keys in chunk witnesses#1850
fix(evm-ee): preserve bytecode code-hash keys in chunk witnesses#1850irnb wants to merge 3 commits into
Conversation
|
This still looks like it can preserve the padded revm representation as the bytecode value. The PR fixes the key side by carrying the alpen/crates/reth/exex/src/accessed_state_exex.rs Lines 270 to 274 in dd920aa For legacy analyzed bytecode, revm may append zero padding during analysis: https://github.com/bluealloy/revm/blob/main/crates/bytecode/src/legacy/analysis.rs#L42-L47. When the range witness later reconstructs the bytecode with alpen/crates/reth/witness/src/range_witness_extractor.rs Lines 203 to 218 in dd920aa That means the preserved key can make |
|
Commit: bd88dee SP1 Execution Results
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #1850 +/- ##
==========================================
+ Coverage 79.76% 80.03% +0.27%
==========================================
Files 674 674
Lines 74805 75710 +905
==========================================
+ Hits 59665 60593 +928
+ Misses 15140 15117 -23
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 19 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@storopoli please check b9c92bf |
Description
Accessed-state records already identify bytecodes by the account
code_hash, but range witness assembly dropped that key and rebuilt theEvmPartialStatebytecode map by hashing materialized Bytecode values.That is incorrect when the stored Bytecode contains revm legacy-analysis padding:
the replay witness can be keyed by
keccak(runtime + padding)instead of the account's realkeccak(runtime), causing chunk replay to miss bytecode that was actually accessed.Type of Change
Notes to Reviewers
Is this PR addressing any specification, design doc or external reference document?
If yes, please add relevant links:
Checklist
Related Issues