From 6172672830596cd330f60dd30f6235fdaa38aae1 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Wed, 16 Nov 2022 13:06:25 -0600 Subject: [PATCH 1/7] chore: update the default mint params --- x/mint/types/params.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 69a909af05bc..4656d6915116 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -43,11 +43,11 @@ func NewParams( func DefaultParams() Params { return Params{ MintDenom: sdk.DefaultBondDenom, - InflationRateChange: sdk.NewDecWithPrec(13, 2), - InflationMax: sdk.NewDecWithPrec(20, 2), - InflationMin: sdk.NewDecWithPrec(7, 2), + InflationRateChange: sdk.NewDecWithPrec(1, 2), + InflationMax: sdk.NewDecWithPrec(2, 2), + InflationMin: sdk.NewDecWithPrec(2, 2), GoalBonded: sdk.NewDecWithPrec(67, 2), - BlocksPerYear: uint64(60 * 60 * 8766 / 5), // assuming 5 second block times + BlocksPerYear: uint64(60 * 60 * 8766 / 15), // assuming 15 second block times } } From 938aa8d5776dfe6e03e77a80fd16c38a32d60d67 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Wed, 16 Nov 2022 13:45:01 -0600 Subject: [PATCH 2/7] chore: update the slashing modules default params --- x/slashing/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/slashing/types/params.go b/x/slashing/types/params.go index ad1d98c37f15..559ab64f4ba3 100644 --- a/x/slashing/types/params.go +++ b/x/slashing/types/params.go @@ -10,7 +10,7 @@ import ( // Default parameter namespace const ( - DefaultSignedBlocksWindow = int64(100) + DefaultSignedBlocksWindow = int64(5760) DefaultDowntimeJailDuration = 60 * 10 * time.Second ) From 8e25e29ae04817e90b538b1a0847c176506bcdd9 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Wed, 16 Nov 2022 13:48:27 -0600 Subject: [PATCH 3/7] chore: update the default staking module params --- x/staking/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/staking/types/params.go b/x/staking/types/params.go index 191b66e4c809..02c495a75a2a 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -33,7 +33,7 @@ const ( ) // DefaultMinCommissionRate is set to 0% -var DefaultMinCommissionRate = sdk.ZeroDec() +var DefaultMinCommissionRate = sdk.NewDecWithPrec(5, 2) var ( KeyUnbondingTime = []byte("UnbondingTime") From 94e00fd8cab9921e26c40ce5d46cff62d1d5e962 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Wed, 16 Nov 2022 13:49:45 -0600 Subject: [PATCH 4/7] chore: update the default params for the auth module --- x/auth/types/params.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x/auth/types/params.go b/x/auth/types/params.go index 5374534417ff..5acc4e62b06d 100644 --- a/x/auth/types/params.go +++ b/x/auth/types/params.go @@ -10,7 +10,7 @@ import ( // Default parameter values const ( - DefaultMaxMemoCharacters uint64 = 256 + DefaultMaxMemoCharacters uint64 = 128 DefaultTxSigLimit uint64 = 7 DefaultTxSizeCostPerByte uint64 = 10 DefaultSigVerifyCostED25519 uint64 = 590 @@ -71,8 +71,10 @@ func DefaultParams() Params { // SigVerifyCostSecp256r1 returns gas fee of secp256r1 signature verification. // Set by benchmarking current implementation: -// BenchmarkSig/secp256k1 4334 277167 ns/op 4128 B/op 79 allocs/op -// BenchmarkSig/secp256r1 10000 108769 ns/op 1672 B/op 33 allocs/op +// +// BenchmarkSig/secp256k1 4334 277167 ns/op 4128 B/op 79 allocs/op +// BenchmarkSig/secp256r1 10000 108769 ns/op 1672 B/op 33 allocs/op +// // Based on the results above secp256k1 is 2.7x is slwer. However we propose to discount it // because we are we don't compare the cgo implementation of secp256k1, which is faster. func (p Params) SigVerifyCostSecp256r1() uint64 { From 02151736a76d43abb43d918229cd2aebcbace899 Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Wed, 16 Nov 2022 14:25:23 -0600 Subject: [PATCH 5/7] chore: add docs to default changes Co-authored-by: Rootul P --- x/slashing/types/params.go | 2 +- x/staking/types/params.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x/slashing/types/params.go b/x/slashing/types/params.go index 559ab64f4ba3..70122a3e5b1a 100644 --- a/x/slashing/types/params.go +++ b/x/slashing/types/params.go @@ -10,7 +10,7 @@ import ( // Default parameter namespace const ( - DefaultSignedBlocksWindow = int64(5760) + DefaultSignedBlocksWindow = int64(5760) // 4 (blocks per min) * 60 (mins in hour) * 24 (hours in day) = 5760 blocks per day DefaultDowntimeJailDuration = 60 * 10 * time.Second ) diff --git a/x/staking/types/params.go b/x/staking/types/params.go index 02c495a75a2a..3f30ec4f935f 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -32,7 +32,7 @@ const ( DefaultHistoricalEntries uint32 = 10000 ) -// DefaultMinCommissionRate is set to 0% +// DefaultMinCommissionRate is set to .05 var DefaultMinCommissionRate = sdk.NewDecWithPrec(5, 2) var ( From 0e05cb2cb0174c05ea1a0ee6298d9fb5a2e627cc Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Wed, 16 Nov 2022 14:28:29 -0600 Subject: [PATCH 6/7] chore: use zero dec for inflation rate change --- x/mint/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 4656d6915116..93d680399b97 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -43,7 +43,7 @@ func NewParams( func DefaultParams() Params { return Params{ MintDenom: sdk.DefaultBondDenom, - InflationRateChange: sdk.NewDecWithPrec(1, 2), + InflationRateChange: sdk.ZeroDec(), InflationMax: sdk.NewDecWithPrec(2, 2), InflationMin: sdk.NewDecWithPrec(2, 2), GoalBonded: sdk.NewDecWithPrec(67, 2), From ea05762ded38cbf5982da1d796f52463eaa2b0da Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Wed, 16 Nov 2022 23:58:07 -0600 Subject: [PATCH 7/7] chore: revert mint module default params changes --- x/mint/types/params.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 93d680399b97..104338a12f43 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -43,9 +43,9 @@ func NewParams( func DefaultParams() Params { return Params{ MintDenom: sdk.DefaultBondDenom, - InflationRateChange: sdk.ZeroDec(), - InflationMax: sdk.NewDecWithPrec(2, 2), - InflationMin: sdk.NewDecWithPrec(2, 2), + InflationRateChange: sdk.NewDecWithPrec(13, 2), + InflationMax: sdk.NewDecWithPrec(20, 2), + InflationMin: sdk.NewDecWithPrec(7, 2), GoalBonded: sdk.NewDecWithPrec(67, 2), BlocksPerYear: uint64(60 * 60 * 8766 / 15), // assuming 15 second block times }