Fuzz: Check individual and package transaction invariants #28764
pull instagibbs wants to merge 3 commits into bitcoin:master from instagibbs:fuzz_atmp_invariants changing 4 files +145 −11-
instagibbs commented at 7:10 pm on October 31, 2023: memberPoached from #26711 since that PR is being split apart, and modified to match current behavior.
-
fuzz: tx_pool checks ATMP result invariants 651fa404e4
-
DrahtBot commented at 7:10 pm on October 31, 2023: contributor
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.
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:
- #26711 (validate package transactions with their in-package ancestor sets by glozow)
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.
-
DrahtBot added the label Tests on Oct 31, 2023
-
fanquake requested review from dergoegge on Oct 31, 2023
-
DrahtBot added the label CI failed on Oct 31, 2023
-
in src/test/util/txmempool.h:47 in 76bbd9e871 outdated
42+ * false if an error occurs, true otherwise. String s will be populated with an error message if 43+ * the return value is false. If mempool is provided, checks that the expected transactions are in 44+ * mempool (this should be set to nullptr for a test_accept). 45+*/ 46+bool CheckPackageMempoolAcceptResult(const Package& txns, const PackageMempoolAcceptResult& result, bool expect_valid, 47+ const CTxMemPool* mempool, std::string& s);
dergoegge commented at 10:03 am on November 1, 2023:0std::optional<std::string> CheckPackageMempoolAcceptResult(const Package& txns, const PackageMempoolAcceptResult& result, bool expect_valid, 1 const CTxMemPool* mempool);
instagibbs commented at 2:06 pm on November 1, 2023:taken, thanksinstagibbs force-pushed on Nov 1, 2023DrahtBot removed the label CI failed on Nov 1, 2023in src/test/util/txmempool.cpp:42 in c1319395f7 outdated
36@@ -36,3 +37,78 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef& tx) const 37 { 38 return CTxMemPoolEntry{tx, nFee, TicksSinceEpoch<std::chrono::seconds>(time), nHeight, m_sequence, spendsCoinbase, sigOpCost, lp}; 39 } 40+ 41+std::optional<std::string> CheckPackageMempoolAcceptResult(const Package& txns, const PackageMempoolAcceptResult& result, bool expect_valid, 42+ const CTxMemPool* mempool)
glozow commented at 1:19 pm on November 2, 2023:c1319395f74c0016b367e860050c0ff5a99dea85 nit: the whitespace here is weird, should probably align with parentheses
instagibbs commented at 1:35 pm on November 2, 2023:realignedglozow commented at 1:22 pm on November 2, 2023: memberACK b847d48f70b5a67263c362f9d28ee6d092068e27, thanks for shaving!glozow requested review from dergoegge on Nov 2, 2023[test util] CheckPackageMempoolAcceptResult for sanity-checking results 34088d6c9eUse CheckPackageMempoolAcceptResult for package evaluation fuzzing fcb3069fa3instagibbs force-pushed on Nov 2, 2023glozow commented at 3:51 pm on November 2, 2023: memberreACK fcb3069fa307942cf7f3edabcda1be96d615c91f, only whitespace changesdergoegge approveddergoegge commented at 10:51 am on November 3, 2023: memberACK fcb3069fa307942cf7f3edabcda1be96d615c91fglozow merged this on Nov 3, 2023glozow closed this on Nov 3, 2023
in src/test/util/txmempool.cpp:52 in fcb3069fa3
47+ if (result.m_state.IsInvalid()) { 48+ return strprintf("Package validation unexpectedly failed: %s", result.m_state.ToString()); 49+ } 50+ } else { 51+ if (result.m_state.IsValid()) { 52+ strprintf("Package validation unexpectedly succeeded. %s", result.m_state.ToString());
instagibbs commented at 8:04 pm on November 3, 2023:missing somereturn
statements in this functionFabcien referenced this in commit 465fb65ae2 on Jul 10, 2024bitcoin locked this on Nov 2, 2024
instagibbs DrahtBot dergoegge glozowLabels
Tests
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me