EIPs Explained

EIP-7808 · Stagnant · Meta · 2024-11-04

EIP-7808: Reserve Tx-Type Range for RIPs

Proposes reserving typed-transaction numbers 0x40 to 0x7f for Rollup Improvement Proposals, so L2 transaction types never collide with ones defined by EIPs for L1.

What problem does it solve?

EIP-2718 introduced typed transactions: the first byte of an encoded transaction names its type. Ethereum L1 has used this for type 1 (access lists), type 2 (EIP-1559), type 3 (blobs, EIP-4844) and type 4 (EIP-7702).

Rollups also want new transaction types, specified through the separate RIP (Rollup Improvement Proposal) process. If RIPs and EIPs pick numbers independently, the same byte could mean two different transactions on L1 and an L2, confusing wallets, libraries and tooling that work across chains.

How it works

The proposal is a single rule:

  • Transaction types 0x40 through 0x7f (inclusive, 64 values) are reserved for the RIP process.

The RIP process keeps its own registry inside that range, and the EIP process no longer needs to track L2-only types. EIPs still have 64 types below 0x40 for their own use. No protocol behavior changes; this is a numbering agreement.

Sample code

A client-side helper that classifies a raw transaction by its type byte:

function classifyTxType(raw: string): string {
  const bytes = raw.startsWith("0x") ? raw.slice(2) : raw;
  const first = parseInt(bytes.slice(0, 2), 16);

  if (first >= 0xc0) return "legacy (untyped RLP list)";
  if (first <= 0x3f) return `EIP-defined type 0x${first.toString(16)}`;
  if (first >= 0x40 && first <= 0x7f) return `RIP range type 0x${first.toString(16)}`;
  return `unassigned type 0x${first.toString(16)}`;
}

Things to know

  • Status: Stagnant. The reservation has not been finalized as an EIP, so treat it as a proposed convention rather than a guarantee.
  • It is a Meta EIP: there is no consensus or client change on L1.
  • Under EIP-2718, legacy transactions are recognized because their first byte is 0xc0 or higher, so typed transactions use 0x00 to 0x7f. Reserving 0x40-0x7f hands half of that space to rollups.
  • Libraries that decode transactions across many chains benefit most: a type byte in the RIP range signals an L2-specific format, so the decoder should look up the rollup's own definition rather than assume an L1 meaning.
  • If you build a rollup-specific transaction type, coordinate through the RIP process to avoid clashing with other L2s.

#transaction-types #rollups #rip #meta #stagnant

Details

Authors
Carl Beekhuizen (@carlbeek), Yoav Weiss (@yoavw), Ansgar Dietrichs (@adietrichs)
Status
Stagnant
Type
Meta
Created
2024-11-04
Requires

Machine-readable: Markdown · JSON