This SIP charges access lists for their data footprint, preventing the circumvention of the SIP-7623 floor pricing. This effectively reduces the worst-case block size by ~21% with minimal impact on users.
Motivation
Access lists are only priced for storage but not for their data.
Furthermore, access lists can circumvent the SIP-7623 floor pricing by contributing to SVM gas while still leaving a non-negligible data footprint. This enables achieving the maximal possible block size by combining access lists with calldata at a certain ratio.
Let access_list_bytes be the total byte count of addresses (20 bytes each) and storage keys (32 bytes each) in the access list.
Let access_list_data_cost = 64 * access_list_bytes (i.e. 1280 gas per address and 2048 gas per storage key). The 64 gas-per-byte rate matches the SIP-7976 calldata floor.
The access list data cost is added as a flat surcharge to the gas used calculation, leaving the SIP-2930access_list_cost and the SIP-7976 floor calculation unchanged:
Any transaction with a gas limit below tx.gasUsed evaluated with execution_gas_used = 0 is considered invalid.
Rationale
Access list data is always charged at floor rate (added to access_list_cost), and access list tokens are included in the floor calculation. This ensures:
Access list data always pays floor rate regardless of execution level
Access lists cannot be used to bypass the calldata floor pricing
Consistent pricing across all transaction data sources
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.
Reference Implementation
defcalculate_access_list_data_cost(access_list):"""SIP-7981: flat 64 gas per byte of access list data."""# Each access entry: 20-byte address + 32 bytes per storage key
total_bytes=sum(20+32*len(access.slots)foraccessinaccess_list)returntotal_bytes*64defcalculate_intrinsic_cost(tx):"""
Calculate intrinsic gas cost and floor gas cost.
Both include the SIP-7981 access list data surcharge, so that
tx.gasUsed = max(intrinsic_gas + execution_gas_used, floor_gas).
"""# Calldata tokens (SIP-7976)
zero_bytes=count_zero_bytes(tx.data)nonzero_bytes=len(tx.data)-zero_bytestokens_in_calldata=zero_bytes+nonzero_bytes*4floor_tokens_in_calldata=len(tx.data)*4# Access list cost (SIP-2930, unchanged) and SIP-7981 data surcharge
access_list_cost=0access_list_data_cost=0ifhas_access_list(tx):foraccessintx.access_list:access_list_cost+=(ACCESS_LIST_ADDRESS_COST+len(access.slots)*ACCESS_LIST_STORAGE_KEY_COST)access_list_data_cost=calculate_access_list_data_cost(tx.access_list)# SIP-7976 floor (calldata only) plus SIP-7981 surcharge
floor_gas=(TX_BASE_COST+floor_tokens_in_calldata*TOTAL_COST_FLOOR_PER_TOKEN+access_list_data_cost)# Intrinsic gas plus SIP-7981 surcharge
calldata_cost=tokens_in_calldata*STANDARD_TOKEN_COSTcreate_cost=TX_CREATE_COST+init_code_cost(tx.data)ifis_create(tx)else0intrinsic_gas=(TX_BASE_COST+calldata_cost+create_cost+access_list_cost+access_list_data_cost)returnintrinsic_gas,floor_gas
Security Considerations
This SIP closes a loophole that allows circumventing SIP-7623 floor pricing. Without this fix, attackers can achieve larger blocks than intended by combining access lists with calldata. All transaction data sources now contribute to the floor calculation consistently.
Toni Wahrstätter (@nerolation), "SIP-7981: Increase Access List Cost [REVIEW]," Sila Improvement Proposals, no. 7981, December 2024. Available: https://sips.sila.org/SIPS/sip-7981.