Skip to content

Conversation

@1440000bytes
Copy link

@1440000bytes 1440000bytes commented Jul 20, 2024

This pull request enables full rbf (mempool policy) by default. #28132 was closed recently with this comment.


Rationale:

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 20, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK instagibbs, petertodd, glozow, ariard, murchandamus, achow101
Concept ACK reardencode, 0xB10C

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #28676 ([WIP] Cluster mempool implementation by sdaftuar)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@BitcoinErrorLog
Copy link

mempoolfullrbf should be removed, and RBF is a redundant unenforceable feature. If we believe miners only care about the the largest fee/rate then simply providing them with all txns is good enough. Miners can choose how to sort themselves.

@reardencode
Copy link

ACK

@1440000bytes

This comment was marked as abuse.

@murchandamus
Copy link
Contributor

Concept ACK

Given the majority of the hashrate using mempoolfullrbf, Bitcoin Core should adapt its default behavior to match its expectations to the blocks being published.

@tdb3
Copy link
Contributor

tdb3 commented Jul 22, 2024

Thanks @reardencode for the review and ACK as its obvious full-rbf should be default. There is some politics involved in it which I wanted to highlight:

Sorry for the confusion. To clarify, I had deleted my own comment. I wanted to think a bit more about it before commenting again.

@1440000bytes

This comment was marked as abuse.

@pinheadmz
Copy link
Member

@1440000bytes hello from your friendly neighborhood moderator. This is just a reminder to keep all discussions technical. Pull request comments should be focused on the code in question. Discussions about personal opinions, moderator or maintainer actions (including responses to this comment) can be opened here

@1440000bytes

This comment was marked as abuse.

@ariard

This comment was marked as off-topic.

@ariard
Copy link

ariard commented Jul 26, 2024

Concept ACK.

For the same vector of DoS attack about contracting protocols and multi-party explained in my
post on the mailing list in 2021 ("Mempool Funny Games against Multi-Party Funded Transactions).

I believe one of the best long-term solution to avoid new use-case conflict (in the present "0
conf tx acceptance versus multi-party built transaction like coinjoin") is to minimize the scope
of the transaction-relay policy in the bitcoin core codebase, while this cannot be always followed
when it's mitigating a DoS vector (e.g MIN_STANDARD_TX_NONWITNESS_SIZE). I made such more or
less experiment to have this approach of having transaction-relay policy rules signaled among
transaction issuers and miners with #29448 and similarly transaction-flags user-defined has been
discussed on the mailing list here.

Historically, there has been some attempt to have the policy rules validated in an external
module with a set of patch proposed by jtimon (e.g see 6416, 6420, 6424 and other PRs around
the same period). See e.g https://github.com/jtimon/bitcoin/commits/policy-replacement-alt for
example of abstractions for "alternative replacement policies".

@DrahtBot DrahtBot mentioned this pull request Jul 27, 2024
8 tasks
@ariard

This comment was marked as off-topic.

@ariard

This comment was marked as off-topic.

@gmaxwell
Copy link
Contributor

FWIW, I had some friends running nodes either do nothing or turn this on. In the last 144 blocks, a default node sees only 64.58% blocks reconstructed with zero round trips which, in my view, means compact blocks is significantly broken for its latency reducing purpose. A node with this enabled sees 94.44% reconstruct without a roundtrip, which is maybe a little low but not broken.

I imagine that if more of the network were running enabled that number might increase further, as it may still be held down due to transactions that fail to propagate well (consistent with that, it seems most nodes with no inbound have low rates regardless of the setting, which presumably wouldn't be so if most nodes had this setting).

I shared my concerns with another bitcoiner who likes to monitor network health, they replicated, and got similar results (which I presume they'll share eventually).

@JeremyRubin
Copy link
Contributor

concept ack given the above data from @gmaxwell.

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 406cdd56e1065fe721f62a0c52fa024455748bbb

I reviewed the code and replicated the test changes to confirm that these are the minimal changes to pass all tests.

@DrahtBot DrahtBot requested a review from ariard July 31, 2024 21:05
@luke-jr
Copy link
Member

luke-jr commented Jul 31, 2024

If we believe miners only care about the the largest fee/rate then simply providing them with all txns is good enough.

That would be a reason to support this PR, as full-RBF simply provides miners with all txns. Without full RBF enabled by relays, miners would typically only see the "first" transaction.

FWIW, I had some friends running nodes either do nothing or turn this on. In the last 144 blocks, a default node sees only 64.58% blocks reconstructed with zero round trips which, in my view, means compact blocks is significantly broken for its latency reducing purpose. A node with this enabled sees 94.44% reconstruct without a roundtrip, which is maybe a little low but not broken.

This behaviour was originally intended to put pressure on miners to match node policies; it's not supposed to be an excuse to pressure nodes to adapt to miner policies.

(Personally, I'm ~0 on whether this actually gets merged or not; Knots has had full RBF by default for years, and "first seen" doesn't really make sense as a policy)

@gmaxwell
Copy link
Contributor

gmaxwell commented Aug 1, 2024

@luke-jr I don't know that I'd say 'intended', particularly since poor propagation either helps or hurts miners depend on their hashrate-- it benefits sufficiently large centralized miners when other miners take more time to get their blocks-- but regardless of intent it works the way it works.

I would say that to the extent someone is ambivalent with respect to the policy, as you just expressed, it's preferable to improve block propagation latency since higher latency is a centralization pressure. The existence of the extrapool is intended to decouple policy from block propagation-- allowing nodes to keep around some txn they wouldn't prefer to mine/relay for the benefit of reconstructing blocks, but it only goes so far.

Ultimately it would be best if block relay latency were less fragile-- methods have been implemented (the FEC reconstruction of fibre, for example) but never incorporated in widely deployed node software. And even those work particularly well if only a few transactions are missing relative to the node's mempool and extrapool. So even if more robust block relay was in use, it's preferable to do whatever lowers the discrepancy, all other things equal (and they're not always equal, for sure).

@luke-jr
Copy link
Member

luke-jr commented Aug 1, 2024

I say "intended" because policy centralization was a concern I had and raised about compact blocks before they were merged, and @sipa explicitly justified CB's behaviour in this regard as a way for nodes to exert influence on miners in this respect.

@0xB10C
Copy link
Contributor

0xB10C commented Aug 1, 2024

I shared my concerns with another bitcoiner who likes to monitor network health, they replicated, and got similar results (which I presume they'll share eventually).

Correct, I too found enabling mempoolfullrbf to be helpful for compact block reconstruction without requesting transactions.

By analyzing compact block reconstructions in the debug.logs (with debug=cmpctblock enabled) of my monitoring nodes, I noticed that many block reconstructions need an additional round-trip to fetch unknown transactions. While this situation has slightly improved over the last weeks (~50% -> 70+%) as mempool activity died down, this still clearly shows a divergence in policy.

I suspected that the divergence might originate from nearly all pools mining with mempoolfullrbf. I enabled -mempoolfullrbf=1 on the monitoring node/host erin on 2024-07-26. Since then, this node needed request transactions during significantly fewer blocks reconstructions than the other nodes.

Concept ACK

image
(note that while 75% or so might show up as light green here, doesn't necessarily mean that 75% is "good". Ideally, we want this to be close to 100% of blocks reconstructions needing no transaction requests)

Copy link
Member

@instagibbs instagibbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fbd4ca6ea9a3d2f6fe0af3cb5dfe8e1a7fdb4032

Given the weight of evidence on block propagation and the implied miner uptake, I think it's a conservative flip of the switch.

@DrahtBot DrahtBot requested review from 0xB10C and murchandamus August 1, 2024 16:47
@fanquake
Copy link
Member

fanquake commented Aug 1, 2024

If the conclusion is that it's now better for a node to have this "on", rather than "off", and this is merged for 28.x, then I think we should also:

  • Backport the default change to the relevant release branches.
  • Ultimately just remove the option (doesn't have to be done here).

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reACK fbd4ca6

@1440000bytes

This comment was marked as abuse.

@instagibbs
Copy link
Member

reACK 590456e

@DrahtBot DrahtBot requested review from glozow and murchandamus August 2, 2024 20:35
@glozow
Copy link
Member

glozow commented Aug 3, 2024

reACK 590456e

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested ACK 590456e

@achow101 achow101 modified the milestones: 29.0, 28.0 Aug 5, 2024
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reACK 590456e

@achow101
Copy link
Member

achow101 commented Aug 5, 2024

ACK 590456e

I did my own testing a few weeks ago where I made transactions that did not signal and replaced them to see how many were mined. The methodology was to create a transaction and replace it after 2 minutes. A total of 122 transactions were created, with 118 of the replacements being accepted. This took place on July 10th to 11th over the course of about 30 hours. With a 96.7% success rate, I think that's pretty good evidence that miners have enabled mempoolfullrbf.

This gist contains the script that I used as well as a log of all of the transactions that were created.

@DrahtBot DrahtBot requested a review from achow101 August 5, 2024 19:52
@achow101 achow101 merged commit 902dd14 into bitcoin:master Aug 5, 2024
@jaybny
Copy link

jaybny commented Aug 5, 2024

Concept NACK: Opposition to Full-RBF by Default Without Broad Consensus
I have several critical concerns regarding the default implementation of Full Replace-By-Fee (RBF):

  1. Deviation from the First-Seen Rule: Bitcoin's game theory initially hinged on the "first-seen" rule, which is fundamental in preventing malicious double spends by confirming the first transaction broadcast. Moving away from this to a model where transactions can be outbid by higher fees undermines both the security and predictability of transactions, which are essential for maintaining user trust and the overall integrity of the Bitcoin network.

  2. Increased Centralization of Block Production: The last decade has seen a notable increase in the centralization of block production, concentrated among a few large pools. This trend jeopardizes Bitcoin's democratic and decentralized principles. Implementing changes like RBF, which could be exploited by these centralized entities, further aggravates this problem.

  3. RBF as a Temporary Scaling Measure: Introduced as a stopgap for handling network congestion and scaling issues, RBF falls short as a long-term solution. It overshadows more sustainable approaches such as implementing larger blocks or enhancements like OP_CHECKTEMPLATEVERIFY (OP_CTV). RBF's temporary nature could potentially obstruct the broader vision of scaling Bitcoin into a viable peer-to-peer currency.

  4. Lack of Broad Social Consensus: The decision to implement a significant protocol change such as RBF without widespread community consensus is deeply concerning. This practice is misaligned with Bitcoin’s governance principles, where substantial changes should be thoroughly debated and agreed upon by the community.

  5. Implications for Bitcoin’s Role as P2P Money: The ongoing reliance on and expansion of RBF features could impede Bitcoin’s ability to scale effectively as practical, peer-to-peer money. It pivots the system towards a competitive fee market, moving away from fostering user empowerment and accessibility—both of which are crucial for Bitcoin's adoption and functionality as a currency.

Given these points, I strongly recommend a reevaluation of RBF's role and its implementation strategy. We need to consider more robust and decentralized scaling solutions that adhere to Bitcoin's original intentions, supporting its development into a reliable and universally accessible digital currency.

@fanquake
Copy link
Member

fanquake commented Aug 6, 2024

Backported for 27.x in #30558.

glozow added a commit that referenced this pull request Aug 7, 2024
…cation

1f93e3c add deprecation warning for mempoolfullrbf (glozow)
4400c97 [doc] update documentation for new mempoolfullrbf default (glozow)

Pull request description:

  Followup to #30493. Update bips.md and policy/*.md to reflect new default rules around signaling requirements in RBF.
  Also, log a warning when `-mempoolfullrbf=0` that this config option is deprecated and will be removed in a future release.

ACKs for top commit:
  petertodd:
    ACK 1f93e3c
  instagibbs:
    ACK 1f93e3c
  tdb3:
    ACK 1f93e3c

Tree-SHA512: f60a9524f15cfaa4c10c40b6f62b787d3f9865aac48ca883def30efac4f8a118f1359532f1b209ea34e201f0b1c92398abc8bc1e439e6b60910cc7f75c51e9ae
achow101 added a commit that referenced this pull request Nov 8, 2024
c189eec doc: release note for mempoolrullrbf removal (Greg Sanders)
d47297c rpc: Mark fullrbf and bip125-replaceable as deprecated (Greg Sanders)
04a5dce docs: remove requirement to signal bip125 (Greg Sanders)
111a23d Remove -mempoolfullrbf option (Greg Sanders)

Pull request description:

  Given #30493 and the related discussion on network uptake it's probably not helpful to have an option for a feature that will not be respected by the network in any meaningful way.

  Wallet changes can be done in another PR on its own cadence to account for possible fingerprinting, waiting for fullrbf logic to permeate the network, etc.

ACKs for top commit:
  stickies-v:
    re-ACK c189eec
  achow101:
    ACK c189eec
  murchandamus:
    ACK c189eec
  rkrux:
    reACK c189eec

Tree-SHA512: 9447f88f8f291c56c5bde70af0a91b0a4f5163aaaf173370fbfdaa3c3fd0b44120b14d3a1977f7ee10e27ffe9453f8a70dd38aad0ffb8c39cf145049d2550730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.