-
Notifications
You must be signed in to change notification settings - Fork 37.4k
validation: followups for de-duplication of packages #23804
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
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.
Tiny nit about the test, but LGTM.
ACK fcc2f91
ACK fcc2f91 |
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.
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.
I've left a few minor comments here, but there are a couple of more substantial comments in the original PR here: #22674 (review).
fcc2f91
to
0300cb1
Compare
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 0300cb1
The previous interface required callers to guess that the tx had been swapped and look up the tx again by txid to find a `MEMPOOL_ENTRY` result. This is a confusing interface. Instead, explicitly tell the caller that this transaction was `DIFFERENT_WITNESS` in the result linked to the mempool entry's wtxid. This gives the caller all the information they need in 1 lookup, and they can query the mempool for the other transaction if needed.
If/when witness replacement is implemented in the future, this test case can be easily replaced with witness replacement tests.
No behavior changes, just clarifications.
Behavior change: don't quit right after LimitMempoolSize() when a package is partially submitted. We should still send TransactionAddedToMempool notifications for transactions that were submitted. Not behavior change: add a new package validation result for mempool logic errors.
0300cb1
to
fa5aafc
Compare
fa5aafc
to
3cd7f69
Compare
ACK 3cd7f69 |
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.
LGTM, ACK 3cd7f69
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 3cd7f69
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 3cd7f69
Substantial changes since my last ACK are new commits adding clarifications, improving the errors handling and extending the unit test.
@@ -1088,7 +1096,6 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>& | |||
LimitMempoolSize(m_pool, m_active_chainstate.CoinsTip(), | |||
gArgs.GetIntArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000, | |||
std::chrono::hours{gArgs.GetIntArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY)}); | |||
if (!all_submitted) return false; |
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.
Well technically if this code change now trigger a TransactionAddedToMempool()
, I think we're changing the views of our CMainSignals
consumers and that would constitute a behavior change. That said, if I'm correct, I don't think it's worthy to invalidate ACKs just to update commit description.
…ages 3cd7f69 [unit test] package parents are a mix (glozow) de075a9 [validation] better handle errors in SubmitPackage (glozow) 9d88853 AcceptPackage fixups (glozow) 2db77cd [unit test] different witness in package submission (glozow) 9ad211c [doc] more detailed explanation for deduplication (glozow) 83d4fb7 [packages] return DIFFERENT_WITNESS for same-txid-different-witness tx (glozow) Pull request description: This addresses some comments from review on e12fafd from bitcoin#22674. - Improve documentation about de-duplication: [comment](https://github.com/bitcoin/bitcoin/pull/22674/files#r770156708) - Fix code looking up same-txid-different-witness transaction in mempool: [comment](https://github.com/bitcoin/bitcoin/pull/22674/files#r770804029) - Improve the interface for when a same-txid-different-witness transaction is swapped: [comment](https://github.com/bitcoin/bitcoin/pull/22674/files#r770782822) - Add a test for witness swapping: [comment](https://github.com/bitcoin/bitcoin/pull/22674/files#r770804029) - Add a test for packages with a mix of duplicate/different witness/new parents: [comment](bitcoin#22674 (comment)) - Fix issue with not notifying `CValidationInterface` when there's a partial submission due to fail-fast: [comment](bitcoin#22674 (comment)) ACKs for top commit: achow101: ACK 3cd7f69 t-bast: LGTM, ACK bitcoin@3cd7f69 instagibbs: ACK 3cd7f69 ariard: ACK 3cd7f69 Tree-SHA512: a5d86ca86edab80a5a05fcbb828901c058b3f2fa2552912ea52f2871e29c3cf4cc34020e7aac2217959c9c3a01856f4bd3d631d844635b98144f212f76c2f3ef
Can I comment? |
Summary: This is a partial backport of [[bitcoin/bitcoin#23804 | core#23804]] bitcoin/bitcoin@9ad211c Test Plan: read comment Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D12911
Summary: No behavior changes, just clarifications. This is a partial backport of [[bitcoin/bitcoin#23804 | core#23804]] bitcoin/bitcoin@9d88853 Depends on D12911 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D12912
This addresses some comments from review on e12fafd from #22674.
CValidationInterface
when there's a partial submission due to fail-fast: comment