forked from hyperledger/besu
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backward Sync should remember recent finalized blocks. (hyperledger#3808
) * Backward Sync is now remembering recent finalized blocks. When syncing using BWS we now consider finalized blocks reported by consensus layer. When no finalized block is specified, nothing strange will go on. When Finalized block is specified But Besu is not aware of any finalized block yet, we will sync as usual until the finalized block is about to get imported. A new invariant is introduced when importing blocks using BWS. All imported blocks has to descent from latest finalized block or a TTD block if we did not finalize yet. * Importing a finalized block updates the information in Besu Mutable Blockchain. * It is no longer possible to import blocks into the blockchain below a previously finalized block when using BWS * When a new finalized block gets announced while BWS is in progress and Besu already has it imported, the Mutable Blockchain gets updated, and the chain gets checked for possible pruning * When trying to import blocks of equal height as newly announced finalized block, then only the new announced finalized block will be possible to import using BWS * When importing a new block using BWS after finalized, we can now guarantee that the block descends from latest finalized block Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com> * BWS now has explicit parametrized check for how deep to sync Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com> * addressing review comments Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com> * Addressing review comment Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
- Loading branch information
Showing
22 changed files
with
1,178 additions
and
436 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.