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

feat: Non-zero Default Fees #9371

Merged
merged 31 commits into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ef14cc8
draft
cyberbono3 May 20, 2021
c85f811
add MinGasPrices check in interceptConfigs
cyberbono3 May 21, 2021
34e7484
Update server/start.go
cyberbono3 May 27, 2021
57ed05c
revert changes in interceptConfigs in server/util.go
cyberbono3 May 27, 2021
2d0e734
implement config.ValidateBasic method and call it within startInProcess
cyberbono3 May 27, 2021
4ec4af0
fix ValidateBasic
cyberbono3 May 27, 2021
e52ee4f
run gofmt
cyberbono3 May 28, 2021
04bf221
minor fixes
cyberbono3 May 28, 2021
59c615f
gofmt
cyberbono3 May 28, 2021
345e531
uncapitalize error string
cyberbono3 May 28, 2021
1c6ea9c
draft TestStartCmdwithEmptyandNonEmptyMinGasPrices
cyberbono3 Jun 9, 2021
99ef5da
WIP fix panic in appCreator in startInProcess
cyberbono3 Jun 14, 2021
174fb8d
WIP appCreator argument in server.startInProcess
cyberbono3 Jun 14, 2021
3fe4b98
use a.NewApp as argument in server.StartCmd
cyberbono3 Jun 14, 2021
4c126fc
could not read GenesisDoc file error
cyberbono3 Jun 15, 2021
b0c80b4
Fix test
amaury1093 Jun 16, 2021
06e9d47
fix lint issues
cyberbono3 Jun 16, 2021
8da8817
revert unneeded changes
cyberbono3 Jun 16, 2021
5e2ce12
add changelog entry
cyberbono3 Jun 16, 2021
2f71a76
revert unnecessary change
cyberbono3 Jun 17, 2021
3bd6fda
declare ErrSetMinGasPrice
cyberbono3 Jun 17, 2021
122a752
Update server/rosetta/lib/errors/errors_test.go
cyberbono3 Jun 17, 2021
64c0c30
add docs to exported stuff
cyberbono3 Jun 22, 2021
7496080
create CLI Breaking Changes section in CHANGELOG.md
cyberbono3 Jun 23, 2021
af31bbf
merge master to my branch
cyberbono3 Jun 23, 2021
40eb4eb
fix failed test
cyberbono3 Jun 24, 2021
58d180c
apply robert suggestion
cyberbono3 Jun 24, 2021
7694dbd
Allow chain devs to set min gas prices
amaury1093 Jun 25, 2021
aa9b055
Merge branch 'master' into cyberbono3/non-zero-default-fees
amaury1093 Jun 25, 2021
81d7718
Add docs
amaury1093 Jun 25, 2021
d77b083
make rosetta-data
amaury1093 Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,7 @@ func GetConfig(v *viper.Viper) Config {
},
}
}

func (c Config) ValidateBasic() bool {
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved
return c.BaseConfig.MinGasPrices != ""
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved
}
5 changes: 4 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ which accepts a path for the resulting pprof file.
serverCtx.Logger.Info("starting ABCI without Tendermint")
return startStandAlone(serverCtx, appCreator)
}

serverCtx.Logger.Info("starting ABCI with Tendermint")

// amino is needed here for backwards compatibility of REST routes
Expand Down Expand Up @@ -274,6 +274,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
ctx.Logger.Debug("initialization: tmNode started")

config := config.GetConfig(ctx.Viper)
if !config.ValidateBasic() {
return fmt.Errorf("MinGasPrices is not empty")
}

// Add the tx service to the gRPC router. We only need to register this
// service if API or gRPC is enabled, and avoid doing so in the general
Expand Down
3 changes: 1 addition & 2 deletions server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func interceptConfigs(rootViper *viper.Viper) (*tmcfg.Config, error) {
if err != nil {
return nil, fmt.Errorf("failed to parse %s: %w", appCfgFilePath, err)
}

config.WriteConfigFile(appCfgFilePath, appConf)
}

Expand All @@ -241,7 +240,7 @@ func interceptConfigs(rootViper *viper.Viper) (*tmcfg.Config, error) {
if err := rootViper.MergeInConfig(); err != nil {
return nil, fmt.Errorf("failed to merge configuration: %w", err)
}

return conf, nil
}

Expand Down