The node-to-node encoding of a hard-fork GenTxId prefixes an era index (dispatchEncoder/encodeNS) before the era's txid.
For a GenTxId that tag carries nothing the receiver uses: across every Cardano era the id is a 32-byte hash, and a tx's era is recovered from its body when fetched.
(Unlike GenTx, headers, and blocks, which have era-specific formats and do need the tag.)
A bare-hash txid on the wire would shrink tx-submission messages and let the consensus id become a plain hash, removing the OneEraGenTxId/Maybe bookkeeping that exists only to reconstruct the tag for the wire (see the product id on the js/karknu/tx_undecision branch).
This is a protocol change: new node-to-node version, tx-submission CDDL, and cross-implementation agreement.
It touches ouroboros-network and the CDDL spec, not just the encoder in consensus.
Filed separately from #2003, which fixes the Eq/Ord allocation in consensus without touching the wire.
The node-to-node encoding of a hard-fork
GenTxIdprefixes an era index (dispatchEncoder/encodeNS) before the era's txid.For a
GenTxIdthat tag carries nothing the receiver uses: across every Cardano era the id is a 32-byte hash, and a tx's era is recovered from its body when fetched.(Unlike
GenTx, headers, and blocks, which have era-specific formats and do need the tag.)A bare-hash txid on the wire would shrink tx-submission messages and let the consensus id become a plain hash, removing the
OneEraGenTxId/Maybebookkeeping that exists only to reconstruct the tag for the wire (see the product id on thejs/karknu/tx_undecisionbranch).This is a protocol change: new node-to-node version, tx-submission CDDL, and cross-implementation agreement.
It touches
ouroboros-networkand the CDDL spec, not just the encoder in consensus.Filed separately from #2003, which fixes the
Eq/Ordallocation in consensus without touching the wire.