-
Notifications
You must be signed in to change notification settings - Fork 14
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
[CORE-850] Update default values for new Gov parameters #34
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, c | |
} | ||
|
||
defaultParams := govv1.DefaultParams() | ||
params.ExpeditedMinDeposit = defaultParams.ExpeditedMinDeposit | ||
params.ExpeditedMinDeposit = params.MinDeposit // Use regular `min_deposit` as `expedited_min_deposit` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how come we only update the min deposit but not the expedited voting period and threshold? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We update these other params by though updated value of Only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense. can we update the comment to highlight "need to use the current comment doesn't explain why we are doing this |
||
params.ExpeditedVotingPeriod = defaultParams.ExpeditedVotingPeriod | ||
ttl33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
params.ExpeditedThreshold = defaultParams.ExpeditedThreshold | ||
params.ProposalCancelRatio = defaultParams.ProposalCancelRatio | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,8 @@ func TestMigrateStore(t *testing.T) { | |
bz = store.Get(v4.ParamsKey) | ||
require.NoError(t, cdc.Unmarshal(bz, ¶ms)) | ||
require.NotNil(t, params) | ||
require.Equal(t, v1.DefaultParams().ExpeditedMinDeposit, params.ExpeditedMinDeposit) | ||
// After migration, expect `ExpeditedMinDeposit` to equal previous value of `MinDeposit`. | ||
require.Equal(t, params.MinDeposit, params.ExpeditedMinDeposit) | ||
require.Equal(t, v1.DefaultParams().ExpeditedThreshold, params.ExpeditedThreshold) | ||
require.Equal(t, v1.DefaultParams().ExpeditedVotingPeriod, params.ExpeditedVotingPeriod) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't some of these values change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These lines weren't updated since both |
||
require.Equal(t, v1.DefaultParams().MinDepositRatio, params.MinDepositRatio) | ||
|
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.
Note: this
MigrationStore
is registered here, which is run inRunMigrations
during the v_4_0_0_0 upgrade.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.
can we make sure that this gets tested during our qualification in staging + testnet?