Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Index consistency check uses better checkpoints #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

avieth
Copy link
Contributor

@avieth avieth commented Aug 20, 2019

When the proxy starts up, it will check consistency between the index and database. It's possible that part of the index is not in the main database, whether because the database was updated in some out-of-band way, or because the proxy was shut down after the database forked but before the index was able to respond and synchronize.

Previously the index would be completely rebuild whenever its tip was not in the database. Now, it will use fibonacci checkpoints up to the security parameter k, just like for Shelley ChainSync and Byron chain download. If none of these at most k index entries have corresponding blocks in the database, then the whole thing will be rebuilt.

This includes #27. Should not be reviewed/merged until after that one.

@avieth avieth force-pushed the avieth/index_checkpoints branch 2 times, most recently from 856f344 to 5cdad07 Compare September 2, 2019 21:30
@avieth avieth requested review from coot and dcoutts September 23, 2019 16:46
@avieth avieth force-pushed the avieth/index_checkpoints branch from 5cdad07 to 63b8f0c Compare September 23, 2019 16:52
Now the index will not always rollback to origin when its tip is not in
the database. It will try to find an intersection point within the
security parameter, and roll back only to that point.
@avieth avieth force-pushed the avieth/index_checkpoints branch from 63b8f0c to 772e701 Compare January 21, 2020 18:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant