fix(baseapp): audit changes#16596
Merged
Merged
Conversation
facundomedica
commented
Jun 27, 2023
Comment on lines
-561
to
+563
| if cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight <= 0 { | ||
|
|
||
| extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 | ||
| if !extsEnabled { |
Contributor
Author
There was a problem hiding this comment.
Return error during ExtendVote and VerifyVoteExtension if the request height is earlier than VoteExtensionsEnableHeight.
Also if VoteExtensionsEnableHeight == 0 then vote extensions are not enabled (see the default value here)
| WithHeaderInfo(coreheader.Info{ | ||
| ChainID: app.chainID, | ||
| Height: req.Height, | ||
| Hash: req.Hash, |
Contributor
Author
There was a problem hiding this comment.
Added this given that it might be needed
The header hash of the proposed block that the vote extension is to refer to.
Comment on lines
-612
to
+617
| if cp.Abci != nil && cp.Abci.VoteExtensionsEnableHeight <= 0 { | ||
|
|
||
| extsEnabled := cp.Abci != nil && req.Height >= cp.Abci.VoteExtensionsEnableHeight && cp.Abci.VoteExtensionsEnableHeight != 0 | ||
| if !extsEnabled { |
Contributor
Author
There was a problem hiding this comment.
See lines 561-ish
julienrbrt
reviewed
Jun 29, 2023
julienrbrt
reviewed
Jun 29, 2023
alexanderbez
approved these changes
Jun 29, 2023
julienrbrt
approved these changes
Jun 29, 2023
mergify Bot
pushed a commit
that referenced
this pull request
Jun 30, 2023
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> (cherry picked from commit b93081d) # Conflicts: # CHANGELOG.md
julienrbrt
added a commit
that referenced
this pull request
Jun 30, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
audit issue: #16474
Changes
VoteExtensionsEnableHeight(see comments in this pr).Related PRs: #16713
TODO: figure out what to do when ABCI is not set in consensus params. I suppose we default to "not enable vote extensions"Vote extensions are disabled by default ifconsensusParams.Abci == nilor ifVoteExtensionsEnableHeight == 0.SetStreamingService was removed at #14207 should it get added to changelog?
Double check test:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!in the type prefix if API or client breaking change