This zooms in on one aspect of:
And has a prerequisite (which itself needs careful consideration):
We currently sync from the snapshot to the tip, and then from genesis to the snapshot. My understanding is that there are several reasons for this:
- Provide additional assurance that the snapshot is legit (we shut down if it's not), i.e. "the trust model is only relaxed for a limited amount of time" #15605
- Have a fully functional node (complete indexes, unpruned) at the end
- Handle deep reorgs
- Maintain (social) pressure to keep ordinary IBD affordable (e.g. #28616 (comment))
It comes with downsides: a. Code complexity (see #32377) b. Large additional download
The benefit of (1) is rather theoretical in my opinion and e.g. #35054 (comment).
Most of (2) can be achieved without validation [^0].
Requiring a full -reindex(chainstate) for (3) doesn't seem unreasonable.
It seems inevitable that users will want to avoid or delay (b), e.g. I proposed it in:
And that would defeat (1) and (4).
This is why I think the universal snapshot check[^1] proposed in #36543 is a good idea, and would let us drop the (mandatory) background validation.
Currently the snapshot is only verified by reviewers and those who load the AssumeUTXO snapshot. The latter only find out when the background sync finishes.
With the approach in #36543 everyone verifies the snapshot. If we then drop background validation, everyone except AssumeUTXO users verifies the snapshot. And that group can still verify the software by syncing a fresh node up to the snapshot height.[^2]
[^0]: we have the complete header chain, so can download the blocks with validating them, and generate indexes. Generating undo data might be trickier, which -blockfilterindex and -coinstatsindex need.
[^1]: as I'll comment on that PR, I don't think think a failing check should be considered a consensus failure, but there should be a loud warning.
[^2]: we can make this easier, e.g. using IPC to spawn such a node and monitor it, feeding it our headers, importing its blocks and undo data after completion, etc. All this while avoiding the multiple chainstate abstraction in the software itself. We could compare this approach with the complexity of the existing dual chainstate approach (after bug fixes).