abci++: add consensus parameter logic to control vote extension require height#8547
abci++: add consensus parameter logic to control vote extension require height#8547williambanfield merged 83 commits intomasterfrom
Conversation
e5121a3 to
f1db90a
Compare
creachadair
left a comment
There was a problem hiding this comment.
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
ConsensusParamsfield, 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?
boolparameter was added to theVoteSetconstructor. This bool toggles whether or not theVoteSetwill 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.gofile. This check is done in the presence of the newVoteParamsdata and can conditionally check if the extension should be required.ExtendedCommitdata. This facilitates updates because legacy chains will never have stored theExtendedCommitand only haveSeenCommitdata.Other changes
VerifyVoteExtensionABCI 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 addboolparameter toNewVoteSet, but it really seems like the simplest change without a larger refactor of theVoteSettype. 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?NewStrictVoteSetandNewVoteSetwith different validation criteria for added votes.VoteParams.ExtensionRequireHeight? It seems fine but perhaps there's better.Next Steps
.protocode.blocksyncoptional vote extension logic.