Expand description
EIP-7928 Block-Level Access List codec.
This crate is the only place the 7928 wire format is known. Everything above it (archive, layout, cli) consumes the typed structures and must not touch RLP.
Wire schema (from the EIP, Review status, subject to change):
StorageChange = [BlockAccessIndex(u32), StorageValue(u256)]
BalanceChange = [BlockAccessIndex(u32), Balance(u256)]
NonceChange = [BlockAccessIndex(u32), Nonce(u64)]
CodeChange = [BlockAccessIndex(u32), Bytecode(bytes)]
SlotChanges = [StorageKey(u256), [StorageChange...]]
AccountChanges = [Address, [SlotChanges...], [StorageKey...],
[BalanceChange...], [NonceChange...], [CodeChange...]]
BlockAccessList = [AccountChanges...]
block_access_list_hash = keccak256(rlp(BlockAccessList))Ordering is part of validity: accounts by address, slots by key, changes by
index, all strictly ascending. A BAL that violates ordering or uniqueness
is rejected by BlockAccessList::decode; it is never softly accepted.
With the json feature, [BlockAccessList::from_rpc_json] accepts the
execution-apis JSON form served by eth_getBlockAccessList.
Structs§
- Account
Changes - Everything that happened to one account within the block.
- Balance
Change - One balance change.
- Block
Access List - The whole list. Wire form is a bare RLP list of
AccountChanges(no wrapping struct), so encoding is transparent overaccounts. - Code
Change - One code change (deployment or self-destruct).
- Nonce
Change - One nonce change.
- Slot
Changes - All writes to one slot within the block.
- Storage
Change - One write to a storage slot.
Enums§
- Codec
Error - Decoding, validation and verification failures.
Constants§
- EMPTY_
BAL_ HASH - Hash of the empty BAL:
keccak256(rlp([]))=keccak256(0xc0).
Type Aliases§
- Block
Access Index - Position of a change in the block’s life cycle.
0= pre-execution system calls,1..=n= transactions,n+1= post-execution.