rootwarp / rootwarp/rvc

[7.4] Boundary proposal test — v3 → v4 dispatch + slashing record

Open
#321 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P0
Dominant language
Rust
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Plan reference: plan/glamsterdam-2026-09-05/issues/07-phase-7-devnet-bring-up.md · Issue 7.4

Description

A proposal at the first Gloas slot goes through produce_block_v4 and is recorded in the slashing DB, while the pre-fork slot still uses the v3 path.

Implementation Notes

  • Convert MockBlockBeacon to a call-recording mock (Mutex<Vec<Call>> + a canned ProduceBlockResponse) and add the produce_block_v4 arm from 6.2; keep the existing Err("mock") behaviour available so current tests do not change assertions.
  • Dispatch is asserted on the BeaconBlockClient seam, not wiremock — production never reaches MockServer. Reuse create_test_config / create_mock_validator_store from coordinator/tests/mod.rs (81, 241), not block_proposal/tests.rs (it has no such helpers).
  • Assert the block signing root reaches the signer as DutyRef::BlockRoot { root, slot } (island output), not a tree_hash bridge.
  • KAT gate: no test here may be named *_root/*signing_root/*tree_hash — name it test_gloas_slot_dispatches_produce_block_v4 etc. EXEMPTIONS must not grow.

Acceptance Criteria

  • RED first: the v4 assertion fails before 6.2's trait arm is wired in
  • Slot 2208 records exactly one produce_block_v3 call and zero v4 calls; slot 2240 the inverse, with a BuilderConfig present in the recorded v4 call
  • No blinded-block publish is issued for the Gloas slot (publish_blinded_block call count 0)
  • D20: with the mock returning BlockContents for slot 2240, exactly one publish_execution_payload_envelope call follows the block publish, carrying the same response's envelope, blobs and proofs, signed under DOMAIN_BEACON_BUILDER; with a bare-block (builder-win) response the call count is 0 and Eth-Builder-Url is echoed
  • Slashing DB holds exactly one block record for slot 2240; a replay of the slot is refused
  • cargo nextest run -p rvc green — no pre-existing proposal test edited

Testing Notes

call-recording mock for endpoint selection; in-memory slashing DB.

Points: 5 (reason: MockBlockBeacon (coordinator/tests/mod.rs 132) is a unit struct whose produce_block_v3 always returns Err; recording calls and returning a real ProduceBlockResponse reworks create_mock_block_beacon() (172), used at 40 call sites across 11 test files — keep its signature so none of them are edited) · Type: feature · Priority: P0 · Scope: 2 days · Blocked by: #317, P6 (#295 trait ripple, #299 v4 flow, #302 block root, #313 / #315 self-build envelope, D20) · Blocks: #322, #327

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with coordinator/tests/mod.rs, especially MockBlockBeacon, create_mock_block_beacon(), and the referenced test helpers, then inspect the BeaconBlockClient seam and the existing proposal tests. Run cargo nextest run -p rvc; done means the v3/v4 boundary, envelope, slashing-record and replay assertions pass without editing pre-existing proposal tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, blockchain, testing
Issue type
Feature
Difficulty
4/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.