txdb: invalidate cursor if first coin key can't be decoded #36845

pull HusseinAdeiza wants to merge 1 commits into bitcoin:master from HusseinAdeiza:txdb-cursor-malformed-first-key changing 2 files +23 −5
  1. HusseinAdeiza commented at 10:55 AM on November 12, 2026: none

    Fixes #35172.

    CCoinsViewDB::Cursor() primed the first record without checking whether GetKey() succeeded, so a malformed first key in the coin keyspace was reported as valid. Next() already invalidates the cursor for the same failure.

    Mirror that check in Cursor(), and add a regression test that writes a too-short DB_COIN key and checks the returned cursor is invalid.

  2. txdb: invalidate cursor if first coin key can't be decoded
    Cursor() ignored a failed GetKey() on the first record, unlike Next().
    A malformed first key in the coin keyspace was reported as valid.
    cd8de19439
  3. DrahtBot added the label UTXO Db and Indexes on Nov 12, 2026
  4. DrahtBot commented at 10:55 AM on November 12, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko closed this on Nov 12, 2026

  6. maflcko commented at 11:01 AM on November 12, 2026: member

    Thx, but LLM output is not accepted if the author can not properly explain, test or could have written the change themselves. Also, LLM generated content is not allowed in comments/communications. See https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md

    The bottleneck in this project has always been review and testing, not writing code. Development here is intentionally conservative and slow, and reviewer attention is the scarcest resource we have. LLMs have made this worse, anyone can now prompt them and post their output as PRs. There is an infinite amount plausible looking "improvements" for LLMs to suggest and work on.

    Unless we fully trust LLMs to both write and review code, humans still have to spend time understanding the proposed changes, which incurs a non-zero cost for every opened PR.

    I understand that contributing to this project can be intimidating, and using LLMs may seem tempting, but it really creates more issues for this project than it solves. The best way to help this project, is to review and test changes. You can use LLMs for this, but you shouldn't solely rely on them, or just post their output.

    I am asking you to reconsider whether it's something you genuinely think the project should pursue, independent of what your LLM suggested.

    See https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md


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-11-19 19:51 UTC

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