#35997 refactor: bench: make_hard_case to find a solution

ReviewabilityReviewsAgreementSize
#35997 yancyribbens refactor: bench: make_hard_case to find a solutionAuthor silent 69d0Strong0 + 11 tests
  • Make coin selection benchmarks use realistic values and verify an actual solution is found
  • Gives developers more accurate performance metrics for coin selection search exhaustion
  • Ready for review
  • Nothing known that would invalidate a review now
  • Strong support with no open objections
  • Verified by running the benchmark locally and checking assertions pass at the limit (Dontbyshai)
  • 0 lines added or modified outside tests
  • 11 lines added or modified in tests
  • 6 lines removed in total
  • 1 files, 1 commits
Test infrastructure#50 of 54
P4 · cleanup
  • P4 because it only adjusts synthetic inputs and adds assertions in an isolated benchmark
  • Offers a minor benchmark improvement with no broader impact on CI signals or test frameworks
  • Ranking pass: Moved down: it tunes one isolated benchmark's synthetic inputs, below framework-wide readability/typing cleanups.
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

Updates the `BnBExhaustion` coin selection benchmark in `src/bench/coin_selection.cpp`. It alters `make_hard_case` to generate more realistic target and UTXO amounts while keeping search attempts at the 100,000 evaluation limit, and adds assertions verifying the evaluated count and solution properties.

Problem: The existing BnB exhaustion benchmark used artificially large synthetic UTXO values and did not assert that an actual solution was found upon hitting the evaluation limit.

Reviewability

Stale · Author silent 69d

No author activity for 69 days; a review may wait a long time for a response.

Agreement

Strong

substantive support, no open objection (Dontbyshai)

Thread notes: Dontbyshai tested the benchmark changes and gave a substantive ACK; no objections raised.

Objections, suggestions, and questions: none recorded.

Support:

  • Dontbyshai (none) (ACK, 2026-08-18): reviewed BnB search logic and assumptions, ran BnBExhaustion locally, confirming new assertions pass and benchmark reaches limit of 100,000 evaluations

Participants:

  • Dontbyshai (none, support, 1 statements 2026-08-18 to 2026-08-18): tested the benchmark locally and verified all assertions pass and the search limit is exhausted

Files

17 lines under test/bench/ci.

  • src/bench/coin_selection.cpp +11/-6

Card

The short text the ranking pass compares across PRs.

This PR refactors the BnBExhaustion benchmark in src/bench/coin_selection.cpp to use more realistic UTXO values and target sizes while maintaining exhaustion of the 100,000 evaluation limit. It also adds assertions to verify that a valid solution is produced. As an internal benchmark adjustment, it has marginal importance. One reviewer tested and verified the behavior before a minor follow-up parameter adjustment by the author.

Data

dossier JSON · extract JSON · model ledger, generated 2026-09-18T03:41, confidence high, input hash 99acbaadef6c8db3
thread read through 2026-08-24 (3 statements), head 6019067724
Discussion read under schema 1 rules: suggestions and questions may be missing, and an objection may combine several harms (schema history).
labels: Refactoring

Categories

Test infrastructure

P4 · cleanup (ranking pass: Moved down: it tunes one isolated benchmark's synthetic inputs, below framework-wide readability/typing cleanups.)

Refines synthetic UTXO values in `make_hard_case` to be more realistic and adds assertions for benchmark execution. This is a minor benchmark test improvement with no broader impact on CI signal or framework capabilities.

Membership: Modifies `src/bench/coin_selection.cpp`, adjusting benchmark data generation and assertions.

Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0