Do not generate a seal if the block is generated from a past view#1807
Merged
majecty merged 1 commit intoCodeChain-io:masterfrom Oct 8, 2019
Merged
Do not generate a seal if the block is generated from a past view#1807majecty merged 1 commit intoCodeChain-io:masterfrom
majecty merged 1 commit intoCodeChain-io:masterfrom
Conversation
foriequal0
requested changes
Oct 7, 2019
Contributor
There was a problem hiding this comment.
Suggested change
| if self.is_signer_proposer(&parent_hash) { | |
| if !self.is_signer_proposer(&parent_hash) { |
Contributor
There was a problem hiding this comment.
Suggested change
| cwarn!(ENGINE, "Proposer is generated after view change"); | |
| cwarn!(ENGINE, "View is changed after requesting the seal"); |
Author
There was a problem hiding this comment.
View is not changed after the seal request. View is changed after the block generation request.
What do you think about "Seal request for an old view"?
d259882 to
b6362cd
Compare
foriequal0
previously approved these changes
Oct 7, 2019
If generating a block takes too much time, the view could be changed before the miner module requests the signature. If the Tendermint module receives a signature request of an old view, it should ignore the message. Before this commit, the Tendermint module was crashing when it gets a signature request from an old view.
b6362cd to
d6cf766
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If generating a block takes too much time, the view could be changed
before the miner module requests the signature. If the Tendermint
module receives a signature request of an old view, it should ignore
the message. Before this commit, the Tendermint module was
crashing when it gets a signature request from an old view.
It fixes #1805.