Skip to content

EIP-7928 BAL does not record EIP-4788 timestamp read operation for invalid queries #1889

@raxhvl

Description

@raxhvl

Metadata

  • Hardfork: Amsterdam

What was wrong?

When an invalid timestamp is queried for EIP-4788 beacon block root, the call reverts but the timestamp slot is NOT recorded as a storage read.

Sources

If no changes remain, addresses are included with empty lists; if storage was read, the corresponding keys MUST appear in storage_reads.

Additional Context

Test case

Function Name Goal Setup Expectation
test_bal_4788_query Ensure BAL captures storage reads when querying beacon root (valid and invalid queries) Parameterized test: Block 1 stores beacon root at timestamp 12. Block 2 queries timestamp (valid=12, invalid=0). Valid query: reads both timestamp and root slots, writes returned value. Invalid query: reads only timestamp slot (contract reverts), query contract has implicit SLOAD recorded (SSTORE(0,0) is no-op). Block 1 BAL: System call writes. Block 2 BAL MUST include at block_access_index=0: System call writes for block 2. Valid case at block_access_index=1: BEACON_ROOTS_ADDRESS with storage_reads [timestamp_slot, root_slot], query contract with storage_changes. Invalid case at block_access_index=1: BEACON_ROOTS_ADDRESS with storage_reads [timestamp_slot only], query contract with storage_reads [0].

Gets the following error:

BlockAccessListValidationError: Storage read 0 not found or not in correct order. Actual reads: []

cc: @nerolation @fselmo

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: this is a bug, deviation, or other problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions