← Back to Pull requests

feat(l1): add debug_getRawBlockAccessList and align BAL getter errors #7069

Closed
unknown closed this pull request without merging on Aug 27, 2026 15:28 UTC
View on GitHub
unknown unknown commented on Jul 30, 2026 13:42 UTC
Author

Motivation

execution-apis#851 — merged 2026-08-24, now in src/eth/block.yaml and src/debug/getters.yaml — pins the semantics of the two EIP-7928 block-access-list getters, and glamsterdam-devnet-8 lists it as required. Two gaps against it:

  • debug_getRawBlockAccessList is not implemented at all.

  • eth_getBlockAccessList returns null for a block that predates Amsterdam, where the

  • spec requires -32001: Resource not found. A block whose access list cannot be produced
    is also indistinguishable from one that has none.

    null for a pre-fork block is the wrong signal: it tells a caller the block is unknown
    when the truth is that block access lists do not exist yet at that height.

    Description

    Both getters now share one resolver:

    | case | eth_getBlockAccessList | debug_getRawBlockAccessList |
    |---|---|---|
    | unknown block, or pending | null | -32001 |
    | predates Amsterdam | -32001 | -32001 |
    | Amsterdam+, history to answer is pruned | 4444 | 4444 |

    debug_getRawBlockAccessList returns the RLP encoding and accepts a block number, tag or
    hash (BlockNumberOrTagOrHash, widened by #851 from number-or-tag).

    The 4444 row covers three concrete situations: the block body is pruned, a regenerated
    list does not match the header commitment, and — following review — the parent header or
    parent state needed for re-execution is pruned (previously that fell into the blanket
    -32603 Internal mapping, which is exactly the failure mode of a snap-synced node asked
    about a block below its pivot).

    [!IMPORTANT]

    The 4444 rows are a behaviour change to the existing eth_getBlockAccessList

    contract, not just new surface: these cases previously returned null. A caller that

    treated null as "no BAL" now gets a hard error distinguishing "unavailable" from

    "unknown", which is the point of the spec change.

    Where the codes come from (per review, now documented on the RpcErr variants):
    4444: Pruned history unavailable was introduced across the eth/debug getters by
    execution-apis#636 — EIP-4444
    deliberately left RPC behaviour out of scope — and #851 requires it for the BAL getters.
    -32001: Resource not found is likewise per #851.

    Two more review follow-ups:

  • An Amsterdam genesis block is served its empty-by-construction access list instead of

  • an error (it has no parent to re-execute from; 0xc0 is the spec's own no-accesses raw
    example).
  • Both getters enforce an exact arity of 1, consistent with the rest of the

  • debug_getRaw* family.

    The Amsterdam boundary is decided from the chain config rather than from the presence of
    the header's BAL commitment, so a header missing the field for another reason is not
    silently reported as pre-fork.

    eth_getBlockAccessList already emitted all six account fields with empty lists, which
    #851 makes explicit in the AccountAccess schema; that behaviour is unchanged.

    Testing

    Eight cases in test/tests/rpc/block_access_list_tests.rs: the raw getter serving RLP by
    hash, the raw getter's -32001 on an unknown block, the JSON getter's -32001 on a
    pre-Amsterdam block, the unknown-hash-returns-null case, both 4444 paths (body pruned;
    parent state pruned), the genesis empty list served as 0xc0, and extra-argument
    rejection.

    Also exercised against a dev node on an Amsterdam genesis: both getters over a block
    carrying an SSTORE transaction (9 accounts, all six fields present), the raw getter by
    both hash and tag, and each error path above.

    Diff: 451 lines (+338 / -113) across 5 files Reviewer: ElFantasma Review duration: 40426m
    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 · 451 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.366
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7069"
    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: 45.4% (MEDIUM) · Higher = larger blast radius
    45.4%
    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.9% · Safe to merge
    17.9%