fuzz: test non-max descriptor satisfaction weight #35489

pull w0xlt wants to merge 1 commits into bitcoin:master from w0xlt:fuzz-descriptor-nonmax-sat-weight changing 1 files +5 −1
  1. w0xlt commented at 9:08 PM on June 8, 2026: contributor

    The descriptor fuzz target is intended to exercise descriptor satisfaction-size estimation for solvable descriptors.

    It currently calls MaxSatisfactionWeight(true) twice, so the false branch is never exercised.

    This PR changes max_sat_nonmaxsig to call MaxSatisfactionWeight(false), so fuzzing covers both branches.

  2. DrahtBot added the label Fuzzing on Jun 8, 2026
  3. DrahtBot commented at 9:08 PM on June 8, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35489.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK brunoerg, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. maflcko commented at 10:22 AM on June 9, 2026: member

    The fuzz target intends to exercise both MaxSatisfactionWeight(true) and MaxSatisfactionWeight(false), then assert that the non-max-signature estimate does not exceed the max-signature estimate.

    I don't think this is true. There is no assert for "does not exceed".

  5. w0xlt commented at 3:54 PM on June 9, 2026: contributor

    I don't think this is true. There is no assert for "does not exceed".

    Right. The assert BOOST_CHECK(max_sat_nonmaxsig <= max_sat_maxsig); is in src/test/descriptor_tests.cpp:203, not in the fuzz target. I updated the PR description.

  6. brunoerg commented at 1:57 PM on June 10, 2026: contributor

    Right. The assert BOOST_CHECK(max_sat_nonmaxsig <= max_sat_maxsig); is in src/test/descriptor_tests.cpp:203, not in the fuzz target. I updated the PR description.

    Perhaps it's worth adding this comparison here as well?

  7. brunoerg approved
  8. brunoerg commented at 1:58 PM on June 10, 2026: contributor

    code review ACK 60cd2c5c594c336b177f553a17a5a57df2227f9f

    happy to re-ACK if you add the comparison.

  9. w0xlt force-pushed on Jun 10, 2026
  10. fuzz: test non-max descriptor satisfaction weight
    Also assert that the availability of the satisfaction weight estimate
    does not depend on the signature-size assumption, and that assuming
    non-max-size signatures never increases the estimate.
    526aae3768
  11. w0xlt force-pushed on Jun 10, 2026
  12. DrahtBot added the label CI failed on Jun 10, 2026
  13. DrahtBot removed the label CI failed on Jun 10, 2026
  14. w0xlt commented at 9:59 PM on June 10, 2026: contributor

    @brunoerg Done. Thanks.

  15. brunoerg approved
  16. brunoerg commented at 11:34 PM on June 10, 2026: contributor

    reACK 526aae3768df09b2d39621bc19cd18a388f03e42

  17. sedited approved
  18. sedited commented at 7:16 AM on June 11, 2026: contributor

    ACK 526aae3768df09b2d39621bc19cd18a388f03e42

  19. sedited merged this on Jun 11, 2026
  20. sedited closed this on Jun 11, 2026


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: 2026-06-11 10:51 UTC

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