-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
abci++: add consensus parameter logic to control vote extension require height #8547
Conversation
e5121a3
to
f1db90a
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.
This looks good, I have only a few small comments/questions.
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This is my understanding. I will make an extra pass at the spec to make sure its text fits this logic. I'm starting to look at the changes now, but, from the PR description it seems the logic for (not) calling |
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Consider |
Ah! That was done here, but that could have been made more explicit in the PR description. That logic is implemented within the consensus state machine:
|
Thanks for all the improvements. I had approved yesterday, and between then and now I've been through the whole patch again several times. |
@sergio-mena Thanks for the review! The only I'm working through is the e2e tests. I didn't catch that the test harness actually generates votes, so I have to make sure that it's using the proper types and methods. |
Yay! |
…re height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
…re height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
… extension require height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
… extension require height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
…9862) * [cherry-picked] abci++: add consensus parameter logic to control vote extension require height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453 * Fix UTs * fix blocksync reactor import of state store * fixes1 * fixed_more_UTs * Fix TestHandshakeReplaySome * Fix all unit tests * Added hunk in original commit Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com> Co-authored-by: Callum Waters <cmwaters19@gmail.com>
What does this PR do?
This PR makes vote extensions optional within Tendermint. A new
ConsensusParams
field, calledVoteParams.ExtensionRequireHeight
, has been added to toggle whether or not extensions should be optional or required depending on the current height of the consensus engine. Related to: #8453How does this PR make requiring vote extensions optional?
bool
parameter was added to theVoteSet
constructor. This bool toggles whether or not theVoteSet
will panic on missing extensions. If the vote set is configured to check the extension, or the extension signature is present, the signature is verified with the public key.state.go
file. This check is done in the presence of the newVoteParams
data and can conditionally check if the extension should be required.ExtendedCommit
data. This facilitates updates because legacy chains will never have stored theExtendedCommit
and only haveSeenCommit
data.Other changes
VerifyVoteExtension
ABCI call if the vote was issued from the same validator. I believe this was discussed as the preferred logic previously but not implemented yet. @sergio-mena, can you confirm this?Questions to reviewers
I don't love, nor do I think anyone does, thechanged to addbool
parameter toNewVoteSet
, but it really seems like the simplest change without a larger refactor of theVoteSet
type. The logic for verifying vote signatures lives within theVoteSet.AddVote(...)
method, so teasing these apart would be a larger change. Is there a similarly simple change that can achieve the result without the bool parameter?NewStrictVoteSet
andNewVoteSet
with different validation criteria for added votes.VoteParams.ExtensionRequireHeight
? It seems fine but perhaps there's better.Next Steps
.proto
code.blocksync
optional vote extension logic.