← Back to Pull requests

fix(l1): drive the Amsterdam engine-API versions from dev mode #7067

Closed
unknown closed this pull request without merging on Aug 23, 2026 14:48 UTC
View on GitHub
unknown unknown commented on Jul 30, 2026 08:30 UTC
Author

Motivation

--dev cannot run an Amsterdam+ chain. The dev block producer picks newPayload
V4/V5 by fork, but pins forkchoiceUpdated to V3 and getPayload to V5, and both are
rejected once Amsterdam is active:

  • FCU V3 with attributes → Unsupported fork: forkChoiceV3 used to build Amsterdam payload

  • getPayload V5 serves Osaka only; Amsterdam+ needs V6
  • Every slot fails, and the producer is fatal after three consecutive failures, so the node
    exits a second after startup:

    ERROR Failed to produce block: error sending engine_forkchoiceUpdatedV3 ...
    ERROR block producer failed: EngineClient System Failed after: 3; shutting down the node
    

    I hit this reproducing a devnet issue locally on a Hegotá genesis.

    Description

    Select the version by fork at the block timestamp, mirroring the newPayload switch that
    was already there:

    | call | pre-Amsterdam | Amsterdam+ |
    |---|---|---|
    | forkchoiceUpdated | V3 | V4 |
    | getPayload | V5 | V6 |
    | newPayload | V4 | V5 (unchanged) |

    EngineClient gains engine_forkchoice_updated_v4 and engine_get_payload_v6.

    V4 attributes need two fields a CL would supply, so the producer stands in: the EIP-7843
    slotNumber (one slot per production attempt, starting from the head's slot so it stays
    monotonic across restarts) and the execution-apis#796 targetGasLimit (held at the head's
    gas limit).

    start_block_producer would have reached 9 positional parameters, tripping
    clippy::too_many_arguments under -D warnings, so its arguments move into a
    BlockProducerConfig.

    How to Test

    cargo run --release --features dev -- --dev --network fixtures/genesis/l1-hegota.json --datadir memory
    

    That genesis is added here, because selecting the right engine-API versions is not enough on
    its own. The EIP-8282 builder deposit/exit predeploys come from genesis, like the
    EIP-7002/EIP-7251 ones, and their empty code invalidates every Amsterdam+ block, so the
    producer still died after three attempts:

    ERROR Failed to produce block: System contract: 0x0000…8282 has no code after deployment
    ERROR block producer failed: EngineClient System Failed after: 3; shutting down the node
    

    fixtures/genesis/l1-hegota.json is l1.json plus those two predeploys, with amsterdamTime
    and hegotaTime at 0. The Hegotá predeploys (0x…8141, 0x…8250) need no entry: the client
    installs them at the fork boundary. docs/developers/l1/dev-mode.md documents the flag.

    With it, a chain that produced no blocks at all before mines steadily, and headers carry both
    the EIP-7843 slotNumber and the EIP-7928 blockAccessListHash:

    { "number": "0x8", "slotNumber": "0x8", "blockAccessListHash": "0x4c61de18e8…" }
    

    Verified further by driving frame transactions through the resulting node: the EIP-8141
    admission rules, EIP-8250 keyed nonces and a sponsored transaction all behave, 47 blocks with
    no errors.

    Pre-Amsterdam is unchanged: the same run on an Osaka-only genesis still produces blocks via
    V3/V5 with slotNumber: null.

    make lint-l1 clean; cargo test -p ethrex-rpc --lib 98 passing.

    Checklist

  • Updated STORE_SCHEMA_VERSION (crates/storage/lib.rs) if the PR includes breaking changes to the Store requiring a re-sync. _(N/A — dev-mode block production and engine-API client only.)_
  • Diff: 414 lines (+310 / -104) across 5 files Reviewer: ElFantasma Review duration: 34938m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 414 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.361
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7067"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%