EIP-6493 · Draft · Core · 2023-02-24
EIP-6493: SSZ transaction signature scheme
Draft signature scheme for transactions that are born in SSZ format: the signing hash is an SSZ hash_tree_root mixed with a domain type, removing RLP from the signing path entirely.
What problem does it solve?
Ethereum's execution layer encodes transactions in RLP and signs keccak256 of that encoding. The consensus layer uses SSZ, whose hash_tree_root lets you prove a single field with a short Merkle proof. EIP-6404 proposes representing transactions in SSZ by converting existing RLP transactions, but those still have RLP signatures, so clients keep converting back and forth.
EIP-6493 defines how to sign native SSZ transactions directly, so new transactions can skip RLP altogether and benefit from the forward-compatible ProgressiveContainer layout.
How it works
Signing hash. The thing a wallet signs is the SSZ root of a tiny wrapper containing the payload's root and a domain:
| Constant | Value | Used for |
|---|---|---|
DOMAIN_TX_SSZ |
DomainType('0x01000008') |
native SSZ transactions (sig_hash) |
DOMAIN_AUTH_SSZ |
DomainType('0x02000008') |
native SSZ set-code authorizations (auth_hash) |
The domain keeps transaction and authorization signatures from colliding. Custom networks must pick their own DomainType.
Native payload types. Native SSZ transactions are told apart from converted ones by omitting the RLP TransactionType field. New variants are added to the EIP-6404 TransactionPayload union:
| Selector | Payload | Mirrors |
|---|---|---|
0x11 |
BasicTransactionPayload |
EIP-1559 call |
0x12 |
CreateTransactionPayload |
EIP-1559 contract creation |
0x13 |
BlobTransactionPayload |
EIP-4844 blob tx |
0x14 |
SetCodeTransactionPayload |
EIP-7702 set-code tx, with native SSZ authorizations (0x11 replayable, 0x12 chain-bound) |
Selectors 0x01–0x0a remain for RLP-converted transactions.
RPC. Endpoints that report an EIP-2718 type should report 0x1f (SSZ_TX_TYPE) for native SSZ transactions. The transaction hash (tx_hash) equals the EIP-6404 tx_root.
Receipts follow EIP-6466.
Sample code
Signing-hash computation, from the spec (Python, consensus-spec style):
DOMAIN_TX_SSZ = DomainType('0x01000008')
DOMAIN_AUTH_SSZ = DomainType('0x02000008')
class ExecutionSigningData(Container):
object_root: Root
domain_type: DomainType
def compute_ssz_sig_hash(payload: SszTransactionPayload) -> Hash32:
return Hash32(ExecutionSigningData(
object_root=payload.hash_tree_root(),
domain_type=DOMAIN_TX_SSZ,
).hash_tree_root())
# The wallet then produces a secp256k1 signature over this 32-byte hash,
# just as it signs the keccak256 hash of an RLP transaction today.
Things to know
- Status is Draft. It depends on EIP-6404 and EIP-6466, which are also drafts, and is not scheduled for any upgrade. Field layouts and constants may change.
- SSZ hashing uses SHA-256 in a Merkle tree, while RLP signing uses linear keccak256. The spec relies on these being fundamentally different to rule out collisions between SSZ and RLP signing hashes.
- Wallets and hardware signers would need new code paths to display and sign SSZ payloads; existing RLP transaction types keep working unchanged.
- The main benefits are less hashing overhead, on-chain availability of
tx_hashcommitments, and a format that can grow new optional fields without new type numbers.