AssumeUTXO: allow retrying loadtxoutset after an interrupted load #36542

pull l0rinc wants to merge 2 commits into bitcoin:master from l0rinc:l0rinc/assumeutxo-recover-cleanup changing 3 files +7 −3
  1. l0rinc commented at 11:35 AM on October 15, 2026: contributor

    Problem: An interrupted loadtxoutset can leave an incomplete chainstate_snapshot database without its required base_blockhash marker. A later call can fail to open that database, requiring the operator to remove it manually before retrying.

    Fix: Wipe the snapshot database before opening it so a later call can replace incomplete data. LevelDB acquires the database lock before deleting files, so a database held open by another load cannot be wiped. Also correct the startup warning to identify the missing marker and explain that retrying replaces the directory.

  2. DrahtBot added the label Validation on Oct 15, 2026
  3. DrahtBot commented at 11:35 AM on October 15, 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.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36603 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36603.svg"></sub> (Improve loadtxoutset performance by ajtowns)
    • #36598 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36598.svg"></sub> ([Demo] validation: remove AssumeUTXO by l0rinc)

    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-->

  4. l0rinc renamed this:
    validation: remove leftover AssumeUTXO cleanup data
    validation: clean up failed AssumeUTXO databases
    on Oct 20, 2026
  5. l0rinc force-pushed on Oct 20, 2026
  6. DrahtBot added the label CI failed on Oct 20, 2026
  7. test: characterize incomplete snapshot database retry
    Record that an incomplete snapshot database prevents loadtxoutset until the operator removes its directory.
    00b1aa6116
  8. validation: replace incomplete snapshot databases when loading
    An interrupted snapshot load can leave a database without its base-block marker, preventing later loadtxoutset attempts.
    Wipe the snapshot database before opening it so callers can retry without removing the directory manually.
    Correct the startup warning to point at the missing marker and say that a retry replaces the directory.
    15a891d402
  9. l0rinc renamed this:
    validation: clean up failed AssumeUTXO databases
    AssumeUTXO: allow retrying loadtxoutset after an interrupted load
    on Oct 21, 2026
  10. l0rinc force-pushed on Oct 21, 2026
  11. l0rinc commented at 9:05 AM on October 21, 2026: contributor

    Found a simpler fix using the existing database wipe option, which lets interrupted loads be retried.

  12. DrahtBot removed the label CI failed on Oct 21, 2026
Contributors

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-10-27 17:51 UTC

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