Bitcoin CPFP Carve-Out: Ancestor Limits, Shared Outputs, and Pinning
Child Pays for Parent (CPFP) lets someone who can spend an unconfirmed output attach a higher-fee child transaction. Miners may prefer the combined ancestor package when its effective feerate is competitive. CPFP does not modify the original parent transaction; it spends one of its outputs.
The ancestor and descendant limit problem
Bitcoin Core mempool policy constrains the number and total size of unconfirmed ancestors and descendants. These limits prevent individual chains of transactions from consuming disproportionate memory and validation work. However, they can also obstruct fee bumping when an adversary uses up the available descendant allowance before the honest participant can attach a fee-paying child.
This is one form of transaction pinning: the attacker exploits relay-policy constraints to make an otherwise reasonable fee bump difficult to propagate. It is especially relevant to protocols where different participants may create transactions spending shared or prearranged outputs.
What the CPFP carve-out did
The historical CPFP carve-out made a narrow exception to the descendant limits for a small additional child in certain circumstances. Its purpose was to preserve one opportunity for an honest participant to fee-bump a shared parent even when the ordinary descendant count was exhausted. The exception was intentionally limited; it did not mean that every child could bypass all ancestor or descendant restrictions.
This policy was an engineering mitigation, not a consensus rule. Its availability depends on Bitcoin Core version and policy configuration. Newer relay designs, including limited-topology transaction policy, aim to avoid depending on this particular exception. Developers must not assume that historical carve-out behavior is available on every current node.
Why carve-out was not a complete solution
A counterparty may still influence fees, spend a shared output, create conflicts, or exploit the structure of a transaction chain. An exception based on a small child and narrowly defined topology cannot solve every pinning strategy. It also does not make zero-confirmation payments final.
For wallets and protocols, a safer design begins with explicit fee-bumping paths, bounded transaction topology, clear ownership of fee-paying outputs, and tests against the actual node version. If a protocol depends on a carve-out, document that dependency and its compatibility limits.
Practical test strategy
Use a local regtest node to construct a parent, descendants that approach policy limits, and a proposed CPFP child. Inspect getmempoolentry, testmempoolaccept, and the relevant RPC help. Repeat with the software version you plan to deploy, rather than treating a historical policy description as a permanent network guarantee.
Primary references
Bitcoin Core policy documentation: https://bitcoincore.org/en/doc/
Bitcoin Core source, policy and mempool validation: https://github.com/bitcoin/bitcoin/tree/master/src/policy
Bitcoin Core source, validation: https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp
