Try it Live
Run Transaction examples in the interactive playground
Transaction Hashing
Keccak256 hashing for transaction identification and signing.hash
Compute transaction hash (keccak256 of serialized transaction).getSigningHash
Get hash that should be signed (excludes signature fields).Hash vs Signing Hash
The difference betweenhash and getSigningHash:
Transaction Hash
hash(tx) computes hash of complete transaction including signature:
- Block transactions
- Transaction receipts
- eth_getTransactionByHash RPC
Signing Hash
getSigningHash(tx) computes hash without signature fields:
- Creating signatures
- Verifying signatures
- Recovering sender address
Type-Specific Hashing
Transaction.Legacy.hash
Transaction.Legacy.getSigningHash
Transaction.EIP1559.hash
Transaction.EIP1559.getSigningHash
Hash Usage Patterns
Transaction Identification
Block Transaction List
Transaction Pool
Signing Workflow
Signature Verification
Legacy Transaction Signing Hash
Legacy transactions have special signing hash logic for EIP-155:EIP-4844 Signing Hash
EIP-4844 blob transactions exclude blob versioned hashes from signing hash:Performance Considerations
Hashing is cryptographically expensive (keccak256):Implementation Status
| Type | hash | getSigningHash | Status |
|---|---|---|---|
| Legacy | Partial | Partial | In progress |
| EIP-2930 | Partial | Partial | In progress |
| EIP-1559 | Partial | Partial | In progress |
| EIP-4844 | Partial | Partial | In progress |
| EIP-7702 | Partial | Partial | In progress |
See Also
- Serialization - RLP encode and decode transactions
- Signing - Signature verification and sender recovery
- Keccak256 - 32-byte hash primitive
- Secp256k1 - ECDSA signature operations

