-
Notifications
You must be signed in to change notification settings - Fork 796
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds duplicate detection of publish and confirm_ack messages before t…
…hey are deserialized. When they are unique, the digest is saved and passed around to network processing which may drop the messages if the block or vote processor is full. After processing, there are instances where digests have to be cleared from the filter to ensure the original message can be received again: - Cleaning up a long unchecked block erases that element from the publish filter. - Reaching max capacity of the inactive votes cache clears the oldest item from the cache and the confirm_ack filter. For this reason, inactive_votes_cache now stores the digests, and votes pulled from this cache for new elections are now erased. - Interactions between bootstrap frontier confirmation and inactive_votes_cache - An active election is dropped. The vote digest is now saved here as well. Special case if a vote came from inactive_votes_cache, must ensure the digest is passed along. Many tests were added to ensure proper clearing of the filter when blocks and votes are dropped. The blocks_filter has been removed due to redundancy. 16 extra bytes are used for each vote in an (inactive) vote stored in memory.
- Loading branch information
1 parent
95de70d
commit 07328be
Showing
24 changed files
with
579 additions
and
133 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
Oops, something went wrong.