IntersectMBO / IntersectMBO/ouroboros-consensus
tx-submission: encode GenTxId as a bare hash on the wire (drop the era tag)
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
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.
Contributor guide
Research direction
Start by tracing the named dispatchEncoder and encodeNS entry points in consensus, then inspect the ouroboros-network tx-submission code and its CDDL specification. Review the tx_undecision product id for context. Done means agreement on the protocol change, a new node-to-node version, matching CDDL, and cross-implementation support for the bare hash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- blockchain, distributed-systems, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100