Add additional assertions showing the number of attempts ware exhausted and that a solution was found.
refactor: bench: make_hard_case to find a solution #35997
pull yancyribbens wants to merge 1 commits into bitcoin:master from yancyribbens:0817-refactor-bnb-exhaustion-benchmark changing 1 files +11 −6-
yancyribbens commented at 5:07 PM on August 17, 2026: contributor
- DrahtBot added the label Refactoring on Aug 17, 2026
-
DrahtBot commented at 5:07 PM on August 17, 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/35997.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process.
Type Reviewers Concept ACK Dontbyshai If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #35511 (RFC: consensus: Make
CAmounta class by hodlinator)
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.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
LLM Linter (✨ experimental)
Possible typos and grammar issues:
to be found before the exhausting the 100,000 attempt limit.->to be found before exhausting the 100,000 attempt limit.[“the exhausting the” is ungrammatical and obscures the meaning]
<sup>2026-08-24 16:01:36</sup>
- #35511 (RFC: consensus: Make
-
yancyribbens commented at 5:07 PM on August 17, 2026: contributor
- DrahtBot added the label CI failed on Aug 17, 2026
-
DrahtBot commented at 6:54 PM on August 17, 2026: contributor
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed. <sub>Task
Alpine (musl): https://github.com/bitcoin/bitcoin/actions/runs/32048916305/job/95443267332</sub> <sub>LLM reason (✨ experimental): CI failed due to a build error:coin_selection.cpphas invalid leading whitespace, triggering-Werror=leading-whitespaceduring compilation.</sub><details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
- yancyribbens force-pushed on Aug 17, 2026
- DrahtBot removed the label CI failed on Aug 17, 2026
-
Dontbyshai commented at 2:55 AM on August 18, 2026: none
ACK
Hi everyone, I reviewed the changes in this PR and tested the benchmark locally. I checked the BnB search logic as well as the assumptions used in make_hard_case(). I built bench_bitcoin with the changes from this PR and ran the BnBExhaustion benchmark. The benchmark completed successfully with exit code 0, and all the new assertions passed. The results confirm that the benchmark reaches the limit of 100,000 evaluations. ✌🏻
-
6019067724
refactor: bench: update make_hard_case to find a solution
Add assertions showing the number of attempts were exhausted and that a solution was found.
- yancyribbens force-pushed on Aug 24, 2026
-
yancyribbens commented at 4:04 PM on August 24, 2026: contributor
Updated the target and UTXO amounts to be more realistic. Previously the target of 800,000 sats gave the false impression that such large numbers are needed to exhaust the search limit. Also adjusted the cost_of_change param to sit at the threshold of exhausting the limit so that it's more meaningful for the benchmark.