rpc/jsonrpc: exclude transient EIP-6780 contract bytecode from execution witness#21517
Closed
awskii wants to merge 1 commit into
Closed
rpc/jsonrpc: exclude transient EIP-6780 contract bytecode from execution witness#21517awskii wants to merge 1 commit into
awskii wants to merge 1 commit into
Conversation
…ion witness A contract created and self-destructed inside the same block is not part of the canonical end-state and Reth's Canonical witness mode excludes its bytecode (Legacy includes 'created bytecode'; Canonical does not). Erigon was emitting it: the contract's code is loaded into AccessedCode by the subsequent CALL after CREATE and is never unrecorded when the contract is destroyed. Discriminator: the address is deleted this block and its code was never served from the pre-state reader, so it came from the in-block codeOverlay. Codes whose only sources are transient addresses are dropped from the witness Codes array. Measured against the EEST zkevm@v0.4.0 corpus (via the eest_zkevm_witness suite in #21487, layered with #21491): codes-witness mismatches drop from 1176 to 924 (-252), fixtures fully passing 2711 -> 2726 (+15). Refs #21307.
Member
Author
|
Superseded by #21518 (merged). #21518 builds witness Closing as superseded. |
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.
Filters out bytecode for contracts created and
SELFDESTRUCTed in the same block from thedebug_executionWitnesscodesarray, matching Reth's Canonical witness rule. Refs #21307.A contract that was
CREATEd thenSELFDESTRUCTed in the same block isn't part of the canonical end-state — Reth'sExecutionWitnessMode::Canonicalexcludes its code; Erigon was emitting it because the in-betweenCALLpopulatedRecordingState.AccessedCode, which is never unwound.Discriminator: address is in
DeletedAccountsand was never served from the pre-state reader (so the bytes came from the in-blockcodeOverlay). Codes whose only sources are such addresses are dropped.CreatedContracts ∩ DeletedAccountswould not work —IntraBlockState.SelfdestructclearsstateObject.createdContract, sostateWriter.CreateContractis never called for an EIP-6780 contract.Measured against the EEST
zkevm@v0.4.0corpus via the witness suite in #21487, stacked on #21491:5 fixtures newly fail (haven't bisected yet) and 599 cases of the
expected 5 → got 6cluster survive — another +1 mechanism is still in play.Orthogonal to #21491; diff applies cleanly to plain
main.