-
Notifications
You must be signed in to change notification settings - Fork 224
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
SignableMsg consensus step is hardcoded to "6" #8
Comments
A little bit of where I've been stuck on fixing it is that there seems to be some inconsistency in the code base about what consensus states map to a given step. I've seen propose 0, prevote 1 and preccommit 2. I've also seen propose 0, prevote 2, preccommit 3. |
There's this mapping, where PreVote is 4 and PreCommit is 6 (ostensibly where the hardcoded 6 comes from): There's also this mapping which is already in match self {
// Votes
SignedMsgType::PreVote => 0x01,
SignedMsgType::PreCommit => 0x02,
// Proposals
SignedMsgType::Proposal => 0x20,
} The one I used in this PR was suggested by @ebuchman: match msg_type {
SignedMsgType::Proposal => 0,
SignedMsgType::PreVote => 1,
SignedMsgType::PreCommit => 2,
} I think it really doesn't matter too much so long as it moves Propose -> PreVote -> PreCommit and the step increments between each, and moving between a block ID and |
Is this still relevant? The code on |
KMS isn't seeing any deprecation warnings, so I think this can be safely removed? |
The KMS needs to know the correct round step of the consensus state for double signing detection:
https://github.com/interchainio/tendermint-rs/blob/566dfb6/src/amino_types/vote.rs#L170
See this PR for how the KMS is parsing it:
tendermint/tmkms#348
The text was updated successfully, but these errors were encountered: