Skip to content

Vote extensions: add proto fields for enabling extensions#9865

Merged
sergio-mena merged 7 commits intofeature/abci++veffrom
sergio/9864-add-proto-fields
Dec 13, 2022
Merged

Vote extensions: add proto fields for enabling extensions#9865
sergio-mena merged 7 commits intofeature/abci++veffrom
sergio/9864-add-proto-fields

Conversation

@sergio-mena
Copy link
Contributor

@sergio-mena sergio-mena commented Dec 9, 2022

Closes #9864

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

This PR is best reviewed with a diff-of-diffs with the original PR.

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 5 commits December 9, 2022 22:33
…#8587)

This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced.

This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well.

closes: #8453
@sergio-mena sergio-mena requested a review from ebuchman as a code owner December 9, 2022 21:42
@sergio-mena sergio-mena requested a review from a team December 9, 2022 21:42
@sergio-mena sergio-mena self-assigned this Dec 9, 2022
return false
}
}
if that1 == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

can that pass the test in 664 and we still have that1 be nil here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Lásaro, this is autogenerated code from protobufs, so we can't really change it
(we commit the autogenerated code because we chose not to require end users to install the toolchain to generate the code at every build)

Comment on lines +682 to +685
if this.VoteExtensionsEnableHeight != that1.VoteExtensionsEnableHeight {
return false
}
return true
Copy link
Contributor

@lasarojc lasarojc Dec 12, 2022

Choose a reason for hiding this comment

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

would

Suggested change
if this.VoteExtensionsEnableHeight != that1.VoteExtensionsEnableHeight {
return false
}
return true
return this.VoteExtensionsEnableHeight == that1.VoteExtensionsEnableHeight

be idiomatic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here, autogenerated code

Copy link
Contributor

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

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

Did a side-by-side diff of the two PRs. LGTM!

Co-authored-by: Thane Thomson <connect@thanethomson.com>
@sergio-mena
Copy link
Contributor Author

Will post a PR reducing/eliminating the flakiness of TestBroadcastTxForPeerStopsWhenReactorStops

@sergio-mena sergio-mena merged commit 0bc5399 into feature/abci++vef Dec 13, 2022
@sergio-mena sergio-mena deleted the sergio/9864-add-proto-fields branch December 13, 2022 11:05
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.

4 participants