contrib: reject truncated UTXO snapshots during SQLite conversion #36205

pull kriss39 wants to merge 1 commits into bitcoin:master from kriss39:fix-utxo-sqlite-truncated-snapshots changing 2 files +104 −16
  1. kriss39 commented at 12:42 PM on September 9, 2026: none

    The converter accepts short reads, so a truncated snapshot can be reported as successfully converted while storing incomplete script data. For example, a final script declaring four bytes but containing only one is written to SQLite and the process exits successfully.

    Read each serialized field at its expected length and fail when the input ends early. Keep the final EOF probe unchanged.

    Add regression coverage for truncated metadata, CompactSize and VarInt values, all compressed script types, and end-to-end conversion of valid and truncated snapshots.

    Validation: python3 contrib/utxo-tools/test_utxo_to_sqlite.py passes all four test methods with this change and fails against the unchanged base revision. The full Bitcoin Core test suite was not run.

    This change and its tests were prepared with AI assistance. It does not make output creation atomic; an earlier committed batch may remain after a later input error.

  2. contrib: reject truncated UTXO snapshots during SQLite conversion
    Read serialized fields at their expected lengths and add regression tests
    for truncated fields and end-to-end SQLite conversion.
    fd504463f3
  3. DrahtBot added the label Scripts and tools on Sep 9, 2026
  4. DrahtBot commented at 12:42 PM on September 9, 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/36205.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited commented at 2:23 PM on September 9, 2026: contributor

    Did you run into this problem, or was this flagged by an LLM scan?

  6. sedited commented at 3:08 PM on September 9, 2026: contributor

    Closing this again. I don't think this needs priority fixing, given the hundreds of other things being actively worked on.

  7. sedited closed this on Sep 9, 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-09-15 19:51 UTC

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