-
Notifications
You must be signed in to change notification settings - Fork 715
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!: bypass-min-fee migration #2352
Conversation
…g_gas_usage to globalfee params
2f327ae
to
edd0e51
Compare
CHANGELOG.md
Outdated
@@ -35,6 +35,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
# Changelog | |||
|
|||
## [Unreleased] | |||
* Add `bypass-min-fee-msg-types` and `maxTotalBypassMinFeeMsgGagUsage` to globalfee params (state breaking and API breaking!!!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add issue and pr link here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. Just some nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Don't think I have enough context to give an approval, but I looked over the changes and they look good to me. Just one tiny nitpick in a bash script.
Fix nitpick Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes are due to updating the module version from cosmos/gaia/v9...
to cosmos/gaia/v10
.
Other than that, the actual migration logic is minimal.
Approval!
// "/ibc.core.channel.v1.MsgTimeout", | ||
// "/ibc.core.channel.v1.MsgTimeoutOnClose"] as default and | ||
// add MaxTotalBypassMinFeeMsgGasUsage that is set 1_000_000 as default. | ||
func MigrateStore(ctx sdk.Context, globalfeeSubspace paramtypes.Subspace) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this is the actual migration logic. Most of other files are boilerplate changes due to module renaming from cosmos/gaia/v9...
to cosmos/gaia/v10
MaxTotalBypassMinFeeMsgGasUsage: defaultParams.MaxTotalBypassMinFeeMsgGasUsage, | ||
} | ||
|
||
if !globalfeeSubspace.HasKeyTable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: if keytable does not exist - create it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approval
} | ||
|
||
if !globalfeeSubspace.HasKeyTable() { | ||
globalfeeSubspace.WithKeyTable(types.ParamKeyTable()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yaruwangway @MSalopek I don't think this line does anything. Correct me if I'm wrong. WithKeyTable
seems to return a modified subspace that is thrown out here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it should already registered keytable, this is not necessary here. but it does not harm to recheck. keytable regissters the kv, and the validation methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the returned value tho right?
globalfeeSubspace.WithKeyTable(types.ParamKeyTable()) | |
newSubspace := globalfeeSubspace.WithKeyTable(types.ParamKeyTable()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in this PR, thank you! #2524
Description
Create v10 upgrade handler and migration scripts adding
bypass-min-fee-msg-types
andMaxBypassMinFeeMsgGasUsage
to the global fee module params.query the params, chain inited by gaiad v9:
gaiad q globalfee minimum-gas-prices
curl http://localhost:1317/gaia/globalfee/v1beta1/minimum_gas_prices
query the params, chain inited by gaiad v10:
This PR partially closes #2366 and closes #2457.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change