Transaction Format Options
// RLP multi-pass
3 || rlp([nonce, gasPrice, gasLimit, to, value, data, access_list, sendrV, senderR, senderS])
// RLP single-pass
3 || rlp([[senderV, senderR, senderS], rlp([3, nonce, gasPrice, gasLimit, to, value, data, access_list])])
// SSZ deduped
ssz([3, nonce, gasPrice, gasLimit, to, value, data, access_list]) || ssz([sendrV, senderR, senderS])
// SSZ duped
3 || senderV || senderR || senderS, ssz([3, nonce, gasPrice, gasLimit, to, value, data, access_list])
- RLP Multi-Pass
- Advantages
- No new encoding format
- No data duplication
- Disadvantages
- Requires an RLP encoder and decoder to validate
- Validation has decode-split-encode-validate flow
- RLP Single-Pass
- Advantages
- No new encoding format
- Can validate signature without needing an RLP encoder
- Supports decode-validate flow
- Disadvantages
- Duplicates the transaction type byte
- Requires RLP decoder to validate
- SSZ Deduped
- Advantages
- No data duplication
- Can validate signature without needing an SSZ encoder
- Supports decode-validate flow
- Disadvantages
- Requires SSZ encoder for creating
- Requires SSZ decoder for validating
- Requires retaining access to the leading type byte when processing (or re-inserting it)
- SSZ Duped
- Advantages
- Can validate without an SSZ encoder
- Can validate without an SSZ decoder
- Supports fixed offset extraction of signature
- Supports pluck-validate flow
- Disadvantages
- Requires SSZ encoder for creating
- Duplicates the transaction byte