-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tortoise: stay in verifying mode while recovering from disk (#5514)
closes #5246 verifying mode is a faster way to count ballots, and it is also has fewer known security issues. during debug i observed the following problems, which are mostly fixed here: - certificates are not kept forever and hence tortoise cannot form an opinion on the layer without them. to correctly handle that we update last layer and opinion is loaded the database. - when data is recovered from disk we need to start counting from the first layer in the epoch, in order to compute reference epoch height. this variable is used later in verifyLayers call - after layers were recovered we compute matching opinions and evict unnecessary events. this eviction was too agressive and should be limited to layers that were verified by tortoise. this is to avoid the same race as in #5523 additionally i switched tortoise to use IterateAtxs directly on the database without using lru cache, as it is faster and intend to work on dropping that in other components.
- Loading branch information
Showing
13 changed files
with
406 additions
and
77 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.