-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node,consensus: no duplicate proposals allowed
This addresses a strange proposal announcement amplification that can occur given the right timing. In short, to support reannoucement of block proposals as well as preventing malicious spam proposals from stacking up behind the consensus event loop, we made the entire proposal stream handler atomic w.r.t. AcceptProposal => download = NotifyBlockProposal. However, NotifyBlockProposal is mostly asynchronous, meaning the next call to AcceptProposal will return true and allow the same proposal, which includes a full block, to be downloaded again and queued in another consensus msg for NotifyBlockProposal. To resolve this, we take a nearly identical approach to that used with AcceptCommit and its stream handler. The main difference being that we completely block any subsequent proposal until the prior is processed (either fully rejected or fully accepted and block execution begun).
- Loading branch information
1 parent
c2d4b51
commit cc32a05
Showing
9 changed files
with
105 additions
and
54 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
Oops, something went wrong.