From 915632b655819b4ecdafd53404c02c33c00a99a8 Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Wed, 16 Dec 2020 11:38:17 -0800 Subject: [PATCH 1/4] Update default historical header number --- 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 a4f71802e8c4..c891a0119f40 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -29,7 +29,7 @@ const ( // DefaultHistorical entries is 100. Apps that don't use IBC can ignore this // value by not adding the staking module to the application module manager's // SetOrderBeginBlockers. - DefaultHistoricalEntries uint32 = 100 + DefaultHistoricalEntries uint32 = 10000 ) var ( From dc5e0d51ce9e1171daf93786ab857a90337c9b65 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 17 Dec 2020 13:05:31 -0300 Subject: [PATCH 2/4] Update x/staking/types/params.go Co-authored-by: Amaury --- 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 c891a0119f40..549189fa4f69 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -26,7 +26,7 @@ const ( // Default maximum entries in a UBD/RED pair DefaultMaxEntries uint32 = 7 - // DefaultHistorical entries is 100. Apps that don't use IBC can ignore this + // DefaultHistorical entries is 10000. Apps that don't use IBC can ignore this // value by not adding the staking module to the application module manager's // SetOrderBeginBlockers. DefaultHistoricalEntries uint32 = 10000 From ed3f379d12fd5de3e30b9d9ac888bb159fda021e Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Thu, 17 Dec 2020 15:31:06 -0300 Subject: [PATCH 3/4] fix tests --- x/staking/client/cli/cli_test.go | 4 ++-- x/staking/simulation/genesis_test.go | 2 +- x/staking/simulation/params_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x/staking/client/cli/cli_test.go b/x/staking/client/cli/cli_test.go index 4f8fcf52f02e..4032a913c7d1 100644 --- a/x/staking/client/cli/cli_test.go +++ b/x/staking/client/cli/cli_test.go @@ -860,13 +860,13 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { `bond_denom: stake historical_entries: 100 max_entries: 7 -max_validators: 100 +max_validators: 10000 unbonding_time: 1814400s`, }, { "with json output", []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":100,"bond_denom":"stake"}`, + `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake"}`, }, } for _, tc := range testCases { diff --git a/x/staking/simulation/genesis_test.go b/x/staking/simulation/genesis_test.go index 62926ba1f5e2..aba85cd2bf5f 100644 --- a/x/staking/simulation/genesis_test.go +++ b/x/staking/simulation/genesis_test.go @@ -43,7 +43,7 @@ func TestRandomizedGenState(t *testing.T) { require.Equal(t, uint32(207), stakingGenesis.Params.MaxValidators) require.Equal(t, uint32(7), stakingGenesis.Params.MaxEntries) - require.Equal(t, uint32(48), stakingGenesis.Params.HistoricalEntries) + require.Equal(t, uint32(8687), stakingGenesis.Params.HistoricalEntries) require.Equal(t, "stake", stakingGenesis.Params.BondDenom) require.Equal(t, float64(238280), stakingGenesis.Params.UnbondingTime.Seconds()) // check numbers of Delegations and Validators diff --git a/x/staking/simulation/params_test.go b/x/staking/simulation/params_test.go index cb52bba001c4..07da026645cf 100644 --- a/x/staking/simulation/params_test.go +++ b/x/staking/simulation/params_test.go @@ -21,7 +21,7 @@ func TestParamChanges(t *testing.T) { }{ {"staking/MaxValidators", "MaxValidators", "82", "staking"}, {"staking/UnbondingTime", "UnbondingTime", "\"275307000000000\"", "staking"}, - {"staking/HistoricalEntries", "HistoricalEntries", "29", "staking"}, + {"staking/HistoricalEntries", "HistoricalEntries", "9149", "staking"}, } paramChanges := simulation.ParamChanges(r) From dc9ad4165dbdb7b392b87a5a42f7d48c19bfecf9 Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Thu, 17 Dec 2020 16:41:59 -0300 Subject: [PATCH 4/4] duh --- x/staking/client/cli/cli_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/staking/client/cli/cli_test.go b/x/staking/client/cli/cli_test.go index 4032a913c7d1..f1ef9edc6b8a 100644 --- a/x/staking/client/cli/cli_test.go +++ b/x/staking/client/cli/cli_test.go @@ -858,9 +858,9 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { "with text output", []string{fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `bond_denom: stake -historical_entries: 100 +historical_entries: 10000 max_entries: 7 -max_validators: 10000 +max_validators: 100 unbonding_time: 1814400s`, }, {