Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot and finalizer commits integration #836

Closed
4 tasks done
frolosofsky opened this issue Mar 25, 2019 · 0 comments · Fixed by #911
Closed
4 tasks done

Snapshot and finalizer commits integration #836

frolosofsky opened this issue Mar 25, 2019 · 0 comments · Fixed by #911
Assignees
Labels
feature New functionality
Milestone

Comments

@frolosofsky
Copy link
Member

frolosofsky commented Mar 25, 2019

There's a snapshot based fast-sync mechanism that restores the UTXO database. It was described in UIP-11. Although it's implemented and tested, it doesn't work in a real-life because during fast-sync we lose all the finalization information.

There's also a way of a finalization state exchange that was described in UIP-21. Presently it's used in full-sync only to provide additional input for the fork-choice rule (UIP-12). However, it can be used for the fast-sync purpose as well.

Steps to make integration work:

@frolosofsky frolosofsky added the feature New functionality label Mar 25, 2019
@frolosofsky frolosofsky added this to the 0.1 milestone Mar 25, 2019
@frolosofsky frolosofsky changed the title Commits full-sync and fast sync integration Snapshot and finalizer commits integration Mar 25, 2019
frolosofsky added a commit that referenced this issue Apr 5, 2019
This PR adds integration code for snapshot and finalizer commits that effectively enables fast-sync with minor restrictions (#852 (review)). On the first step of fast-sync, node restores finalization state by downloading finalizer commits from peers. On the second step, node downloads UTXO snapshot from peers and then downloads last missing blocks.

TODO: 
* [x] Check that all the votes are recorded during commits exchange when fast-sync enabled.

Chapter in the #836 story.

Signed-off-by: Stanislav Frolov <stanislav@thirdhash.com>
frolosofsky added a commit that referenced this issue Apr 9, 2019
* Rely on commits in CBlockIndex

After commits merkle root added (#815) we can trust these commits
so that we can use them when restoring finalization state from disk.

It's the last chapter and it finally fixes #836.

Signed-off-by: Stanislav Frolov <stanislav@thirdhash.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants