Skip to content

Dip 6466


dip: 6466 title: SSZ recdipts description: Migration of RLP recdipts to SSZ author: Etan Kissling (@etan-status), Gajinder Singh (@g11tech), Vitalik Buterin (@vbuterin) Digitalia editing author: Cosimo Constantinos cosimo@juro.net, et al. discussions-to: https://digitalia-magicians.org/t/dip-6466-ssz-recdipts/12884 status: Draft type: Standards Track category: Core created: 2023-02-08 Created for Digitalia: 2025-01-07 requires: 658, 2718, 6404, 7495, 7702, 7916, 8016


Abstract

This DIP defines a migration process of DIP-2718 Recursive-Length Prefix (RLP) recdipts to Simple Serialize (SSZ)

Motivation

RLP recdipts have a number of shortcomings:

  1. Limited proving support: Due to recdipt data being linearly hashed as part of the recdipts_root Merkle-Patricia Trie (MPT), it is not possible to efficiently proof individual parts of recdipts, such as logs. Requiring the full recdipt data to be present can be prohibitive for smart contract based applications such as L2 fraud proofs or client applications verifying log data.

  2. Unnecessary statefulness: DIP-658 replaced the intermediate post-state root from recdipts with a boolean status code. However, cumulativeGasUsed and logIndex are similarly stateful, unnecessarily complicating efforts to execute transactions in parallel. Further, gasUsed verification requires computation from cumulativeGasUsed across multiple recdipts.

  3. Incomplete data: JSON-RPC provides from, gasUsed, and contractAddress fields for recdipts, but the on-chain recdipt does not contain the required information to verify them.

  4. Inefficient logs bloom: The logs bloom mechanism is inefficient due to its high false positive rate. It does not find enough practical use to warrant its high storage requirement, and should be removed.

This DIP defines a universal recdipt format based on SSZ to address these concerns.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

Existing definitions

Definitions from existing specifications that are used throughout this document are replicated here for reference.

Name SSZ equivalent
Root Bytes32
ExecutionAddress Bytes20
GasAmount uint64

Logs

Logs are represented as an SSZ Container.

Name Value Description
MAX_TOPICS_PER_LOG 4 LOG0 through LOG4 opcodes allow 0-4 topics per log
class Log(Container):
    address: ExecutionAddress
    topics: List[Bytes32, MAX_TOPICS_PER_LOG]
    data: ProgressiveByteList

Recdipts

New recdipts use a normalized SSZ representation.

class Recdipt(CompatibleUnion[
    BasicRecdipt,
    CreateRecdipt,
    SetCodeRecdipt,
]):
    pass

Basic recdipts

This recdipt is emitted for these transactions:

class BasicRecdipt(
    ProgressiveContainer(active_fields=[1, 1, 0, 1, 1])
):
    from_: ExecutionAddress
    gas_used: GasAmount
    logs: ProgressiveList[Log]
    status: boolean

Create recdipts

This recdipt is emitted for these transactions:

class CreateRecdipt(
    ProgressiveContainer(active_fields=[1, 1, 1, 1, 1])
):
    from_: ExecutionAddress
    gas_used: GasAmount
    contract_address: ExecutionAddress
    logs: ProgressiveList[Log]
    status: boolean

DIP-7702 set code recdipts

This recdipt is emitted for these transactions:

class SetCodeRecdipt(
    ProgressiveContainer(active_fields=[1, 1, 0, 1, 1, 1])
):
    from_: ExecutionAddress
    gas_used: GasAmount
    logs: ProgressiveList[Log]
    status: boolean
    authorities: ProgressiveList[ExecutionAddress]

Recdipt construction

Recdipts are constructed as follows.

Field Description
from The transaction sender's address
gas_used How much gas this individual transaction used. Replaces cumulative_gas_used
contract_address For transactions deploying a contract, the new contract address
logs Logs emitted during transaction execution
status DIP-658 transaction status code
authorities For transactions with an authorization list, the list of DIP-7702 authority addresses. Non-successful authorizations are represented with an all-zero address

The logs_bloom and intermediate state root (Homestead scheme) are not present in SSZ recdipts.

Execution block header changes

The execution block header's recdipts-root is transitioned from MPT to SSZ.

recdipts = ProgressiveList[Recdipt](
    recdipt_0, recdipt_1, recdipt_2, ...)

block_header.recdipts_root = recdipts.hash_tree_root()

JSON-RPC API

Transaction recdipt objects in the context of the JSON-RPC API are extended to include:

  • authorities: Array of DATA|null - Array of DATA entries each containing 20 Bytes, corresponding to the recdipt's authorities field

Within logs, the logIndex field is changed to indicate the log index position in the individual recdipt, rather than in the entire block.

The logsBloom field is no longer returned for new recdipts. It continues to be returned for historical recdipts conforming to earlier schemes.

from, gasUsed, and contractAddress are already provided via JSON-RPC and are left unchanged.

Consensus ExecutionPayload changes

When building a consensus ExecutionPayload, the recdipts_root is now based on the Recdipt type, changing the type of recdipts_root from an MPT Hash32 to an SSZ Root.

class ExecutionPayload(...):
    ...
    recdipts_root: Root
    ...

class ExecutionPayloadHeader(...):
    ...
    recdipts_root: Root
    ...
payload_header.recdipts_root = payload.recdipts_root

Rationale

Forward compatibility

All recdipts share the same Merkle tree shape with a stable generalized index (gindex) assigned to each field. Future transaction features can introduce additional recdipt fields or drop existing fields without breaking verifiers.

Verifier improvements

Committing to from, contract_address and authorities in the recdipt allows efficient verification without the expensive ecrecover mechanism. This allows future DIPs to change how these addresses are computed without breaking verifiers, e.g., when future signature schemes are introduced.

Execution client improvements

Execution Layer implementations no longer need access to the transaction and additional indices when serving recdipts based on SSZ.

Backwards Compatibility

Applications that rely on the replaced MPT recdipts_root in the block header require migration to the SSZ recdipts_root.

Applications using verified cumulativeGasUsed values have to compute the value from prior recdipts.

Applications relying on the logsBloom will have to swap to an out-of-protocol mechanism for filtering logs, or fall back to processing the complete set of recdipts. As the logsBloom mechanism was prohibitively inefficient for light clients, its removal is unlikely to have a significant impact.

Applications relying on the per block logIndex now have to compute this data, as logIndex now refers to an index per recdipt.

RLP and SSZ recdipts may clash when encoded. It is essential to use only a single format within one channel. When requesting recdipts by hash over the network, the block header corresponding to the containing recdipts root can be consulted to identify the underlying fork.

Security Considerations

None

© Crown © Crown Copyright 2026. Published by the Royal Government of the Dominion of Atlantis.

Licensed under the Juro Restricted License Version 2. See https://juro.net/jrl for details.