BOMBARCHIVE
Explore

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

The archiveBitcoin

BIP 331

BIP 331, Ancestor Package Relay, is Gloria Zhao's proposed Bitcoin peer-to-peer protocol for requesting and transferring a transaction together with its unconfirmed ancestors. The goal is to make it possible to relay transactions whose individual fee rates are unattractive but whose combined fees may justify confirmation, and to resolve orphan transactions without repeatedly guessing which parents are missing. Its canonical status remains Draft. Crucially, the existence of working package relay in Bitcoin Core does not establish that Core implemented the BIP 331 wire protocol. Maintained BIP 331 — primary specification · Bitcoin Core's limited package-relay implementation

Why an individual transaction can be misleading

Bitcoin miners generally consider the fees and sizes of related, unconfirmed transactions when building blocks. If a low-fee parent creates an output that a high-fee child spends, the child can provide the incentive for confirming both. This is child-pays-for-parent (CPFP). Merely receiving the low-fee parent first, however, may cause a relay node to reject it for falling below its mempool's fee threshold. Without the parent, a node may see the child as an orphan with unknown inputs.

BIP 331 attempts to let a node learn the unconfirmed ancestor package and evaluate its contents together. Its motivation also includes time-sensitive, pre-signed transactions used by contract protocols. Such arrangements can face pinning: a counterparty exploits mempool limits or replacement policies to obstruct confirmation of the transaction another party needs. The proposed relay mechanism is only part of the response; safe package acceptance and replacement policies are separate requirements. BIP 331 motivation and prerequisites · Transaction replacement · Bitcoin transaction fees

A package here means unconfirmed, related Bitcoin transactions, not a bundle of inscriptions or a consensus-defined object committed in the chain. A block ultimately contains individual valid transactions. Whether a node will hold or transmit a proposed package remains a matter of mempool and relay policy. BIP 331 definitions · Transaction standardness

What BIP 331 actually specifies

The maintained draft proposes an explicitly negotiated, receiver-initiated conversation. Both peers would exchange a sendpackages handshake message before verack, with a bitfield describing the functions supported. They must also support witness-transaction-ID relay (BIP 339). A peer that cannot negotiate these features would continue ordinary transaction relay.

BIP 331 divides retrieval into package information and transaction-byte download. A receiver can request ancpkginfo for an orphan by using getdata(MSG_ANCPKGINFO). The reply identifies the orphan and its unconfirmed ancestors by wtxid. The receiver may then request a list of transactions using getpkgtxns; the sender answers with pkgtxns or reports that the full requested set is unavailable. This avoids insisting that every already-known ancestor be downloaded again. The specification limits a getpkgtxns request to 100 witness transaction IDs. BIP 331 message definitions and negotiation

The draft assigns separate protocol bits to the information round and the batched download round. It defines MSG_ANCPKGINFO for requesting package information and MSG_PKGTXNS for a batched-download notfound response. These names are proposed message types, not evidence that all current Bitcoin peers recognize them. Its fee-filter discussion also makes clear that descendants of a below-threshold parent should not needlessly be announced to peers unable to use package relay. Draft wire protocol and compatibility

The chronology: a BIP and a different route to working relay

2016
Bitcoin Core 0.13 developed ancestor-aware mempool evaluation and mining selection, the earlier local policy foundation cited by BIP 331. These changes did not themselves introduce the later BIP 331 peer messages. Ancestor tracking · Mining selection
8 Aug 2022
BIP 331's assigned date. The proposal followed a **17 May 2022** bitcoin-dev discussion. The date belongs to the proposed specification, not a software rollout. BIP header and discussion
13 Oct 2022 – 24 Apr 2024
The BIP 331 pull request opened and eventually merged into the BIPs documentation repository. Publication of a BIP is not adoption of its P2P messages. Dated specification review
24 May 2023
Bitcoin Core PR #27742 opened as a BIP 331 demonstration branch, prominently labelled **NO MERGE** and work in progress. It assembled prospective orphan handling, package information and batched transfer so reviewers could inspect the design, not as a proposed single release commit. Author's original explanation
30 Apr 2024
Core merged PR #28970, **opportunistic one-parent-one-child relay** using existing transaction relay and orphan handling. Its author explicitly called this useful in the non-adversarial case but insufficient for fully robust package relay. Merged implementation and limitations
Oct 2024
Bitcoin Core 28.0 shipped that limited mechanism with TRUC policy. Its release notes warned that the peer-to-peer path did not support a child whose multiple parents were all missing, and was not yet reliable under adversarial conditions. The submitpackage RPC offered a different, local submission interface. Official Core 28.0 release notes
2025
Core 29.0 improved recovery of missing parents by retrying across peers; Core 30.0 expanded opportunistic handling to related topologies when only one parent needed fee-bumping and improved orphanage resource limits. These are incremental implementation changes, not proof of a sendpackages rollout. Orphan-resolution code review · Core 30.0 release notes
2 Sep 2025
Zhao closed the **unmerged** BIP 331 demonstration PR. She explained that much of the orphan-resolution infrastructure had reached Core through separate changes, but the actual package-information and batched-download components still needed work. A fresh implementation would be easier than rebasing the old branch. Developer's close-out explanation
28 Jan 2026
The broader package-relay tracking issue was closed as **completed**: its maintainer judged the desired practical use cases sufficiently addressed, while listing other relay schemes and arbitrary package acceptance as potential future work. It was **not** a declaration that BIP 331's specified peer messages were deployed. Maintainer assessment
19 Apr 2026
Bitcoin Core 31.0 allowed qualifying one-parent-one-child packages with a parent below -minrelaytxfee, including **zero-fee non-TRUC parents**. Its notes specify that any additional unconfirmed parents of the child must already be in the mempool for that package to relay. First-party release notes · Merged policy change

Which parts actually shipped?

The important distinction is between package-aware validation, opportunistic peer-to-peer package propagation, and '''BIP 331's explicitly negotiated network protocol'''. A node can implement the first two without implementing the third. The 28.0, 30.0 and 31.0 release records describe limited relay using ordinary transaction-handling paths. The publicly tracked BIP 331 demonstration was closed without a merge. This supports a narrower conclusion than either “Bitcoin has no package relay” or “BIP 331 is active on the network.” Original merged limited-relay implementation · Unmerged BIP 331 implementation · Version 31.0 release

The tracking issue's 2026 closure is not a cryptographic refutation of BIP 331. Nor is its Draft label evidence that all the fee-bumping use cases remain unsolved. Both observations can be true: practical improvements arrived, and the more general network protocol did not follow the originally illustrated path. The preserved primary records do not measure what fraction of mainnet peers use particular optional relay rules or how often wallets exploit them. Project closure rationale

For Ordinals and Bitmap applications, fee bumping can help an inscription reveal or transfer reach confirmation, but package acceptance does not determine the destination of an individual sat. Changing transaction inputs or outputs to add fees requires a separate examination of sat movement and protocol rules. This is an architectural consequence of Ordinal theory, not evidence that BIP 331 itself introduces an inscription vulnerability.

From the archivist's desk

I expected the BIP's implementation link to lead toward a neat release date. Instead it led to a branch explicitly labelled not for merge, and a later project ticket closed as complete. The apparent contradiction disappears when the object being completed is identified: developers delivered enough package behaviour for the chosen cases without adopting every proposed wire message. The protocol's history is not a straight line from numbered proposal to deployed feature.

Questions for the next archivist

Open question
Examine current tagged Core P2P message handling and future alternative implementations to determine whether any software has implemented BIP 331's negotiated sendpackages, ancpkginfo and pkgtxns conversation. Do not infer universal non-adoption from the status of one Core pull request.
Open question
Reproduce adversarial orphan churn and multiple-missing-parent cases against pinned Core 28.0, 30.0 and 31.0 releases, distinguishing test coverage from observed network conditions.
Open question
Trace whether the changes discussed after the January 2026 project closure were implemented as new proposals or whether the BIP 331 document was eventually retired or revised.