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

feat: add gashub module #72

Merged
merged 13 commits into from
Jan 5, 2023
Merged

feat: add gashub module #72

merged 13 commits into from
Jan 5, 2023

Conversation

pythonberg1997
Copy link
Contributor

@pythonberg1997 pythonberg1997 commented Dec 22, 2022

Description

Add a new gashub module to manage the msg gas fee.

Now there's a relatively definite gas for every different msg type, which is determined by the msg gas params and the corresponding gas calculator.

For the developer, if a new msg type is added, the corresponding gas params and calculator for that msg type should be added to the gashub module accordingly.

Rationale

Transaction's gas consumption can be relatively definite under gashub.

Example

  1. Add new msg gas params to cosmos/gashub/v1alpha1/gashub.proto
  2. Add corresponding config to x/gashub/types/params.go
  3. Register new msg gas calculator

image

Changes

  • Add a new gashub module to manage msg gas params and gas calculator
  • Remove gas consume from kv operations
  • Remove other gas consume usages

x/auth/ante/msg_fee.go Outdated Show resolved Hide resolved
x/auth/ante/msg_fee.go Outdated Show resolved Hide resolved
x/auth/ante/msg_fee.go Outdated Show resolved Hide resolved
x/auth/ante/msg_fee.go Outdated Show resolved Hide resolved
x/feehub/types/params.go Outdated Show resolved Hide resolved
x/auth/ante/msg_gas.go Outdated Show resolved Hide resolved
x/auth/ante/msg_gas.go Outdated Show resolved Hide resolved
x/auth/ante/msg_gas.go Outdated Show resolved Hide resolved
x/auth/ante/msg_gas.go Outdated Show resolved Hide resolved
x/auth/ante/msg_gas.go Outdated Show resolved Hide resolved
x/feehub/types/params.go Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the C:Store label Jan 3, 2023
x/authz/keeper/keeper.go Outdated Show resolved Hide resolved
@pythonberg1997 pythonberg1997 marked this pull request as ready for review January 5, 2023 02:21
x/staking/types/authz.go Outdated Show resolved Hide resolved
@unclezoro
Copy link
Collaborator

please refine the description of the PR.

@pythonberg1997 pythonberg1997 changed the title feat: add feehub module feat: add gashub module Jan 5, 2023
@unclezoro unclezoro merged commit f8ae8d6 into develop Jan 5, 2023
@pythonberg1997 pythonberg1997 deleted the feehub branch January 11, 2023 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants