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

Move bypassMinFeeMsgTypes and MaxTotalBypassMinFeeMsgGasUsage to params #2366

Closed
yaruwangway opened this issue Apr 5, 2023 · 0 comments · Fixed by #2424 or #2352
Closed

Move bypassMinFeeMsgTypes and MaxTotalBypassMinFeeMsgGasUsage to params #2366

yaruwangway opened this issue Apr 5, 2023 · 0 comments · Fixed by #2424 or #2352
Assignees

Comments

@yaruwangway
Copy link
Contributor

yaruwangway commented Apr 5, 2023

Problem

Presently, in cosmoshub, each transaction has to pay fees except bypass-min-fee-msg-types within a certain gas limit (MaxBypassMinFeeMsgGasUsage).

Each node can setup its own bypass-min-fee-msg-types. MaxTotalBypassMinFeeMsgGasUsage is a variable in hardcoded. As a result, it is not clear which msg can be bypassed and if the msgs can bypass min fee is uncertain.

The bypass-min-fee-msg-types and MaxTotalBypassMinFeeMsgGasUsage will move to params so that they can be changed by gov proposal, and the whole network accept the same bypass msgs and bypass gas limit. The bypass-min-fee-msg-types and MaxTotalBypassMinFeeMsgGasUsage can be also queried, so that for transaction submitter, it is clear what msgs can be bypassed.

Moving bypass-min-fee-msg-types and MaxTotalBypassMinFeeMsgGasUsage to params is also allows fee check in deliverTX. Details please check here.

Please note, the above mentioned refactor is State breaking !!!

Proposal

This refactor will include:

  1. add bypassMinFeeMsgTypes and MaxTotalBypassMinFeeMsgGasUsage to global fee params. For example, when query global fee, can get the following params:
{
  "minimum_gas_prices": [
    {
      "denom": "uatom",
      "amount": "1.000000000000000000"
    },
  ],
  "bypass_min_fee_msg_types": [
    "/ibc.core.channel.v1.MsgRecvPacket",
    "/ibc.core.channel.v1.MsgAcknowledgement",
    "/ibc.core.client.v1.MsgUpdateClient",
    "/ibc.core.channel.v1.MsgTimeout",
    "/ibc.core.channel.v1.MsgTimeoutOnClose"
  ],
  "max_total_bypass_minFee_msg_gas_usage": "1000000"
}
  1. add validationFn for bypassMinFeeMsgTypes and MaxTotalBypassMinFeeMsgGasUsage.
  2. add migration, when migrating from v9 -> v10,
    bypass_min_fee_msg_types=[ "/ibc.core.channel.v1.MsgRecvPacket", "/ibc.core.channel.v1.MsgAcknowledgement", "/ibc.core.client.v1.MsgUpdateClient", "/ibc.core.channel.v1.MsgTimeout", "/ibc.core.channel.v1.MsgTimeoutOnClose"] and max_total_bypass_minFee_msg_gas_usage=1000000 will be set as default.
  3. removebypass-min-fee-msg-types from config. please check this issue
@github-project-automation github-project-automation bot moved this to 🩹 Triage in Cosmos Hub Apr 5, 2023
@yaruwangway yaruwangway moved this from 🩹 Triage to 🏗 In progress in Cosmos Hub Apr 5, 2023
@shaspitz shaspitz moved this from 🏗 In progress to 👀 In review in Cosmos Hub Apr 10, 2023
@shaspitz shaspitz moved this from 👀 In review to 🏗 In progress in Cosmos Hub Apr 10, 2023
@mpoke mpoke moved this from 🏗 In progress to 👀 In review in Cosmos Hub Apr 24, 2023
@yaruwangway yaruwangway self-assigned this May 11, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Cosmos Hub May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
2 participants