-
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 1 commit
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) | ||
// Expect ExpeditedMinDeposit to equal previous MinDeposit after migraiton. | ||
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) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,21 +11,28 @@ | |
|
||
// Default period for deposits & voting | ||
const ( | ||
DefaultPeriod time.Duration = time.Hour * 24 * 2 // 2 days | ||
DefaultPeriod time.Duration = time.Hour * 24 * 2 // 2 days | ||
// (New default value for v0.50 migration) 24 hours voting period for expedited proposals. | ||
DefaultExpeditedPeriod time.Duration = time.Hour * 24 * 1 // 1 day | ||
DefaultMinExpeditedDepositTokensRatio = 5 | ||
) | ||
|
||
// Default governance params | ||
var ( | ||
DefaultMinDepositTokens = sdkmath.NewInt(10000000) | ||
DefaultMinDepositTokens = sdkmath.NewInt(10000000) | ||
// During v0.50 migration, this default value is overwritten with existing value of `MinDeposit`. | ||
DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio)) | ||
DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3) | ||
DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1) | ||
DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(667, 3) | ||
DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3) | ||
DefaultMinInitialDepositRatio = sdkmath.LegacyZeroDec() | ||
DefaultProposalCancelRatio = sdkmath.LegacyMustNewDecFromStr("0.5") | ||
// (New default value for v0.50 migration) 75% of Yes votes required for an expedited proposal to pass. | ||
ttl33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(75, 2) | ||
DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3) | ||
DefaultMinInitialDepositRatio = sdkmath.LegacyZeroDec() | ||
// (New default value for v0.50 migration) 100% of deposit will not be returned to the depositors, | ||
// if the proposal is cancelled. Also, `MsgCancelProposal` is disabled in application. | ||
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. Disabling |
||
DefaultProposalCancelRatio = sdkmath.LegacyMustNewDecFromStr("1.0") | ||
// (New default value for v0.50 migration) 100% of deposit is burned if the proposal is cancelled. | ||
// Also, `MsgCancelProposal` is disabled in application. | ||
DefaultProposalCancelDestAddress = "" | ||
DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) | ||
DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) | ||
|
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?