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
  1. instagibbs commented at 7:10 pm on October 31, 2023: member
    Poached from #26711 since that PR is being split apart, and modified to match current behavior.
  2. fuzz: tx_pool checks ATMP result invariants 651fa404e4
  3. 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.

    Type Reviewers
    ACK glozow, dergoegge

    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.

  4. DrahtBot added the label Tests on Oct 31, 2023
  5. fanquake requested review from dergoegge on Oct 31, 2023
  6. DrahtBot added the label CI failed on Oct 31, 2023
  7. 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, thanks
  8. instagibbs force-pushed on Nov 1, 2023
  9. DrahtBot removed the label CI failed on Nov 1, 2023
  10. in 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:
    realigned
  11. glozow commented at 1:22 pm on November 2, 2023: member
    ACK b847d48f70b5a67263c362f9d28ee6d092068e27, thanks for shaving!
  12. glozow requested review from dergoegge on Nov 2, 2023
  13. [test util] CheckPackageMempoolAcceptResult for sanity-checking results 34088d6c9e
  14. Use CheckPackageMempoolAcceptResult for package evaluation fuzzing fcb3069fa3
  15. instagibbs force-pushed on Nov 2, 2023
  16. glozow commented at 3:51 pm on November 2, 2023: member
    reACK fcb3069fa307942cf7f3edabcda1be96d615c91f, only whitespace changes
  17. dergoegge approved
  18. dergoegge commented at 10:51 am on November 3, 2023: member
    ACK fcb3069fa307942cf7f3edabcda1be96d615c91f
  19. glozow merged this on Nov 3, 2023
  20. glozow closed this on Nov 3, 2023


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-07-01 10:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me