mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-27 01:51:12 +02:00
relax child-with-unconfirmed-parents rule
This rule was originally introduced along with a very early proposal for package relay as a way to verify that the "correct" child-with-unconfirmed-parents package was provided for a transaction, where correctness was defined as all of the transactions unconfirmed parents. However, we are not planning to introduce a protocol where peers would be asked to send these packages. This rule has downsides: if a transaction has multiple parents but only 1 that requires package CPFP to be accepted, the current rule prevents us from accepting that package. Even if the other parents are already in mempool, the p2p logic will only submit the 1p1c package, which fails this check. See the test in p2p_1p1c_network.py
This commit is contained in:
@@ -8,11 +8,9 @@ Graph (a directed edge exists between a transaction that spends the output of an
|
||||
For every transaction `t` in a **topologically sorted** package, if any of its parents are present
|
||||
in the package, they appear somewhere in the list before `t`.
|
||||
|
||||
A **child-with-unconfirmed-parents** package is a topologically sorted package that consists of
|
||||
exactly one child and all of its unconfirmed parents (no other transactions may be present).
|
||||
The last transaction in the package is the child, and its package can be canonically defined based
|
||||
on the current state: each of its inputs must be available in the UTXO set as of the current chain
|
||||
tip or some preceding transaction in the package.
|
||||
A **child-with-parents** package is a topologically sorted package that consists of exactly one child and at least one
|
||||
of its unconfirmed parents. Not all unconfirmed parents need to be present but no other transactions may be present; the
|
||||
parent of a parent should not be in this package (unless this "grandparent" is also a direct parent of the child).
|
||||
|
||||
## Package Mempool Acceptance Rules
|
||||
|
||||
@@ -73,7 +71,7 @@ The following rules are enforced for all packages:
|
||||
The following rules are only enforced for packages to be submitted to the mempool (not
|
||||
enforced for test accepts):
|
||||
|
||||
* Packages must be child-with-unconfirmed-parents packages. This also means packages must contain at
|
||||
* Packages must be child-with-parents packages. This also means packages must contain at
|
||||
least 1 transaction. (#31096)
|
||||
|
||||
- *Rationale*: This allows for fee-bumping by CPFP. Allowing multiple parents makes it possible
|
||||
|
Reference in New Issue
Block a user