fuzz: remove unsupported coins cache cursor fuzz probe #35562

pull l0rinc wants to merge 1 commits into bitcoin:master from l0rinc:l0rinc/remove-constant-Cursor-fuzz changing 1 files +11 −22
  1. l0rinc commented at 1:17 PM on June 18, 2026: contributor

    Problem: The coins_view fuzz target checked that CCoinsViewCache::Cursor() throws, but that method is intentionally unsupported and always throws: https://github.com/bitcoin/bitcoin/blob/93c6ea147422199777ddbc5f6d04134b82420b76/src/coins.h#L450-L452

    Fix: Remove the input-independent throw check from the fuzz target. The target still exercises the useful cache/view behavior, and keeps DB-backed cursor coverage where cursor iteration is supported. Some leftover scope-guards were also removed.

    This was extracted from review discussion in #35295 (review).

  2. test: remove unsupported cache cursor fuzz probe
    The coins view fuzz target called CCoinsViewCache::Cursor() only to assert that it throws.
    
    That path is an unsupported API contract and is independent of fuzz input, so it does not add useful fuzz coverage. Keep the remaining cache/view checks and DB-backed cursor coverage, where cursor iteration is supported.
    e262450380
  3. DrahtBot added the label Fuzzing on Jun 18, 2026
  4. DrahtBot commented at 1:17 PM on June 18, 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/35562.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited commented at 9:03 PM on June 18, 2026: contributor

    This is cheap check, do we really need to remove this?

  6. l0rinc commented at 9:31 PM on June 18, 2026: contributor

    do we really need to remove this?

    Isn't it just fake coverage? Why would we fuzz test a deterministic throw?

  7. sedited commented at 10:20 PM on June 18, 2026: contributor

    I think it is fine to pin behaviour here. We could do the same with a unit test I guess, but not sure if that is worth a pull request. Do you remember why this was an error and not just a hard assert?

    EDIT: Was curious why this is even a virtual method, and seems like it doesn't need to be. The few users can get it from the CCoinsViewDB directly.

  8. l0rinc closed this on Jun 20, 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-20 23:51 UTC

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