Skip to content
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

Vote extensions: Add consensus param for extension activation logic #9862

Merged
merged 8 commits into from
Dec 9, 2022

Conversation

sergio-mena
Copy link
Contributor

Closes #9861

The first commit is a cherry-pick of #8547.
Subsequent commits are fixing the build and the unit tests

N.B: The changelog will be updated once branch feature/abci++vef is merged back into main


PR checklist

  • Tests written/updated, or no tests needed
  • CHANGELOG_PENDING.md updated, or no changelog entry needed
  • Updated relevant documentation (docs/) and code comments, or no
    documentation updates needed

williambanfield and others added 7 commits December 9, 2022 00:29
… 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
@sergio-mena sergio-mena requested a review from a team December 8, 2022 23:38
@sergio-mena sergio-mena self-assigned this Dec 8, 2022
Copy link
Contributor

@williambanfield williambanfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good here, added some non-blocking comments.

ext, err := cs.blockExec.ExtendVote(vote)
if err != nil {
return nil, err
if cs.state.ConsensusParams.ABCI.VoteExtensionsEnabled(cs.Height) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that the timeout logic is missing here, but I can't quite discern what it was doing to begin with

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you refer to the (background) differences seen at this point in the diff-of-diffs.
I looked into it and the difference seems to be #6240. However its description is rather terse.
In any case, my guess is that those changes have to do with enhancing the privval interface, which (I think) has little to do with ABCI.

@@ -0,0 +1,13 @@
package test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was in internal/test/factory/, if that doesn't exist, then here is fine, but leaving this comment here in case this was accidentally not moved to the proper path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, for some reason, code belonging to internal/test/factory/ started landing in internal/test/ last summer. So this is keeping up with that.
I think we'll need to re-think how to rearrange the code currently in internal/, since we no longer have "internal" production code. Maybe the way forward is to move again part of the production code to internal. Time will tell.

var err error
// temporary extra key before consensus param protos are regenerated
// TODO(wbanfield) remove in next PR
tmpABCIKey, err = orderedcode.Append(nil, int64(10000))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is deleted in a future PR, this is fine. orderedcode is not used in main but was in v0.36.x so reference to it should not outlive this set of pull requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :-)
In the next one

@sergio-mena sergio-mena merged commit 03bdcad into feature/abci++vef Dec 9, 2022
@sergio-mena sergio-mena deleted the sergio/9861-add-consensus-param branch December 9, 2022 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done/Merged
Development

Successfully merging this pull request may close these issues.

None yet

3 participants