Skip to content

tx-submission: encode GenTxId as a bare hash on the wire (drop the era tag) #2110

Description

@dnadales

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions