-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: keep behavior from v0.47 in PrepareProposal panic recovery #17930
Conversation
@facundomedica your pull request is missing a changelog! |
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.
Shouldn't we not do the same L463 as well then?
https://github.com/cosmos/cosmos-sdk/pull/17930/files#diff-389d02f089ab55575400f5300d3c5cfe277fde5f04bd0fe6a85456a7252d1099R463
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.
Thanks @facundomedica! To lock in this behavior and ensure that it doesn't regress, let's add a regression test in which prepareProposal intentionally panics and then the regression test should confirm that the response has the set Txs as well as the error and the desired panic message. If we had that test in the first place, this would have been tightly flagged.
@odeke-em added a test, please check now |
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, thank you @facundomedica. I realize we can't check directly against the message but the regression test suffices to capture that even on intentional panics, we send back the Txs
(cherry picked from commit 223e179) # Conflicts: # baseapp/abci_test.go
Description
In v0.47.x when recovering from a panic during PrepareProposal we return a proposal that includes all the transactions that it got from RequestPrepareProposal. This was later modified (without a clear reason afaik, maybe just by mistake).
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
make lint
andmake test
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