-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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: correctly assign execModeSimulate
to context for simulateTx
(backport #20342)
#20346
fix: correctly assign execModeSimulate
to context for simulateTx
(backport #20342)
#20346
Conversation
This comment has been minimized.
This comment has been minimized.
|
||
if mode == execModeSimulate { | ||
ctx, _ = ctx.CacheContext() | ||
ctx = ctx.WithExecMode(sdk.ExecMode(execModeSimulate)) | ||
} | ||
|
||
return ctx |
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).getContextForTx (baseapp/baseapp.go:660)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).runTx (baseapp/baseapp.go:818)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).deliverTx (baseapp/baseapp.go:748)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).internalFinalizeBlock (baseapp/baseapp.go:692)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/baseapp.go:853)
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, thou cant seem to make linter happy
haha okay I thought I was going insane haha |
seems like this has been a while for v0.50.x, we could just add nolint check here to work around this |
Description
Correctly assigns context
execMode
when simulating txs toexecModeSimulate
.Fixes out-of-gas errors propagated from relayers in ibc e2e tests in: cosmos/ibc-go#6278
Tested e2es locally by checking out
release/v0.50.x
and using go mod replace for cosmos-sdk with the diff in this PR.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...
!
in 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...
Summary by CodeRabbit
This is an automatic backport of pull request #20342 done by [Mergify](https://mergify.com).