-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement validation for buffered partial messages (#829)
When messages arrive with yet to be discovered EC chain we want to do as much validation as possible before buffering the message for future use. Because the key of the EC chain is included in the partial messages we are able to validate basically everything about the message except the chain itself. The changes here implement this ability. The implementation introduces a new validator implementation specifically written to handle partial messages. The validation rules are similar to the full GMesssage validator but then are adopted to infer the state of a message from chain key instead. A separate issue is captured to reduce duplicate rules across the two validators. This refactor is postponed on purpose as it touches a lot of the core implementations. Instead, the implementation here aims to provide a correct partial validation mechanism to progress efforts. The new validation makes a final validation attempt once the chain is discovered to check the validity of chain, its consistency with key and justification. The partial validator maintains its own cache, similar to the full validator, where messages are evicted as soon as GPBFT progresses. The caches between full and partial validators are independent and do not have an overlap: a message that can immediately be completed is never cached by the partial validator and vise versa. This should keep the total memory footprint across the both validators basically the same as before. Fixes #813
- Loading branch information
Showing
4 changed files
with
452 additions
and
43 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.