-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lib/grandpa): capped number of tracked vote messages (#2485)
- Vote messages tracker - Removes oldest vote message when tracker capacity is reached - Efficient removal of multiple messages at any place in the tracker queue (linked list) if they get processed - Efficient removal of oldest message - Uses a bit more space to store each block hash + authority ID, for each vote message - Order is not modified for the same vote message (same block hash and authority id) - Discard vote messages for more than 1 round in the future from the state round (thanks [andresilva](https://github.com/andresilva)) - Discard vote messages for more than 1 round in the past from the state round (thanks [andresilva](https://github.com/andresilva)) - Disable `addCatchUpResponse` (not implemented yet) to avoid a possible memory leak/abuse, see #1531 - Comment with issue number about the reputation change of peers for bad vote messages Co-authored-by: Timothy Wu <[email protected]>
- Loading branch information
Showing
5 changed files
with
625 additions
and
97 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
Oops, something went wrong.