Repository navigation
op-reth!: refuse a masked engine tree at launch and test the Amsterdam rejection - #23422
Closed
einar-oplabs wants to merge 1 commit into
Closed
einar-oplabs wants to merge 1 commit into
einar-oplabs wants to merge 1 commit into
Conversation
Contributor
|
This pr has been automatically marked as stale and will be closed in 5 days if no updates |
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 9, 2026 22:30
4bbcaae to
1a32f35
Compare
einar-oplabs
force-pushed
the
einar/23403-amsterdam-masking-guard-tests
branch
from
November 9, 2026 22:31
53a7c79 to
7629cf4
Compare
einar-oplabs
changed the base branch from
einar/23394-proofs-multiproof-v2
to
develop
November 10, 2026 13:11
einar-oplabs
force-pushed
the
einar/23403-amsterdam-masking-guard-tests
branch
from
November 10, 2026 13:25
7629cf4 to
006dd02
Compare
einar-oplabs
marked this pull request as ready for review
November 10, 2026 13:25
einar-oplabs
force-pushed
the
einar/23403-amsterdam-masking-guard-tests
branch
from
November 10, 2026 15:33
34c1ee1 to
1bd753f
Compare
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
einar-oplabs
force-pushed
the
einar/23403-amsterdam-masking-guard-tests
branch
2 times, most recently
from
November 10, 2026 16:20
3681957 to
c0ea4eb
Compare
einar-oplabs
force-pushed
the
einar/23403-amsterdam-masking-guard-tests
branch
2 times, most recently
from
November 10, 2026 18:48
da468eb to
551db53
Compare
…m rejection op-reth does not support reth's state masking, and until now only the CLI turned it off. init_op_engine_defaults locks reth's engine defaults at masking 0 and reports when someone else locked them first; the CLI and the node crate's test setup call it before any NodeConfig exists. The engine validator builder of OpAddOns sees the TreeConfig the launcher hands the engine tree and rejects a masked one, so NodeBuilder::launch, launch_with and reth's e2e setups cannot start a masked node unnoticed; launch_node runs the same check on its NodeConfig before opening the datadir, and the CLI keeps its post-parse rejection. The payload validator tests pin that a plain post-Isthmus payload is well formed, that a block carrying an Amsterdam header field fails the block hash check, and that scheduling Amsterdam on an OP chain spec rejects every OP payload. BREAKING CHANGE: binaries and test harnesses that build a NodeConfig or parse the CLI without Cli::parse_with_denied_args lock the engine defaults at upstream's state masking window, and launching an OpNode from them now fails with "--engine.num-state-masking-blocks must be 0 on op-reth: state masking is not supported". Call reth_optimism_node::init_op_engine_defaults() before building any NodeConfig, or parse the CLI with Cli::parse_with_denied_args. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
einar-oplabs
force-pushed
the
einar/23403-amsterdam-masking-guard-tests
branch
from
November 10, 2026 19:25
b2f86c7 to
0ce1619
Compare
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.
Covers the two rejection paths the reth v2.6.0 bump (#23046) added without tests: the Amsterdam payload field check in
ensure_well_formed_payloadand the state masking guard on the launch path. Closes #23403.Payload validator (
rust/op-reth/crates/payload/src/validator.rs): a plain post-Isthmus payload round-trips throughengine_newPayloadV4and passes every check; a block carryingblock_access_list_hashorslot_numberis rejected with the block hash error, since no OP payload version can represent those fields; withEthereumHardfork::Amsterdamscheduled by hand on an OP chain spec, every OP payload is rejected withPostAmsterdamBlockWithoutBlockAccessList, which proves the activation flag reaches the validator and marks the footgun that no OP fork implies Amsterdam.State masking (
rust/op-reth/crates/node/src/state_masking.rs): op-reth forces masking off at the two points it owns.init_op_engine_defaults()locks the process-global engine defaults at--engine.num-state-masking-blocks 0and returnsEngineDefaultsLockedMaskedwhen another caller locked them with a nonzero effective window first (the global is first-writer-wins; a locked persistence threshold of 0 turns masking off whatever the window says); the CLI calls it before clap reads the defaults and prints that error to stderr, since no tracing subscriber exists yet, and the test helpersutils::node_config,utils::unmasked_tree_configandutils::setupcall it before anyNodeConfigexists, so theitande2e-testsuitebinaries pass under single-processcargo testwhichever test runs first. The guard isNoStateMaskingValidatorBuilder, whichOpAddOnswraps around its engine validator builder: everyEngineNodeLauncher, whether reached through.launch(),launch_with, orreth_e2e_test_utils, hands it theTreeConfigit runs the engine with, so a masked config fails there withSTATE_MASKING_UNSUPPORTED, and a launched node is unmasked by construction. The guard cannot set the window to 0 itself: the tree keeps its own copy of theTreeConfig, so rejection is the only option from op-reth. The CLI post-parse check rejects a nonzero flag orRETH_ENGINE_NUM_STATE_MASKING_BLOCKSwith the same constant plus the reason, andlaunch_noderuns the same check on itsNodeConfigbefore opening the datadir, so a masked config fails fast on the binary's path. Tests: the guard accepts 0 and rejects 30;init_op_engine_defaultsturns the default off;tests/it/state_masking.rslaunches a node with a maskedTreeConfigand asserts the rejection anywhere in the error chain, while every other launch test routes throughutils::node_config(unused ports included) /utils::unmasked_tree_configand would fail at the guard otherwise.BREAKING CHANGE: binaries and test harnesses that build a
NodeConfigor parse the CLI withoutCli::parse_with_denied_argslock the engine defaults at upstream's state masking window, and launching anOpNodefrom them now fails with--engine.num-state-masking-blocks must be 0 on op-reth: state masking is not supported. Callreth_optimism_node::init_op_engine_defaults()before building anyNodeConfig, or parse the CLI withCli::parse_with_denied_args.Breakdown
AI Reviews
🤖 Generated with Claude Code