Skip to content

Support specify more flexible gas price on feemarket chains #2566

Closed
@yihuang

Description

Summary

Since the introduction of priority mempool and feemarkets, we need more flexibility to customize the tx building process, mainly the gas price-related stuff.
Also as a workaround of the tx reorder issue, we need different strategies for different chains to control the tx priority:

  • With the SDK default mechanism plus this fix, the current static gas price works fine.
  • With the feemarket introduced in ethermint, we need to add an extension option(ExtensionOptionDynamicFeeTx) to specify a max_priority_price.

Problem Definition

Proposal

  • Change the type of config::GasPrice to sth like:

    enum GasPrice {
      Static(string, f64),
      EthermintDynamicFee(string, f64, u64),
    }
  • Update tx building logic accordingly.

  • Add a config item to specify extension options for the tx.

    enum ExtensionOption {
      EthermintDynamicFee(string),
    }

Acceptance Criteria


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions