Skip to main content

Try it Live

Run Transaction examples in the interactive playground

EIP-2930 Transactions

Access list transactions introduced in Berlin hard fork for gas optimization.

Overview

EIP-2930 transactions (Type 1) add access lists to pre-declare which accounts and storage slots will be accessed. This reduces gas costs by avoiding cold access penalties introduced in Berlin.

Type Definition

Source: types.ts:74-90

Creating EIP-2930 Transactions

Access Lists

Purpose

Access lists reduce gas costs by pre-declaring account and storage access:
  • Cold account access: 2600 gas → 100 gas (list) + 2400 gas (access)
  • Cold storage access: 2100 gas → 1900 gas (list) + 100 gas (access)

Structure

Gas Cost

Adding to access list has upfront cost:
  • Per address: 2400 gas
  • Per storage key: 1900 gas
Break-even point:
  • Accessing address once: no savings (2400 + 2400 = 4800 vs 2600 + 2600 = 5200)
  • Accessing 2+ times: savings

Example

Building Access Lists

eth_createAccessList RPC

Most nodes provide eth_createAccessList to automatically generate access lists:

Manual Construction

Methods

All standard transaction methods work with EIP-2930:

RLP Encoding

EIP-2930 uses typed transaction envelope:
Access list encoding:
Example:

yParity vs v

EIP-2930 uses yParity (0 or 1) instead of v:
Converting between formats:

Gas Optimization Strategies

When to Use Access Lists

Access lists are beneficial when:
  1. Accessing same account/storage multiple times
  2. Complex contract interactions
  3. Gas savings > access list overhead

When NOT to Use

Access lists add overhead for:
  1. Simple ETH transfers (no storage access)
  2. Single storage reads
  3. Small transactions

Optimization Example

Comparison with Legacy

Comparison with EIP-1559

EIP-2930 is a stepping stone between Legacy and EIP-1559 - it adds access lists but keeps fixed gas pricing.

When to Use

Use EIP-2930 for:
  • Gas optimization on Berlin+ networks
  • Fixed gas price with access list benefits
  • Networks without EIP-1559
Prefer EIP-1559 for:
  • Modern Ethereum (better gas pricing)
  • Most new applications
Prefer Legacy for:
  • Maximum compatibility
  • Pre-Berlin networks

EIP Reference