Alert Source Discuss
⚠️ Draft Standards Track: Core

EIP-7981: Increase access list cost

Introduce floor pricing for access lists to reduce maximum block size

Authors Toni Wahrstätter (@nerolation)
Created 2024-12-27
Discussion Link https://ethereum-magicians.org/t/eip-7981-increase-access-list-cost/24680
Requires EIP-2930

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:

  • Address: 2720 gas (2400 + 320)
  • Storage key: 2412 gas (1900 + 512)

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:

  • 1 address + 18,946 storage keys: 2400 + (18,946 × 1900) = 36,000,100 gas (~607 KB)

With data pricing:

  • 1 address + 14,924 storage keys: 2720 + (14,924 × 2412) = 36,000,688 gas (~478 KB)

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

  • Addresses: 5
  • Storage keys: 10
  • Old cost: 5 × 2400 + 10 × 1900 = 31,000 gas
  • New cost: 5 × 2720 + 10 × 2412 = 37,720 gas
  • Additional cost: 6,720 gas (21.7% increase)

Case 2: Large Access List Transaction

  • Addresses: 1000
  • Storage keys: 0
  • Old cost: 1000 × 2400 = 2,400,000 gas
  • New cost: 1000 × 2720 = 2,720,000 gas
  • Additional cost: 320,000 gas (13.3% increase)

Case 3: Combined Access List + Calldata

  • Addresses: 500
  • Calldata: 5,000 bytes
  • Old access list cost: 500 × 2400 = 1,200,000 gas
  • Old calldata cost: 5,000 × 4 = 20,000 gas (standard rate, avoiding floor)
  • New access list cost: 500 × 2720 = 1,360,000 gas
  • New calldata cost: Applied through EIP-7623 mechanism
  • Result: Can no longer circumvent EIP-7623 floor pricing

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 and related rights waived via CC0.

Citation

Please cite this document as:

Toni Wahrstätter (@nerolation), "EIP-7981: Increase access list cost [DRAFT]," Ethereum Improvement Proposals, no. 7981, December 2024. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7981.