-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: Bitcoin Core v0.26 backports (batch 1) #7237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5288a4a
6bbb62c
162f2eb
0d8920c
adf070e
61b8017
13a7174
b89e9a6
604b3ac
ee4b548
443ae03
f271bbe
94f3c51
e8ff59d
a2a9d8c
c425124
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,24 +68,37 @@ test accepts): | |
| If any transactions in the package are already in the mempool, they are not submitted again | ||
| ("deduplicated") and are thus excluded from this calculation. | ||
|
|
||
| To meet the two feerate requirements of a mempool, i.e., the pre-configured minimum relay feerate | ||
| (`minRelayTxFee`) and the dynamic mempool minimum feerate, the total package feerate is used instead | ||
| of the individual feerate. The individual transactions are allowed to be below the feerate | ||
| requirements if the package meets the feerate requirements. For example, the parent(s) in the | ||
| package can pay no fees but be paid for by the child. | ||
|
|
||
| *Rationale*: This can be thought of as "CPFP within a package," solving the issue of a parent not | ||
| meeting minimum fees on its own. This would allow contracting applications to adjust their fees at | ||
| broadcast time instead of overshooting or risking becoming stuck or pinned. | ||
|
|
||
| *Rationale*: It would be incorrect to use the fees of transactions that are already in the mempool, as | ||
| we do not want a transaction's fees to be double-counted. | ||
| To meet the dynamic mempool minimum feerate, i.e., the feerate determined by the transactions | ||
| evicted when the mempool reaches capacity (not the static minimum relay feerate), the total package | ||
| feerate instead of individual feerate can be used. For example, if the mempool minimum feerate is | ||
| 5sat/vB and a 1sat/vB parent transaction has a high-feerate child, it may be accepted if | ||
| submitted as a package. | ||
|
|
||
| *Rationale*: This can be thought of as "CPFP within a package," solving the issue of a presigned | ||
| transaction (i.e. in which a replacement transaction with a higher fee cannot be signed) being | ||
| rejected from the mempool when transaction volume is high and the mempool minimum feerate rises. | ||
|
|
||
| Note: Package feerate cannot be used to meet the minimum relay feerate (`-minrelaytxfee`) | ||
| requirement. For example, if the mempool minimum feerate is 5sat/vB and the minimum relay feerate is | ||
| set to 5satvB, a 1sat/vB parent transaction with a high-feerate child will not be accepted, even if | ||
| submitted as a package. | ||
|
|
||
| *Rationale*: Avoid situations in which the mempool contains non-bumped transactions below min relay | ||
| feerate (which we consider to have pay 0 fees and thus receiving free relay). While package | ||
| submission would ensure these transactions are bumped at the time of entry, it is not guaranteed | ||
| that the transaction will always be bumped. For example, a later transaction could replace the | ||
| fee-bumping child without still bumping the parent. These no-longer-bumped transactions should be | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: we don't have fee-bumping/tx replacement (same for a comment in |
||
| removed during a replacement, but we do not have a DoS-resistant way of removing them or enforcing a | ||
| limit on their quantity. Instead, prevent their entry into the mempool. | ||
|
|
||
| Implementation Note: Transactions within a package are always validated individually first, and | ||
| package validation is used for the transactions that failed. Since package feerate is only | ||
| calculated using transactions that are not in the mempool, this implementation detail affects the | ||
| outcome of package validation. | ||
|
|
||
| *Rationale*: It would be incorrect to use the fees of transactions that are already in the mempool, as | ||
| we do not want a transaction's fees to be double-counted. | ||
|
|
||
| *Rationale*: We must not allow a low-feerate child to prevent its parent from being accepted; fees | ||
| of children should not negatively impact their parents, since they are not necessary for the parents | ||
| to be mined. More generally, if transaction B is not needed in order for transaction A to be mined, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| RPC | ||
| --- | ||
|
|
||
| - The `listdescriptors`, `decodepsbt` and similar RPC methods now show `h` rather than apostrophe (`'`) to indicate | ||
| hardened derivation. This does not apply when using the `private` parameter, which | ||
| matches the marker used when descriptor was generated or imported. Newly created | ||
| wallets use `h`. This change makes it easier to handle descriptor strings manually. | ||
| E.g. the `importdescriptors` RPC call is easiest to use `h` as the marker: `'["desc": ".../0h/..."]'`. | ||
| With this change `listdescriptors` will use `h`, so you can copy-paste the result, | ||
| without having to add escape characters or switch `'` to 'h' manually. | ||
| Note that this changes the descriptor checksum. | ||
| For legacy wallets the `hdkeypath` field in `getaddressinfo` is unchanged, | ||
| nor is the serialization format of wallet dumps. (#26076) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // Copyright (c) 2022 The Bitcoin Core developers | ||
| // Distributed under the MIT software license, see the accompanying | ||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| #ifndef BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H | ||
| #define BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H | ||
|
|
||
| class CChainParams; | ||
|
|
||
| namespace kernel { | ||
|
|
||
| /** | ||
| * An options struct for `BlockManager`, more ergonomically referred to as | ||
| * `BlockManager::Options` due to the using-declaration in `BlockManager`. | ||
| */ | ||
| struct BlockManagerOpts { | ||
| const CChainParams& chainparams; | ||
| }; | ||
|
Comment on lines
+12
to
+18
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 Nitpick: Soft prerequisite: bitcoin#25781 (BlockManager globals removal) Upstream source: ['claude', 'codex'] |
||
|
|
||
| } // namespace kernel | ||
|
|
||
| #endif // BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix unit/wording typos in the new feerate rationale text.
There’s a unit typo (
5satvB) and a grammar typo (to have pay) that reduce clarity in a policy-critical section.✏️ Proposed doc fix
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~83-~83: Ensure spelling is correct
Context: ...nimum relay feerate is set to 5satvB, a 1sat/vB parent transaction with a high-feera...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~86-~86: Ensure spelling is correct
Context: ... non-bumped transactions below min relay feerate (which we consider to have pay 0 fees a...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents