Skip to content

Conversation

@kushti
Copy link
Member

@kushti kushti commented Oct 1, 2022

Unlike previous attempts to repair db of node being stuck, this one is removing invalid blocks in the past (in 128 blocks depth from the tip) and in future (not just the next height).

Could be useful to unstuck with pre 4,0,100 databases stuck after the HF.

@kushti kushti requested a review from pragmaxim October 1, 2022 22:59
}
if(updatedHeightIdsValue.isEmpty) {
//could be the case after bestHeaderHeight
history.historyStorage.remove(Array(history.heightIdsKey(h)), Nil)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also remove the Modifier at this height? Not just index? Or is there an idempotency in place that the modifer gets overriden if index is empty?

//could be the case after bestHeaderHeight
history.historyStorage.remove(Array(history.heightIdsKey(h)), Nil)
} else {
history.historyStorage.insert(Array(history.heightIdsKey(h) -> updatedHeightIdsValue), Nil)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what we are updating the valid header index with and why, that would need at least a comment

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.

4 participants