diff options
author | glozow <gloriajzhao@gmail.com> | 2022-07-19 09:52:55 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2022-08-04 16:56:33 +0100 |
commit | 1dc03dda05e9dce128e57f05bb7b1bb02b3cfb9e (patch) | |
tree | 6fa52885a336c558b8102b40294c936449e18739 /src/policy/rbf.cpp | |
parent | 32024d40f03fbf47c64d814fa5f2c2a73ec14cb7 (diff) |
[doc] remove non-signaling mentions of BIP125
Our RBF policy is different from the rules specified in BIP125. For
example, the BIP does not mention Rule 6, and our Rule 4 uses the
(configurable) incremental relay feerate (distinct from the
minimum relay feerate). Those interested in our policy should refer to
doc/policy/mempool-replacements.md instead. These rules may also
continue to diverge with package RBF and other RBF improvements. Keep
references to the BIP125 signaling wrt sequence numbers, since that is
still correct and widely used. It is helpful to refer to this as "BIP125
signaling" since it is unambiguous and succint, especially if we have
multiple ways to signal replaceability in the future.
The rule numbers in doc/policy/mempool-replacements.md correspond
largely to those of BIP 125, so we can still refer to them like "Rule 5."
Diffstat (limited to 'src/policy/rbf.cpp')
-rw-r--r-- | src/policy/rbf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp index d15946de21..6098caced9 100644 --- a/src/policy/rbf.cpp +++ b/src/policy/rbf.cpp @@ -65,7 +65,7 @@ std::optional<std::string> GetEntriesForConflicts(const CTransaction& tx, uint64_t nConflictingCount = 0; for (const auto& mi : iters_conflicting) { nConflictingCount += mi->GetCountWithDescendants(); - // BIP125 Rule #5: don't consider replacing more than MAX_REPLACEMENT_CANDIDATES + // Rule #5: don't consider replacing more than MAX_REPLACEMENT_CANDIDATES // entries from the mempool. This potentially overestimates the number of actual // descendants (i.e. if multiple conflicts share a descendant, it will be counted multiple // times), but we just want to be conservative to avoid doing too much work. @@ -96,7 +96,7 @@ std::optional<std::string> HasNoNewUnconfirmed(const CTransaction& tx, } for (unsigned int j = 0; j < tx.vin.size(); j++) { - // BIP125 Rule #2: We don't want to accept replacements that require low feerate junk to be + // Rule #2: We don't want to accept replacements that require low feerate junk to be // mined first. Ideally we'd keep track of the ancestor feerates and make the decision // based on that, but for now requiring all new inputs to be confirmed works. // @@ -162,7 +162,7 @@ std::optional<std::string> PaysForRBF(CAmount original_fees, CFeeRate relay_fee, const uint256& txid) { - // BIP125 Rule #3: The replacement fees must be greater than or equal to fees of the + // Rule #3: The replacement fees must be greater than or equal to fees of the // transactions it replaces, otherwise the bandwidth used by those conflicting transactions // would not be paid for. if (replacement_fees < original_fees) { @@ -170,7 +170,7 @@ std::optional<std::string> PaysForRBF(CAmount original_fees, txid.ToString(), FormatMoney(replacement_fees), FormatMoney(original_fees)); } - // BIP125 Rule #4: The new transaction must pay for its own bandwidth. Otherwise, we have a DoS + // Rule #4: The new transaction must pay for its own bandwidth. Otherwise, we have a DoS // vector where attackers can cause a transaction to be replaced (and relayed) repeatedly by // increasing the fee by tiny amounts. CAmount additional_fees = replacement_fees - original_fees; |