-
Notifications
You must be signed in to change notification settings - Fork 161
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
fix: set 0 min gas prices #1411
Conversation
cc: @robert-zaremba / @brandoncomer |
how about the following:
|
Works for me, I'll convert to draft. Will bother infra about creating a new net for @brandoncomer on mon. |
On second thought, I don't think keplr will do this before we hit mainnet. @robert-zaremba @toteki can we please do this after v3? e: we've got to put this in, @toteki please check out tests while I work on the integrations 🙏 |
Codecov Report
@@ Coverage Diff @@
## main #1411 +/- ##
==========================================
+ Coverage 52.52% 52.83% +0.31%
==========================================
Files 70 70
Lines 6692 6751 +59
==========================================
+ Hits 3515 3567 +52
- Misses 2909 2914 +5
- Partials 268 270 +2
|
…/umee into woz/set-zero-min-gas-prices
lgtm except for the upgrade test failure (just can't approve my own PRs 😅) |
@@ -63,7 +63,10 @@ func checkFees(minGasPrices sdk.DecCoins, fees sdk.Coins, gasLimit uint64) error | |||
requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) | |||
} | |||
|
|||
if !fees.IsAnyGTE(requiredFees) { | |||
// Clear any zero coins from requiredFees in the case of zero min gas price | |||
requiredFees = sdk.NewCoins(requiredFees...) |
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.
this line is not needed - let's update the loop above:
requiredFees := make(sdk.Coins, len(minGasPrices), 0)
// Determine the required fees by multiplying each required minimum gas
// price by the gas limit, where fee = ceil(minGasPrice * gasLimit).
glDec := sdk.NewDec(int64(gasLimit))
for _, gp := range minGasPrices {
if gp.IsZero() || gasLimit == 0 {
continue
}
fee := gp.Amount.Mul(glDec)
requiredFees = append(requiredFees, sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()))
}
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.
cc: @toteki
Description
This is necessary for testing since keplr's suggestchain feature only allows default gas prices computations. We should add this in another prop after v3
This is initially opened for discussion
Update: Let's use this to build a network to test keplr against for the frontend team.
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...