Skip to content

op-reth: assert builder_config shares its live interop failsafe handle - #22117

Open
op-will wants to merge 1 commit into
developfrom
test/builder-config-interop-failsafe-live-handle
Open

op-reth: assert builder_config shares its live interop failsafe handle#22117
op-will wants to merge 1 commit into
developfrom
test/builder-config-interop-failsafe-live-handle

Conversation

@op-will

@op-will op-will commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What

Adds liveness tests for two OpBuilderConfig handles that OpNode::builder_config() threads through: the interop failsafe and the SDM operator opt-in.

Why

builder_config_reflects_node_fields sets each node field before calling the accessor, so it proves values propagate — but not that the Arc-backed handles stay shared. Of the three shared handles, only da_config had a liveness test (builder_config_da_is_live_shared_handle).

That gap matters most for the interop failsafe, because of when it is written. The filter client sets it at runtime, long after the payload builder has been constructed. So a refactor that copied the flag's value instead of sharing the handle — say interop_failsafe: InteropFailsafe::default(), or a plain bool — would leave the builder permanently ungated, and every existing assertion would still pass. Interop transactions would be included during a failsafe.

The same reasoning applies to operator_sdm_opt_in, which the admin RPC flips after startup.

How

Mirrors the existing DA case exactly: take the config first, flip the node's handle after, assert the config observes the change. The failsafe test additionally clears the flag, proving a single shared handle rather than a one-way latch.

Verification

  • All 4 builder_config tests pass.
  • Mutation-tested: replacing the accessor's interop_failsafe with InteropFailsafe::default() makes the new test fail with its intended message (builder_config must carry the node's live interop failsafe handle, not a detached copy), confirming it detects the regression rather than passing vacuously.
  • cargo +nightly fmt clean.

Tests only — no production code touched.

🤖 Generated with Claude Code

`builder_config_reflects_node_fields` sets each node field before calling
the accessor, so it proves values propagate but not that the Arc-backed
handles stay shared. Only the DA config had a liveness test.

That gap matters most for the interop failsafe: the filter client writes
it after the payload builder is already constructed, so a config that
copied the flag's value instead of sharing the handle would leave the
builder permanently ungated while every existing assertion still passed.
Interop txs would then be included during a failsafe.

Add liveness tests for the interop failsafe and the SDM opt-in, mirroring
the DA case: take the config first, flip the node's handle after, assert
the config observes it. The failsafe test also clears the flag to prove a
single shared handle rather than a one-way latch.

Confirmed to fail by replacing the accessor's `interop_failsafe` with
`InteropFailsafe::default()`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@op-will op-will changed the title test(op-reth): assert builder_config shares its live interop failsafe handle op-reth: assert builder_config shares its live interop failsafe handle Jul 29, 2026
@op-will
op-will force-pushed the test/builder-config-interop-failsafe-live-handle branch from 3365fcf to e4f2491 Compare July 29, 2026 22:36
@op-will
op-will requested a review from bitwiseguy July 30, 2026 15:32
@op-will
op-will marked this pull request as ready for review July 30, 2026 15:32
@op-will
op-will requested a review from a team as a code owner July 30, 2026 15:32
@op-will
op-will requested a review from pcw109550 July 30, 2026 15:32
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