-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix DoubleProposalProof
s
#2983
base: albatross
Are you sure you want to change the base?
Fix DoubleProposalProof
s
#2983
Conversation
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.
Looks good to me outside of the MacroHeader.round
check being incorrect (existed prior to this PR). So that should be removed. Other comments are purely cosmetic .
117207b
to
4f21297
Compare
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.
LGTM. Left minor comments only.
let hash1: Blake2bHash = proposal1.proposal.hash(); | ||
let hash2: Blake2bHash = proposal2.proposal.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.
Maybe we should add an assert for the equal rounds here. Not strictly necessary but DoubleProposalProof
s without matching rounds are invalid and should never be created.
let hash1: Blake2bHash = proposal1.proposal.hash(); | |
let hash2: Blake2bHash = proposal2.proposal.hash(); | |
assert_eq!(proposal1.round, proposal2.round); | |
let hash1: Blake2bHash = proposal1.proposal.hash(); | |
let hash2: Blake2bHash = proposal2.proposal.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.
Not done for now because we currently don't do that for the creation of any equivocation proof structure. We could automatically call verify
I guess and assert!
that it verifies. But maybe we could also do that at the call sites?
They required data unrelated to the signed proposals. It now uses the same signing infrastructure by factoring it out to `TendermintProposal` in a common crate. Fixes #2981.
The round in the proposal message is the relevant one.
This means that two different `TendermintProposal`s with the same `MacroHeader` are now also considered a violation.
4f21297
to
d0055b1
Compare
They required data unrelated to the signed proposals. It now uses the same signing infrastructure by factoring it out to
TendermintProposal
in a common crate.Fixes #2981.