-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix(baseapp): ABCI Consensus Failure Fix #16700
Conversation
cosmos#16448) Co-authored-by: Jeancarlo Barrios <[email protected]>
…) (cosmos#16451) Co-authored-by: Chill Validation <[email protected]>
// vote extensions, so skip those. | ||
txResults := make([]*abci.ExecTxResult, 0, len(req.Txs)) | ||
for _, rawTx := range req.Txs { | ||
var response *abci.ExecTxResult | ||
|
||
if _, err := app.txDecoder(rawTx); err == nil { | ||
txResults = append(txResults, app.deliverTx(rawTx)) | ||
response = app.deliverTx(rawTx) | ||
} else { | ||
// In the case where a transaction included in a block proposal is malformed, | ||
// we still want to return a default response to comet. This is because comet |
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.
Change potentially affects state.
Call sequence:
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/abci.go:648)
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.
can we make this against main, then a bot will backport it
@tac0turtle Switched and caught up to main. |
CHANGELOG.md
Outdated
@@ -312,6 +312,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* (x/crypto) [#15258](https://github.com/cosmos/cosmos-sdk/pull/15258) Write keyhash file with permissions 0600 instead of 0555. | |||
* (cli) [#16138](https://github.com/cosmos/cosmos-sdk/pull/16138) Fix snapshot commands panic if snapshot don't exists. | |||
* (x/gov) [#16230](https://github.com/cosmos/cosmos-sdk/pull/16231) Fix: rawlog JSON formatting of proposal_vote option field | |||
* (baseapp) [#16700](https://github.com/cosmos/cosmos-sdk/pull/16700) Fix: Consensus Failure in returning no response to malformed transactions |
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.
Can you move the changelog to unreleased?
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.
preliminary ACK, thanks @davidterpay!
However, we need to:
- Update the changelog entry placement as @julienrbrt pointed out
- Add a unit test in
abci_test.go
that creates and sets proposal handlers that inject VE. Note, we already have VE handlers that do this, you just need to set them.
Pushed a unit test that
|
CHANGELOG.md
Outdated
@@ -38,6 +38,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
|
|||
## [Unreleased] | |||
|
|||
* (baseapp) [#16700](https://github.com/cosmos/cosmos-sdk/pull/16700) Fix: Consensus Failure in returning no response to malformed transactions |
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.
nit, can you place it under the bug fixes category
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.
lgtm! one nit.
nit fixed 🫡 |
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Jeancarlo Barrios <[email protected]> Co-authored-by: Julien Robert <[email protected]> Co-authored-by: Chill Validation <[email protected]> (cherry picked from commit 078e7cb) # Conflicts: # CHANGELOG.md
Co-authored-by: David Terpay <[email protected]> Co-authored-by: Julien Robert <[email protected]>
Phenomenal work @davidterpay -- thanks so much 🙏 |
Description
In this PR, I fix the issue outlined here #16676. TLDR is that
FinalizeBlock
must return a response for all transactions included in a proposal, otherwise Comet will trigger a consensus failure.Closes: #16676
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.md
Reviewers 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