EIP-7981 - Increase access list cost

Created 2024-12-27
Status Draft
Category Core
Type Standards Track
Authors
Requires

Abstract

This EIP charges access lists 16 gas per byte for their data footprint, closing a loophole that allows circumventing EIP-7623 floor pricing.

Motivation

Access lists can circumvent EIP-7623 by filling blocks with uncharged data. Each address uses 20 bytes and each storage key uses 32 bytes, but these are not charged for their data footprint. This allows transactions to achieve larger block sizes than intended by combining access lists with calldata.

Specification

Parameter Value
ACCESS_LIST_ADDRESS_COST 2400
ACCESS_LIST_STORAGE_KEY_COST 1900
ACCESS_LIST_DATA_COST_PER_BYTE 16

Let access_list_data_bytes = access_list_addresses * 20 + access_list_storage_keys * 32.

The current formula for access list costs in EIP-2930 is:

access_list_cost = (
    ACCESS_LIST_ADDRESS_COST * access_list_addresses
    + ACCESS_LIST_STORAGE_KEY_COST * access_list_storage_keys
)

The formula for access list costs changes to:

# Standard access list functionality cost
standard_access_list_cost = (
    ACCESS_LIST_ADDRESS_COST * access_list_addresses
    + ACCESS_LIST_STORAGE_KEY_COST * access_list_storage_keys
)

# Additional data cost for access list bytes
access_list_data_cost = ACCESS_LIST_DATA_COST_PER_BYTE * access_list_data_bytes

# Total access list cost
access_list_cost = standard_access_list_cost + access_list_data_cost

Transactions pay both the existing EIP-2930 functionality costs plus 16 gas per byte for data.

Rationale

Adding 16 gas per byte ensures consistent pricing across all transaction data:

No threshold mechanism is used. The 16 gas per byte is always applied to maintain simplicity and prevent circumvention.

The additional cost makes EIP-2930 access lists economically irrational for gas optimization, effectively deprecating their use while maintaining compatibility.

Maximum Block Size Impact

Current pricing with 36M gas limit:

With data pricing:

Backwards Compatibility

This is a backwards incompatible gas repricing that requires a scheduled network upgrade.

Requires updates to gas estimation in wallets and nodes. Normal usage patterns remain largely unaffected.

Test Cases

Case 1: Normal Transaction

Case 2: Large Access List Transaction

Case 3: Combined Access List + Calldata

Security Considerations

Reduces maximum block size from access lists, improving network stability. The additional cost is proportional to data usage while maintaining access list utility for backwards compatibility.

Copyright

Copyright and related rights waived via CC0.