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

UPDATE: Respect the minimum-gas-prices configuration #4340

Closed
Olshansk opened this issue Sep 5, 2024 · 4 comments
Closed

UPDATE: Respect the minimum-gas-prices configuration #4340

Olshansk opened this issue Sep 5, 2024 · 4 comments
Assignees
Labels
type:enh Improvement or update to existing feature(s).

Comments

@Olshansk
Copy link

Olshansk commented Sep 5, 2024

In one of our PRs, we need to manually match up code with config.yml because some defaults are not copied over by ignite (see the following screenshot).

Screenshot 2024-09-05 at 2 22 01 PM

This is a request to reflect minimum-gas-prices when running ignite generate

@Olshansk Olshansk added the type:enh Improvement or update to existing feature(s). label Sep 5, 2024
@okdas
Copy link

okdas commented Sep 6, 2024

I believe this is not a bug but is done intentionally for some reason.

I've noticed that after one of the ignite updates, the content of app.toml no longer carries over the comments for configuration options as well. I'd love to know the reasoning behind this decision. :)

@salmad3 salmad3 moved this from To Discuss to Todo in Ignite CLI Masterboard Jan 23, 2025
@Pantani Pantani self-assigned this Feb 24, 2025
@Pantani
Copy link
Collaborator

Pantani commented Mar 6, 2025

@Olshansk ignites replies to all the configurations from the ignite config.yaml for your app config when you init your chain using the ignite chain init or ignite chain serve. After this PR, we also replied to the config using the chain build, debug, and faucet commands.

You can see here, first, we set a default value for minimum-gas-prices, and after, we replace it with the value if the user defines the value into the ignite config yaml

staked, err := sdktypes.ParseCoinNormalized(validator.Bonded)
if err != nil {
return err
}
gas := sdktypes.NewInt64Coin(staked.Denom, 0)
appConfig.Set("minimum-gas-prices", gas.String())
// Update config values with the validator's Cosmos SDK app config
if err := updateTomlTreeValues(appConfig, validator.App); err != nil {
return err
}

@Pantani
Copy link
Collaborator

Pantani commented Mar 6, 2025

@okdas, The reason is that the go YAML parser can't parse the comments correctly, and the comments are tough to maintain if we edit the file from the code

@Pantani
Copy link
Collaborator

Pantani commented Mar 6, 2025

@Olshansk, the ignite generate command is agnostic to the config file. It doesn't need a config file, and replacing config files using a command unrelated to the init chain can be a mess for some users

@Pantani Pantani closed this as completed Mar 6, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Ignite CLI Masterboard Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enh Improvement or update to existing feature(s).
Projects
Status: Done
Development

No branches or pull requests

3 participants