Skip to content
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): Reset GasMeter before deliverTX (backport #18714) #18774

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 18, 2023

This is an automatic backport of pull request #18714 done by Mergify.
Cherry-pick of e7f5c2e has failed:

On branch mergify/bp/release/v0.50.x/pr-18714
Your branch is up to date with 'origin/release/v0.50.x'.

You are currently cherry-picking commit e7f5c2ec8.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   baseapp/abci.go
	modified:   baseapp/baseapp_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

(cherry picked from commit e7f5c2e)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot requested a review from a team as a code owner December 18, 2023 09:35
@mergify mergify bot added the conflicts label Dec 18, 2023
Comment on lines 761 to +767

events = append(events, beginBlock.Events...)

// Reset the gas meter so that the AnteHandlers aren't required to
gasMeter = app.getBlockGasMeter(app.finalizeBlockState.ctx)
app.finalizeBlockState.ctx = app.finalizeBlockState.ctx.WithBlockGasMeter(gasMeter)

Copy link
Contributor

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).internalFinalizeBlock (baseapp/abci.go:680)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/abci.go:837)

Copy link
Member

Choose a reason for hiding this comment

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

Personally, I think like that bot, so not sure if we can. However, it seems like it wouldn't change anything for those using the default ante handlers? So it is only a behavior change for those not using them? (Which still leaves the first question because of that use case)

@julienrbrt julienrbrt merged commit 7a43e49 into release/v0.50.x Dec 18, 2023
43 of 46 checks passed
@julienrbrt julienrbrt deleted the mergify/bp/release/v0.50.x/pr-18714 branch December 18, 2023 18:25
@faddat faddat mentioned this pull request Nov 8, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants