From 4400c979a309ed03c7ed55644122622eb7def089 Mon Sep 17 00:00:00 2001 From: glozow Date: Tue, 6 Aug 2024 09:55:46 +0100 Subject: [PATCH 1/2] [doc] update documentation for new mempoolfullrbf default --- doc/bips.md | 2 +- doc/policy/mempool-replacements.md | 6 +++--- doc/policy/packages.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/bips.md b/doc/bips.md index 19a8091f551..87258fce931 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -33,7 +33,7 @@ BIPs that are implemented by Bitcoin Core: * [`BIP 111`](https://github.com/bitcoin/bips/blob/master/bip-0111.mediawiki): `NODE_BLOOM` service bit added, and enforced for all peer versions as of **v0.13.0** ([PR #6579](https://github.com/bitcoin/bitcoin/pull/6579) and [PR #6641](https://github.com/bitcoin/bitcoin/pull/6641)). * [`BIP 112`](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki): The CHECKSEQUENCEVERIFY opcode has been implemented since **v0.12.1** ([PR #7524](https://github.com/bitcoin/bitcoin/pull/7524)), and has been *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). * [`BIP 113`](https://github.com/bitcoin/bips/blob/master/bip-0113.mediawiki): Median time past lock-time calculations have been implemented since **v0.12.1** ([PR #6566](https://github.com/bitcoin/bitcoin/pull/6566)), and has been *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). -* [`BIP 125`](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee signaling partially implemented. See doc/policy/mempool-replacements.md. +* [`BIP 125`](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee partially implemented: signaling is enforced if configured. For other replacement rules, see doc/policy/mempool-replacements.md. * [`BIP 130`](https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki): direct headers announcement is negotiated with peer versions `>=70012` as of **v0.12.0** ([PR 6494](https://github.com/bitcoin/bitcoin/pull/6494)). * [`BIP 133`](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki): feefilter messages are respected and sent for peer versions `>=70013` as of **v0.13.0** ([PR 7542](https://github.com/bitcoin/bitcoin/pull/7542)). * [`BIP 141`](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki): Segregated Witness (Consensus Layer) as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)), defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)), and *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). diff --git a/doc/policy/mempool-replacements.md b/doc/policy/mempool-replacements.md index d5642eaccce..f044a0f8ad6 100644 --- a/doc/policy/mempool-replacements.md +++ b/doc/policy/mempool-replacements.md @@ -10,14 +10,12 @@ A transaction ("replacement transaction") may replace its directly conflicting t their in-mempool descendants (together, "original transactions") if, in addition to passing all other consensus and policy rules, each of the following conditions are met: -1. The directly conflicting transactions all signal replaceability explicitly. A transaction is +1. If `-mempoolfullrbf=0` (the value is 1 by default), the directly conflicting transactions all signal replaceability explicitly. A transaction is signaling BIP125 replaceability if any of its inputs have an nSequence number less than (0xffffffff - 1). A transaction also signals replaceability if its version field is set to 3. *Rationale*: See [BIP125 explanation](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki#motivation). - Use the (`-mempoolfullrbf`) configuration option to allow transaction replacement without enforcement of the - opt-in signaling rule. 2. The replacement transaction only include an unconfirmed input if that input was included in one of the directly conflicting transactions. An unconfirmed input spends an output from a @@ -80,3 +78,5 @@ This set of rules is similar but distinct from BIP125. * Full replace-by-fee enabled as a configurable mempool policy as of **v24.0** ([PR #25353](https://github.com/bitcoin/bitcoin/pull/25353)). + +* Full replace-by-fee is the default policy as of **v28.0** ([PR #30493](https://github.com/bitcoin/bitcoin/pull/30493)). diff --git a/doc/policy/packages.md b/doc/policy/packages.md index 9b321799f15..b432008d7be 100644 --- a/doc/policy/packages.md +++ b/doc/policy/packages.md @@ -38,7 +38,7 @@ The following rules are enforced for all packages: * Only limited package replacements are currently considered. (#28984) - - All direct conflicts must signal replacement (or the node must have `-mempoolfullrbf=1` set). + - If `-mempoolfullrbf=0` (the value is 1 by default), all direct conflicts must signal replacement. - Packages are 1-parent-1-child, with no in-mempool ancestors of the package. From 1f93e3c360f3da38a02fe6c01551f424a2d63dc9 Mon Sep 17 00:00:00 2001 From: glozow Date: Tue, 6 Aug 2024 15:25:28 +0100 Subject: [PATCH 2/2] add deprecation warning for mempoolfullrbf --- src/init.cpp | 2 +- src/node/mempool_args.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 085b7f976a9..ca809db4661 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -645,7 +645,7 @@ void SetupServerArgs(ArgsManager& argsman) "is of this size or less (default: %u)", MAX_OP_RETURN_RELAY), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); - argsman.AddArg("-mempoolfullrbf", strprintf("Accept transaction replace-by-fee without requiring replaceability signaling (default: %u)", DEFAULT_MEMPOOL_FULL_RBF), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); + argsman.AddArg("-mempoolfullrbf", strprintf("(DEPRECATED) Accept transaction replace-by-fee without requiring replaceability signaling (default: %u)", DEFAULT_MEMPOOL_FULL_RBF), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); argsman.AddArg("-permitbaremultisig", strprintf("Relay transactions creating non-P2SH multisig outputs (default: %u)", DEFAULT_PERMIT_BAREMULTISIG), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); argsman.AddArg("-minrelaytxfee=", strprintf("Fees (in %s/kvB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)", diff --git a/src/node/mempool_args.cpp b/src/node/mempool_args.cpp index f329affb1d8..a488c1b1498 100644 --- a/src/node/mempool_args.cpp +++ b/src/node/mempool_args.cpp @@ -93,6 +93,9 @@ util::Result ApplyArgsManOptions(const ArgsManager& argsman, const CChainP } mempool_opts.full_rbf = argsman.GetBoolArg("-mempoolfullrbf", mempool_opts.full_rbf); + if (!mempool_opts.full_rbf) { + LogInfo("Warning: mempoolfullrbf=0 set but deprecated and will be removed in a future release\n"); + } mempool_opts.persist_v1_dat = argsman.GetBoolArg("-persistmempoolv1", mempool_opts.persist_v1_dat);