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 #34

Merged
merged 3 commits into from
Feb 2, 2023
Merged

feat: add gashub module #34

merged 3 commits into from
Feb 2, 2023

Conversation

pythonberg1997
Copy link
Contributor

@pythonberg1997 pythonberg1997 commented Feb 1, 2023

Description

Add gashub module to manage tx gas in a new way.

Rationale

To make the txs' gas consume more stable and predictable, we decide to adapt a new way to manage tx gas.

For now, each msg type has a gas calculator and params corresponding to it and all other parts that would consume gas have been removed.

Example

image

For example, the MsgMultiSend's calculator will return a gas number depending on the msg's to/from list length and related params.

Changes

Notable changes:

  • add gashub module
  • delete ConsumeTxSizeGasDecorator ante handler
  • adapt new ante handler(ValidateTxSizeDecorator and ConsumeMsgGasDecorator) to manage tx gas

app/ante/ante.go Outdated
)

// HandlerOptions are the options required for constructing a default SDK AnteHandler.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment here is not right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixd

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.

3 participants