Skip to content

Add EIP-7928 Block-level Access Lists JSON RPC methods#726

Open
nerolation wants to merge 6 commits intoethereum:mainfrom
nerolation:rpcs
Open

Add EIP-7928 Block-level Access Lists JSON RPC methods#726
nerolation wants to merge 6 commits intoethereum:mainfrom
nerolation:rpcs

Conversation

@nerolation
Copy link
Contributor

@nerolation nerolation commented Dec 20, 2025

Add RPC methods for EIP-7928 Block-level Access Lists

This PR introduces two new RPC methods to query block-level access lists (BALs) as defined in EIP-7928:

  • eth_getBlockAccessListByHash — returns the BAL for a block by hash
  • eth_getBlockAccessListByNumber — returns the BAL for a block by number or tag

  • Block access lists are stored separately from EL blocks and are not included in the Block structure.
  • RPC methods use the BlockAccessList naming to avoid confusion with EIP-2930 transaction access lists.
  • Error code 4445 is returned for pre-Amsterdam blocks.

@MysticRyuujin
Copy link

Is there a test for 4444 "pruned history unavailable" or perhaps that not possible with the current hivenet?

Also, maybe a silly question but how will the node know the difference between non-existing and pruned?

Otherwise lgtm

@nerolation
Copy link
Contributor Author

No, there's none on that. Wasn't sure about this one but if you say it makes sense to add one, let's do it.
Re, pruned vs. non-available, there can never be a valid ExecutionPayloadEnvelope with an empty Payload on the CL . As long as the EL block exists, it will always contain some fields in the BAL, e.g. entries from system contracts (4788, 7002, ... ) and won't be empty. If the BAL doesn't exist, but the block did, it must have been pruned.

Copy link
Contributor

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec and tests look good!

@bhartnett
Copy link

It's not clear from the naming of eth_getBlockAccessListByHash whether the API expects the block hash or the BAL hash.

I would suggest naming the two endpoints something like:

  • eth_getBlockAccessListByBlockHash
  • eth_getBlockAccessListByBlockNumber

This naming would be consistent with other RPCs such as:

  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber

- name: eth_getBlockAccessListByBlockNumber
summary: Returns the block access list for a block by number.
params:
- name: Block
Copy link

@bhartnett bhartnett Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be named 'Block number' instead of 'Block'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agree, will change it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept it as-is as this also allows inputs like "latest"

@fjl
Copy link
Contributor

fjl commented Jan 21, 2026

We have just merged the test generator into this repo, so it's easier now to add the testse. The tests need to be added to the generator in https://github.com/ethereum/execution-apis/blob/main/tools/testgen/generators.go and then recreated.

@fvictorio
Copy link

Why do these methods return '#/components/schemas/bytes'? Shouldn't they return a structured object?

@nerolation
Copy link
Contributor Author

Why do these methods return '#/components/schemas/bytes'? Shouldn't they return a structured object?

Yeah agree. Should be incorporated for amsterdam-devnet-3

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.

6 participants