Note: this PR was superseded by #28948 (v3) and #28984 (package RBF). Also, v3 became TRUC and includes other changes, see BIP 431 for more up-to-date documentation.
See #27463 for overall package relay tracking.
This PR contains 2 projects: v3 policy and package RBF. Mailing list posts: package RBF 1 and V3 + package RBF 2. It stems from a long discussion about RBF pinning, across a mailing list thread and gist.
V3 Policy: A set of policy rules applied to transactions with their nVersion
field set to 3. Namely, it allows users to opt in to more restrictive descendant limits for shared transactions. If adopted by many nodes in the network, V3 mitigates various RBF pinning attacks. See doc/policy/version3_transactions.md for the exact rules and rationale, and these review club notes for more background and discussion.
Package RBF: In addition to allowing a child to pay for its parents within the package, also allow the child to pay for replacing the parent’s conflicts. For example, this allows LN users to replace commitment transactions existing in the mempool, simply by broadcasting their respective commitment transactions with a high-fee child. The commitment transactions can be signed with 0 fees, which means no overpaying.
FAQ: is v3 still helpful even with cluster mempool (#27677) ?
- Rule 3 pinning: This is addressed with v3 but not really with cluster mempool (descendant allowance is still too permissive).
- Package RBF and ACP pinning: This PR allows for package RBF with v3 packages. V3 has an effective “cluster limit” of 2 which makes it very cheap to calculate the mining score of a v3 transaction. With cluster mempool, which also makes it easier to calculate mining score, we could have package RBF for non-v3 transactions.
- Allowing 0fee transactions: This PR allows v3 transactions to be below minimum relay feerate, provided they are CPFP’d. This is because the simplified topology allows us to avoid situations like the ones described in #26933. With cluster mempool, we can allow this for non-v3 transactions.