Skip to content

ibd: note resumed headers on the milestone path - #1017

Merged
reardencode merged 2 commits into
masterfrom
ibd/milestone-renote
Oct 14, 2026
Merged

reardencode merged 2 commits into
masterfrom
ibd/milestone-renote

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

On an IBD restart the anchor hash was restored into the milestone map, and the resume seed then queued the stored headers without noting them. The map already had an entry, so those heights did not fall back to the header store. Script checks stayed on for the whole seeded span. That is the script_ms of about 3 seconds at height ~506k in the latest log, while old5 dropped to script_ms=0 only after confirm walked past the seed onto headers the live walk had noted.

After the seed plants the queue, the existing stored-path walk notes every header that links from the confirmed tip. The restored anchor stays. skips_scripts is then true for those heights. Headers between the queue tail and height 840000 are still not on disk; the skip does not need them once the anchor entry and the block's own height are both present.

Tests

  • A regtest store with two headers ahead of genesis, and the anchor already noted, seeds those headers and then skips scripts at height 1. The anchor at height 100 remains.
  • rbitcoin-net lib tests passed. fmt, clippy -D warnings, and ast-grep passed. The workspace suite is left to the GitHub test job.

A restart restores the anchor hash and then queues the stored headers.
Those heights stay off the milestone map, so script checks stay on.
Restart restored the anchor and then queued stored headers without
noting them, so script checks stayed on for that span.

The resume seed now runs the stored-path note after those rows are
queued. Heights that link from the confirmed tip skip scripts again.
@reardencode
reardencode merged commit a692f6e into master Oct 14, 2026
18 checks passed
@rearden-grok
rearden-grok Bot deleted the ibd/milestone-renote branch October 15, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant