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

Reconcile the Msg Fees Ante Handlers with Cosmos v0.46. #1006

Closed
4 tasks
Tracked by #960
SpicyLemon opened this issue Aug 15, 2022 · 2 comments · Fixed by #1060
Closed
4 tasks
Tracked by #960

Reconcile the Msg Fees Ante Handlers with Cosmos v0.46. #1006

SpicyLemon opened this issue Aug 15, 2022 · 2 comments · Fixed by #1060
Assignees
Labels
msgfees Msg based fee module
Milestone

Comments

@SpicyLemon
Copy link
Contributor

SpicyLemon commented Aug 15, 2022

Summary

Straighten out the msg fee antehandler stuff.

Problem Definition

With Cosmos v0.46, there are a bunch of changes to the antehandlers. Those changes don't mesh well with our own decorators.

Proposal

Refactor the NewMsgFeesDecorator, NewTxGasLimitDecorator, NewMsgFeesDecorator, and NewProvenanceDeductFeeDecorator to account for changes made in the SDK, e.g. they changed NewMempoolFeeDecorator into their own NewDeductFeeDecorator.

As part of this, Update internal/handlers/msg_service_router_test.go to remove the t.Skip() calls that prevent the tests from running (because they currently fail).


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@SpicyLemon
Copy link
Contributor Author

See #1018 for some options on this.

@SpicyLemon
Copy link
Contributor Author

SpicyLemon commented Aug 31, 2022

The post handler happens before consumeBlockGas(). But according to our comment in baseapp.go where that's called, we want consumeBlockGas() called BEFORE we try to charge the extra fees.

// When block gas exceeds, it'll panic and won't commit the cached store.
// this should be called before we charge additional fee( otherwise would
// defy the whole point of charging additional fee at the end)
consumeBlockGas()

So we can't use the baseapp, postHandler for these fees.

@SpicyLemon SpicyLemon self-assigned this Aug 31, 2022
Repository owner moved this from Todo to Done in Provenance Core Protocol Team Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msgfees Msg based fee module
Projects
Development

Successfully merging a pull request may close this issue.

1 participant