EIP-6493 SSZ transaction signature scheme

No call decision · EVM & execution · EIP status Draft · created 2023-02-24

Defines a signature scheme for native transactions built in SSZ format from the start, rather than converted from RLP. The signing target is computed using a Merkle tree based hash.

Why it is needed

Ethereum's execution layer transactions have so far been encoded using RLP (Recursive Length Prefix), an older serialization format, and signed by hashing the entire byte sequence with keccak256. EIP-6404 introduced a way to represent these RLP transactions in SSZ (Simple Serialize) format, but the signature itself is still based on RLP, leaving a conversion step in place. This EIP defines a signature scheme for native transactions signed directly in SSZ from the outset, further reducing the need for conversion. According to the source text, this approach reduces hash computation overhead, allows a transaction identifier (tx_hash) commitment to be verified on chain, and opens up the forward compatibility benefits of SSZ ProgressiveContainer, a structure that makes it easy to add fields later.

What changes

Today

After EIP-6493

Who is affected

In depth

Signature hash computation: sig_hash and auth_hash

Native SSZ transactions are based on EIP-6404's TransactionPayload and emit an EIP-6466 Receipt. To distinguish them from transactions converted from RLP, native SSZ transaction payloads do not have an RLP TransactionType field. The signature hash is computed based on hash_tree_root. Specifically, sig_hash is the hash_tree_root of an ExecutionSigningData container whose object_root is payload.hash_tree_root() and whose domain_type is DOMAIN_TX_SSZ. For authorization, auth_hash is produced using the same structure but with DOMAIN_AUTH_SSZ. DOMAIN_TX_SSZ is DomainType('0x01000008'), and DOMAIN_AUTH_SSZ is DomainType('0x02000008'). The domain type is mixed in so that each signature type uniquely identifies its underlying specification and avoids hash collisions. When a vendor-defined network signs custom transaction or authorization types, it must use a different DomainType.

Four native transaction payloads

New TransactionPayload definitions are introduced. BasicTransactionPayload and CreateTransactionPayload share the features of EIP-1559 fee market transactions. BlobTransactionPayload shares the features of EIP-4844 blob transactions, and SetCodeTransactionPayload shares the features of EIP-7702 set-code transactions. All are defined as ProgressiveContainer, with common fields chain_id(ChainId), nonce(uint64), max_fees_per_gas, gas(GasAmount), value(uint256), input_(ProgressiveByteList), access_list(ProgressiveList[AccessTuple]), and max_priority_fees_per_gas. Basic and SetCode have a to(ExecutionAddress) field, while Create has no to field. Blob has max_fees_per_gas of type BlobFeesPerGas and adds blob_versioned_hashes(ProgressiveList[VersionedHash]). SetCode adds authorization_list(ProgressiveList[SetCodeAuthorization]).

Native SSZ authorization types

A native SSZ type is also introduced for EIP-7702 style set-code authorizations. ReplayableBasicAuthorizationPayload holds only address(ExecutionAddress) and nonce(uint64), while BasicAuthorizationPayload adds chain_id(ChainId) to that. SetCodeAuthorizationPayload is defined as a CompatibleUnion that accommodates both the existing RLP family (0x01: RlpReplayableBasicAuthorizationPayload, 0x02: RlpBasicAuthorizationPayload) and the new native family (0x11: ReplayableBasicAuthorizationPayload, 0x12: BasicAuthorizationPayload). The SetCodeAuthorization container consists of this payload and a signature(ExecutionSignature).

Extending the TransactionPayload union

EIP-6404's helpers are updated to support native SSZ transactions. TransactionPayload is a CompatibleUnion that, in addition to the existing RLP-converted family from 0x01 through 0x0a (each variant of legacy, access list, 1559 family, blob, and set-code), now adds the native family 0x11: BasicTransactionPayload, 0x12: CreateTransactionPayload, 0x13: BlobTransactionPayload, and 0x14: SetCodeTransactionPayload.

JSON-RPC representation and unique identifier

Some JSON-RPC endpoints, such as eth_getTransactionByHash, display an EIP-2718 envelope type prefix in the type field. When representing native SSZ transactions in such endpoints, SSZ_TX_TYPE, i.e. TransactionType(0x1f), SHOULD be shown as the type. Omitting type is NOT RECOMMENDED, because some client applications may mistake the omission for an untyped LegacyTransaction. The unique RPC identifier tx_hash for native SSZ transactions is defined to match the tx_root value from EIP-6404.

Security considerations regarding hash collisions

SSZ signatures MUST NOT collide with RLP transaction and message hashes. RLP messages are hashed with keccak256, while all SSZ objects are hashed with SHA256. Both algorithms are considered cryptographically secure and are based on fundamentally different approaches, which minimizes the risk of hash collisions between the two algorithms. In addition, RLP messages are hashed linearly over the serialized result, while SSZ objects are hashed using a recursive Merkle tree, so the difference in approach further reduces collision risk. In terms of backward compatibility, the new signature scheme is used only for native SSZ transactions and is represented by a unique EIP-2718 envelope type prefix (SSZ_TX_TYPE) distinct from existing RLP transactions.

Current status: Draft

This EIP is in Draft status. The type definitions, constant values, and union key assignments in the specification may change during discussion. There is no record in the provided materials of a core developer call decision to include this in a specific fork.

Original EIP · ← EIPs