Bitcoin Package Relay Explained: Ancestors, Descendants, and CPFP
A transaction package is a set of related unconfirmed transactions considered together for a policy or fee decision. Package concepts matter because a child can pay a high fee to make confirmation of its low-fee parent economically attractive.
Parent and child relationships
A child transaction spends an output created by a parent that has not yet confirmed. The child cannot confirm without the parent. The ancestor set includes unconfirmed transactions on which a transaction depends; descendants spend outputs downstream from it.
The effective package feerate is the combined fee divided by the combined virtual size of the relevant transactions. Suppose a 200-vbyte parent pays 200 sat and a 100-vbyte child pays 2,800 sat. Together they pay 3,000 sat over 300 vbytes, or 10 sat/vB. That package rate can make the pair attractive even though the parent alone pays only 1 sat/vB.
Mining selection versus network relay
Mining software may evaluate ancestor-inclusive fees when constructing blocks. Relay is a separate question: nodes enforce mempool admission, replacement, dependency, and resource limits. A package that makes economic sense to mine is not automatically accepted by every node or supported by every relay interface.
Package relay capabilities and restrictions evolve with Bitcoin Core releases. Do not assume arbitrary package shapes, unlimited ancestor chains, or universal peer support. In particular, one-parent-one-child (1P1C) package handling is a narrower capability than general unrestricted package relay.
CPFP and fee pinning
Child Pays for Parent works when someone controls an output that can be spent by a child and the combined fees are sufficient. Other descendants, policy limits, or transaction design may complicate fee bumping. An attacker can sometimes exploit these constraints to make a transaction expensive or difficult to replace or confirm; this is commonly discussed as fee pinning.
Developer implementation checklist
Calculate actual virtual sizes and total fees. Track ancestors and descendants, distinguish package acceptance from standalone transaction acceptance, and check the installed node's supported RPC and relay rules. Treat package submission success as mempool policy acceptance, not block confirmation.
Primary references
Bitcoin Core package relay design: https://github.com/bitcoin/bitcoin/tree/master/doc
BIP125 Opt-in Full Replace-by-Fee: https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki
Bitcoin Core RPC documentation: https://bitcoincore.org/en/doc/
