BOMBARCHIVE
Explore

A living reference collection. Written in the wiki, preserved in Git.

The archiveBitcoin

Old revision: BIP 339

OshiB: document BIP 339 wtxid relay origins, handshake and release history

BIP 339, WTXID-based transaction relay, specifies how connected Bitcoin nodes can announce and request unconfirmed transactions by their witness transaction identifier (wtxid) instead of relying only on the older txid. Authored by Suhas Daftuar, it was assigned the date 3 February 2020, implemented in Bitcoin Core during 2020, and first shipped in Core 0.21.0 on 14 January 2021. It changes peer-to-peer transaction relay, not transaction validity or SegWit consensus rules. Maintained BIP — primary specification · Merged implementation · Contemporary release notes

Why the identifier mattered

Under Segregated Witness, the familiar txid is computed without witness data. A second identifier, wtxid, commits to the serialized witness as well. For a transaction without witness data, BIP 141 defines the wtxid to equal its txid. The difference becomes relevant when there is witness data to consider. BIP 141 — witness transaction identifier

Before BIP 339, transaction announcements over inv and requests over getdata ordinarily referred to txid, even after SegWit transactions had become part of Bitcoin. That left a node unable to infer from a repeated txid whether the newly offered transaction had a different witness. BIP motivation

This forced an awkward choice. If a node remembered a rejected SegWit transaction by txid and refused to request that identifier again, an attacker might present a bad-witness version first and prevent the node from later obtaining a valid version. If the node instead avoided remembering rejected SegWit txids, it could repeatedly download the same unacceptable witness-bearing transaction from different peers. Daftuar's January 2020 implementation proposal explicitly described this cost and warned it could become more visible when newer transaction policies diverged from older nodes' policies. The BIP specifies identification by wtxid to distinguish those cases. Original first-party implementation rationale · Specification and rationale

The benefit must not be inflated into a claim that an invalid transaction automatically becomes valid, or that every rejected transaction can safely be discarded across future policy changes. BIP 339 changes what an announcement names. Validation and local mempool policy still determine whether a node accepts the transaction.

What the peers actually exchange

The handshake adds an empty wtxidrelay message. BIP 339 requires implementations to use peer protocol version 70016 or higher and send the capability message in response to an eligible version message, before verack. A late wtxidrelay must be ignored or treated as invalid. This is a negotiation at connection setup, not an on-chain activation signal. BIP 339 specification

A new inventory type, MSG_WTX (0x00000005), names a transaction by wtxid in inv and getdata. For getdata, it implies returning the witness-bearing serialization defined by BIP 144. After a peer has sent wtxidrelay, the recipient must announce transactions to that peer using MSG_WTX, and should use it to request announced transactions. The specification still permits a MSG_TX request where appropriate, such as retrieving a parent transaction that the peer did not recently announce. Wire specification · BIP 144 — witness serialization over P2P

Older peers can continue txid-based relay. During a mixed-version rollout, a node could hear about the same transaction through txid-relay peers and wtxid-relay peers and risk downloading it twice. The implementation PR discusses a two-second delay heuristic for requests from legacy txid-relay peers; it was presented as an engineering trade-off to evaluate, not a timing rule imposed on all clients by the BIP. Implementation discussion · Backward compatibility

The dated record

31 January 2020
Daftuar opened Bitcoin Core PR #18044, describing the problem and a possible implementation. The PR text explicitly said a separate BIP was still to be drafted. This working implementation proposal **predates** the surviving BIP repository addition.
3–5 February 2020
The maintained BIP gives **3 February** as its assigned date. On **4 February**, Daftuar linked a draft on his own BIPs branch in a comment on #18044; the Bitcoin Core PR Review Club discussed the implementation on **5 February**. The assigned date, working draft and review meeting are different records. Draft-link comment · Review Club notes
25 February 2020
Daftuar circulated *A proposal for WTXID-based transaction relay* on bitcoin-dev, linking the pre-assignment-named draft and soliciting feedback. The original message is preserved in a mailing-list mirror. A contemporary proposal is not a merged specification or software release.
23–25 June 2020
BIPs PR #933 requested an assigned number on **23 June**, explicitly referring back to February's public discussion. It merged **25 June**, adding bip-0339.mediawiki to the maintained repository with status **Draft**. First mainline file-history commit
22 July 2020
Core PR #18044 merged as commit ccef102, implementing wtxid-aware relay and compatibility handling. This is a verified merge date, **not** a claim that the network immediately adopted the feature. Direct PR record
August 2020
BIPs PR #966 merged clarification work on **20 August**. The original June wording had required both sending and receiving wtxidrelay before using MSG_WTX; the maintained text expresses the rules separately from the recipient's perspective and preserves explicit permission for some txid requests. On **14 August**, Daftuar also proposed generalizing feature-negotiation conventions, describing BIP 339 as already merged but not yet released. The BIP revision and discussion are related but distinct records.
14 January 2021
Bitcoin Core **0.21.0** was publicly announced with BIP 339 support. The contemporary release notes explicitly name #18044 and specify relay by wtxid *when negotiated*. The historical release listing dates the release to **14 January**; GitHub's separately recorded release object shows **15 January**. That object timestamp should not overwrite the public announcement date.
10 July 2024
PR #1636 moved BIP 339 from **Draft** to **Final**, with the author's short rationale that it was already in active P2P use. This is a first-party retrospective adoption claim and a documented metadata change, not a fresh activation in July 2024.
12 January 2026
A repository-wide status vocabulary change relabelled Final and Active BIPs as Deployed. The maintained BIP now reads **Deployed**; this should not be mistaken for a 2026 release milestone.

An unexpected bridge between later protocols

BIP 330 uses transaction wtxids to derive the short identifiers exchanged through its proposed reconciliation mechanism. Its sendtxrcncl signaling is specified alongside wtxidrelay negotiation, making BIP 339 an explicit compatibility foundation for the newer proposal. But the status of BIP 339 does not establish that BIP 330's full transaction-reconciliation protocol has shipped. BIP 330 specification

BIP 152 addresses a different redundancy: compact reconstruction of blocks, rather than unconfirmed transaction-announcement identifiers. Both use knowledge already shared between nodes; they are not the same message family. Bitcoin peer discovery concerns finding candidate peers, BIP 155 extends exchange of network addresses, and BIP 324 protects the transport connection. These layers can coexist without conferring consensus authority on any announcer.

For Ordinals and Bitmap readers, the boundary is also useful: a wtxid commits to transaction witness bytes, but a BIP 339 relay message is not a queryable inscription index, a Bitmap validity rule, or a proof by itself that a peer supplied a complete block. Those interpretations still depend on obtaining and checking the underlying Bitcoin data.

Source status and unresolved questions

The BIP text is direct evidence of the specified behaviour; Core's merged PR is direct evidence of an implementation merge; the release notes document a publicly shipped version. The 2024 BIP-status PR records an adoption assertion by its proposer, but supplies no network census. These source classes should not be collapsed into a single date of “activation”.

Open question
Recover the exact first public revision of Daftuar's February 2020 draft from its original branch history and compare that draft against the June repository addition. The February mailing message proves circulation; it does not prove the draft had identical wording to the later BIP.
Open question
Establish historical and current negotiated-connection proportions from a reproducible network sample, if reliable measurements exist; Core support and a BIP status label are not adoption statistics.
Open question
Trace which BIP 339 compatibility requirements were relied upon in later BIP 330 implementation experiments, and distinguish those from completed, released reconciliation behaviour.