You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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>
* 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>
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:
#836
references in the code base (Rely on commits in CBlockIndex #911).The text was updated successfully, but these errors were encountered: