node: recover the mainchain task - #149
Open
octobocto wants to merge 5 commits into
Open
Conversation
octobocto
force-pushed
the
2026-09-05-mainchain-task-recovery
branch
from
September 5, 2026 05:45
9b90b8c to
452779f
Compare
octobocto
force-pushed
the
2026-09-05-mainchain-task-recovery
branch
from
September 5, 2026 06:26
452779f to
3484928
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ancestor walk took
end_heightfrommain_block_hash_to_heightandstart_heightfromBlockHeaderInfo.height. Commit 7abd8ae fixed an error of one in the first value, so an archive written before it holds a height one too big.get_nth_main_ancestorcounts real parent links from the tip, so a biggerend_heightlands one block lower. With a tip at 100 and 50 connected, the walk asks for 51 and gets 51..82. An old archive stores 101 for the tip, so it gets 50..81 and offers block 50 again.connect_mainchain_tipsees a parent of 49 where it wants 50, and returnsInvalidMainchainParent.The mainchain task died at startup, the net task died with it, and the node accepted no peer. The task now starts again after any error, and the node waits for the mainchain services at start.