[29.x] backport #33212 #33251

pull fjahr wants to merge 2 commits into bitcoin:29.x from fjahr:29.x-backport-index-fix changing 2 files +17 −7
  1. fjahr commented at 9:36 pm on August 24, 2025: contributor
    Backports #33212 to 29.x
  2. DrahtBot added the label Backport on Aug 24, 2025
  3. DrahtBot commented at 9:36 pm on August 24, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33251.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK stickies-v, achow101, mzumsande

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. fanquake commented at 9:43 pm on August 24, 2025: member
    Can you add the GitHub-Pull / Rebased-From metadata to each commit.
  5. fanquake added this to the milestone 29.1 on Aug 24, 2025
  6. index: don't commit state in BaseIndex::Rewind
    The committed state of an index should never
    be ahead of the flushed chainstate. Otherwise, in the case
    of an unclean shutdown, the blocks necessary to revert
    from the prematurely committed state would not be
    available, which would corrupt the coinstatsindex in particular.
    Instead, the index state will be committed with the next
    ChainStateFlushed notification.
    
    Github-Pull: #33212
    Rebased-From: 01b95ac6f496e24e525b2fc9d69ee8b543da65ff
    16b1710d97
  7. test: index with an unclean restart after a reorg
    This test fails without the previous commit.
    
    Github-Pull: #33212
    Rebased-From: a602f6fb7bf5f9e57299f4d6e246c82379fad8d2
    fcac8022d8
  8. fjahr force-pushed on Aug 24, 2025
  9. fjahr commented at 9:52 pm on August 24, 2025: contributor

    Can you add the GitHub-Pull / Rebased-From metadata to each commit.

    done

  10. stickies-v approved
  11. stickies-v commented at 1:19 pm on August 26, 2025: contributor

    ACK fcac8022d8

    There have been quite substantial changes to BaseIndex::Rewind() in https://github.com/bitcoin/bitcoin/commit/6f1392cc42cde638773f2b697d7d2c58abcdc860 that might warrant extra careful review, even though I couldn’t find any issues.

    The rationale and mechanics from the original PR all still hold here, and the changes look correct to me. The backport commits are clean, and the added test in fcac8022d839572f5d8781096eec14ca7ea2e0dd still fails without the fix in 16b1710d97464f134a526634a412a4b1b6cc8639.

  12. fanquake commented at 3:11 pm on August 26, 2025: member
  13. achow101 commented at 5:50 pm on August 26, 2025: member
    ACK fcac8022d839572f5d8781096eec14ca7ea2e0dd
  14. mzumsande commented at 9:03 pm on August 26, 2025: contributor
    Code Review ACK fcac8022d839572f5d8781096eec14ca7ea2e0dd
  15. fanquake merged this on Aug 27, 2025
  16. fanquake closed this on Aug 27, 2025


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: 2025-09-02 12:13 UTC

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