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!: prevent modifications on governance unmodifiable params #2919

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
12 changes: 8 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,16 @@ func (*App) BlockedParams() [][2]string {
return [][2]string{
// bank.SendEnabled
{banktypes.ModuleName, string(banktypes.KeySendEnabled)},
// staking.UnbondingTime
{stakingtypes.ModuleName, string(stakingtypes.KeyUnbondingTime)},
// staking.BondDenom
{stakingtypes.ModuleName, string(stakingtypes.KeyBondDenom)},
// consensus.validator.PubKeyTypes
{baseapp.Paramspace, string(baseapp.ParamStoreKeyValidatorParams)},
// consensus.Version.AppVersion
{baseapp.Paramspace, string(baseapp.ParamStoreKeyVersionParams)},
// staking.BondDenom
{stakingtypes.ModuleName, string(stakingtypes.KeyBondDenom)},
// staking.MaxValidators
{stakingtypes.ModuleName, string(stakingtypes.KeyMaxValidators)},
// staking.UnbondingTime
{stakingtypes.ModuleName, string(stakingtypes.KeyUnbondingTime)},
Comment on lines +741 to +748
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking] this is a breaking change so if it is included in this PR then the PR title needs a ! to conform to conventional commits.

IMO we shouldn't add this to the blocked list yet. We should create a GH issue with the list of params that are governance modifiable even though the specs claim they shouldn't be. We should get team alignment on what to do for those params. Then we may update this list or update the specs accordingly. cc: @evan-forbes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah any consens breaking change needs a CIP

@fahimahmedx, this is consensus breaking since nodes running this won't change a param, where nodes that are not will change the param

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CIP doesn't have to be super in depth, since the change is pretty small, but we do still need to explain the benefits of adding or removing any params

}
}

Expand Down
2 changes: 1 addition & 1 deletion app/test/std_sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (s *StandardSDKIntegrationTestSuite) TestStandardSDK() {
name: "create param proposal change for a modifiable parameter",
msgFunc: func() (msgs []sdk.Msg, signer string) {
account := s.unusedAccount()
change := proposal.NewParamChange(stakingtypes.ModuleName, string(stakingtypes.KeyMaxValidators), "1")
change := proposal.NewParamChange(stakingtypes.ModuleName, string(stakingtypes.KeyMaxEntries), "2")
content := proposal.NewParameterChangeProposal("title", "description", []proposal.ParamChange{change})
addr := testfactory.GetAddress(s.cctx.Keyring, account)
msg, err := oldgov.NewMsgSubmitProposal(
Expand Down
Loading