Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'eichhorl/share-retransmission' into 'master'
feat(consensus): CON-1087 Don't relay shares during retransmissions For the redesigned P2P-consensus interface, it is important that consensus respects a certain bound on the number of artifacts it advertizes, otherwise we could get stuck. Relaying shares could make consensus violate the bound, as it was calculated assuming no relaying. While proactive relaying of shares was disabled in https://gitlab.com/dfinity-lab/public/ic/-/merge_requests/12942, they may still be relayed by nodes answering "retransmission requests" of other nodes catching up, or coming back online. With this MR, shares not signed by the own node are no longer returned from `get_all_validated_by_filter` which excludes them when answering retransmission requests. This requires us to add the own node ID to consensus and certification pools. **Additionally:** - Ensure that overflows when incrementing the filter are handled properly. - For certifications, make sure to always take the maximum between the filter and the lowest artifact available. Otherwise we might try to lookup all artifacts between height 0 and the current height, even if those artifacts don't exist. - Extend unit test to exercise these edge cases. See merge request dfinity-lab/public/ic!15569
- Loading branch information
Showing
18 changed files
with
401 additions
and
50 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.