-
Notifications
You must be signed in to change notification settings - Fork 51
Do not generate a seal if the block is generated from a past view #1807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
assert!(self.is_signer_proposer(&parent_hash)); | ||
// We don't know at which view the node starts generating a block. | ||
// If this node's signer is not proposer at the current view, return none. | ||
if self.is_signer_proposer(&parent_hash) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if self.is_signer_proposer(&parent_hash) { | |
if !self.is_signer_proposer(&parent_hash) { |
// We don't know at which view the node starts generating a block. | ||
// If this node's signer is not proposer at the current view, return none. | ||
if self.is_signer_proposer(&parent_hash) { | ||
cwarn!(ENGINE, "Proposer is generated after view change"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cwarn!(ENGINE, "Proposer is generated after view change"); | |
cwarn!(ENGINE, "View is changed after requesting the seal"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's good.
d259882
to
b6362cd
Compare
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
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.