-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Non-zero Default Fees #9371
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9371 +/- ##
=======================================
Coverage 60.66% 60.66%
=======================================
Files 588 588
Lines 37266 37273 +7
=======================================
+ Hits 22607 22612 +5
Misses 12715 12715
- Partials 1944 1946 +2
|
c5b8a52
to
c85f811
Compare
I tested 2 cases:
Questions:
|
it would be useful to still test it.
There shouldn't by any default value, the app should exit. |
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.
lgtm, but we should add a test
|
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.
is this R4R
yes |
4ded361
to
1c6ea9c
Compare
@cyberbono3 could you also fix the test? |
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.
Looks good. 2 not blocking small things (would be good to have it in this PR):
- update error to wrap from errors package (as in the comment below)
- update setup guide (docs)
what setup guide do you mean here? |
I fixed that. |
@cyberbono3 did you start debugging why test-rosetta and liveness-test fail? Edit:
|
I ran this command Can you give me some context how to fix rosetta-test and liveness, please?
Should I look for this error code |
For liveness, as I pointed out above, try maybe adding For rosetta, not 100% sure where we should define min-gas-prices. Are there more logs? |
cosmos-sdk/server/config/config.go Line 15 in bb61e28
edit: #9371 (comment) seems like a better solution, as it doesn't introduce a global var |
There is a guide on how to run a node - let's add a line there that the min gas price must be correctly set (with an example). |
Maybe check with @noandrea about the Rosetta test. Not sure why it fails when we add the min fee check. |
// Optionally allow the chain developer to overwrite the SDK's default | ||
// server config. | ||
srvCfg := serverconfig.DefaultConfig() | ||
// The SDK's default minimum gas price is set to "" (empty value) inside | ||
// app.toml. If left empty by validators, the node will halt on startup. | ||
// However, the chain developer can set a default app.toml value for their | ||
// validators here. | ||
// | ||
// In summary: | ||
// - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their | ||
// own app.toml config, | ||
// - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their | ||
// own app.toml to override, or use this default value. | ||
// | ||
// In simapp, we set the min gas prices to 0. | ||
srvCfg.MinGasPrices = "0stake" |
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.
Had a chat with @aaronc last evening about this, we were looking around Viper.SetDefault
, but this morning I noticed this new initAppConfig
function introduced by @anilcse in #9550. And it seems to me like the perfect place for chain developers to set a default min gas price.
cc. @marbar3778
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 is awesome!! We should add a note in the docs, that @anilcse added, that this is possible.
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 pending an addition to docs.
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.
tACK.
Manual test:
- set
srvCfg.MinGasPrices = "10stake"
in cmd/root.go, node runs correctly, all txs need a --fee - set
srvCfg.MinGasPrices = ""
, got error:Error: set min gas price in app.toml or flag or env variable: error in app.toml
when running the node- node runs correctly if I edit
app.toml
manually
- node runs correctly if I edit
tests pass, docs added, I believe all reviews were addressed... putting automerge on! |
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ v ✰ Thanks for creating a PR! ✰ v Before smashing the submit button please review the checkboxes. v If a checkbox is n/a - please still include it but + a little note why ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> ## Description <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> closes: #9106 --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer - [ ] Review `Codecov Report` in the comment section below once CI passes (cherry picked from commit 3fd376b) # Conflicts: # CHANGELOG.md # contrib/rosetta/node/data.tar.gz # docs/core/cli.md # server/util_test.go # simapp/simd/cmd/root.go
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ v ✰ Thanks for creating a PR! ✰ v Before smashing the submit button please review the checkboxes. v If a checkbox is n/a - please still include it but + a little note why ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> ## Description <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> closes: cosmos#9106 --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer - [ ] Review `Codecov Report` in the comment section below once CI passes
Description
closes: #9106
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes