-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Document and test lack of inherited signaling in RBF policy #21946
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
Conversation
|
Also, I had a look on the rest of RBF functional test coverage (i.e feature_rbf.py, mempool_accept.py, p2p_invalid_tx.py). AFAICT, the latest check on incremental relay fee increase doesn't seem to have coverage ? |
|
utACK fb2047b |
test/functional/feature_rbf.py
Outdated
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.
This is a good place to refer to the CVE so it's clear the behaviour here is not following BIP125.
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.
Yes already add a ref in new document, added another here if you think so.
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.
Probably a good idea; few people will read validation.cpp along side this test.
fb2047b to
3d57b5e
Compare
|
Concept ACK Maybe we can mention this in doc/bips.md as well |
jonatack
left a comment
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.
Concept ACK. Context/additional information:
- https://bitcoinops.org/en/newsletters/2021/05/12/#cve-2021-31876-discrepancy-between-bip125-and-bitcoin-core-implementation
- https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-May/018893.html
jonatack
left a comment
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.
ACK 3d57b5eb053c7a34c3621875fa60401782a280b4
Happy to re-ACK if you update per the comments.
3d57b5e to
2eb0eed
Compare
|
Thanks @jonatack and @Sjors, I think I've addressed all your comments at 2eb0eed, but lmk if you've more I'll address them quickly. @prayank23 Well in fact there is another well-known supplemental check implemented by our logic not mentioned in the BIP, which is the feerate comparison here : Line 848 in ecf5f2c
|
|
@MarcoFalke I believe you're aware of few mempool-related RPCs which should be updated in consequence as follow-up of this PR? |
|
ACK 2eb0eed |
Not sure about this. According to my understanding fee rate and fees both should be higher in replacement transaction. Example: It is possible that Tx2 uses a lower fee rate compared to Tx1 but more fees. Miners normally prioritize based on fee rate so a higher fee rate would be better. However, if there is a difference in BIP and the implementation it should be mentioned in doc/bip.md IMO |
|
ACK 2eb0eed Is a fix for the actual CVE being worked on as well? |
|
@prayank23 Yes, unless you have a strong opinion here, I prefer differences between BIPs and the implementation in another PR, like one adding test coverage for incremental relay fee. Not really, as a fix, I'm currently studying moving towards full-rbf. If we do so, there wouldn't be any kind of signaling to proceed at all. IMO, main motivation to not fix it is avoiding increasing the DoS surface of the mempool, where at replacement transaction submission you might have to traverse N * |
|
This has ACKs by @Sjors, @benthecarman and myself, if anyone would like to have a look. |
Adding a |
… RBF policy 2eb0eed validation: document lack of inherited signaling in RBF policy (Antoine Riard) 906b6d9 test: Extend feature_rbf.py with no inherited signaling (Antoine Riard) Pull request description: Contrary to BIP125 or other full-node implementation (e.g btcd), Bitcoin Core's mempool policy doesn't implement inherited signaling. This PR documents our mempool behavior on this and add a test demonstrating the case. ACKs for top commit: jonatack: ACK 2eb0eed benthecarman: ACK 2eb0eed Tree-SHA512: d41453d3b49bae3c1eb532a968f43bc047084913bd285929d4d9cba142777ff2be38163d912e28dfc635f4ecf446de68effad799c6e71be52f81e83410c712fb
Sure, filed as #22209 |
|
IIUC we would have to re-order RBF opt-in checks after fetching parents coins from the cache in At first sight, I don't see any blocker for this approach, though I was planning to propose soon moving towards full-rbf. Beyond simplifying a bit |
Adds a new test which is broken, but which will be fixed in a few PRs. Disabled it for now.
Contrary to BIP125 or other full-node implementation (e.g btcd), Bitcoin Core's mempool policy doesn't implement inherited signaling.
This PR documents our mempool behavior on this and add a test demonstrating the case.