Skip to content

Commit f1b1370

Browse files
authored
Update EIP-7928: cap max items in BAL
Merged by EIP-Bot.
1 parent 137a132 commit f1b1370

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

EIPS/eip-7928.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,23 @@ Addresses with no state changes **MUST** still be present with empty change list
111111

112112
Entries from an [EIP-2930](./eip-2930.md) access list **MUST NOT** be included automatically. Only addresses and storage slots that are actually touched or changed during execution are recorded.
113113

114+
### Block Access List Size Constraint
115+
116+
The block access list is constrained by available gas rather than a fixed maximum number of items. The constraint is defined as:
117+
118+
```
119+
bal_items * ITEM_COST <= available_gas + system_allowance
120+
```
121+
122+
Where:
123+
124+
- `bal_items = storage_reads + addresses`
125+
- `ITEM_COST = GAS_WARM_ACCESS + TX_ACCESS_LIST_STORAGE_KEY_COST`
126+
- `available_gas = block_gas_limit - tx_count * TX_BASE_COST`
127+
- `system_allowance = (15 + 3 * (MAX_WITHDRAWAL_REQUESTS_PER_BLOCK + MAX_CONSOLIDATION_REQUESTS_PER_BLOCK)) * ITEM_COST`
128+
129+
The `storage_reads` is the total number of storage accesses across all accounts, and `addresses` is the total number of unique addresses accessed in the block. The `system_allowance` term accounts for system contract accesses that occur outside of user transactions. `MAX_WITHDRAWAL_REQUESTS_PER_BLOCK` is defined in [EIP-7002](./eip-7002.md) and `MAX_CONSOLIDATION_REQUESTS_PER_BLOCK` is defined in [EIP-7251](./eip-7251.md).
130+
114131
### Gas Validation Before State Access
115132

116133
State-accessing opcodes perform gas validation in two phases:

0 commit comments

Comments
 (0)