-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: Parameter Change Proposal #3880
Conversation
Co-Authored-By: mossid <torecursedivine@gmail.com>
Co-Authored-By: mossid <torecursedivine@gmail.com>
…s/cosmos-sdk into joon/3570-split-proposal-interface
Co-Authored-By: mossid <torecursedivine@gmail.com>
Co-Authored-By: mossid <torecursedivine@gmail.com>
…s/cosmos-sdk into joon/3570-split-proposal-interface
Some XXXs are remaining but ready for review for most of the part. Also, I'm not sure is it safe to modify |
(I'll remove |
Codecov Report
@@ Coverage Diff @@
## develop #3880 +/- ##
===========================================
- Coverage 60.2% 59.87% -0.34%
===========================================
Files 212 218 +6
Lines 15157 15291 +134
===========================================
+ Hits 9126 9156 +30
- Misses 5407 5512 +105
+ Partials 624 623 -1 |
Co-Authored-By: mossid <torecursedivine@gmail.com>
…-parameter-change-proposal-2
…smos/cosmos-sdk into joon/3565-parameter-change-proposal-2
…-parameter-change-proposal-2
Docker related tests are failing but ready for review |
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.
some file structuring changes mostly
x/gov/client/cli/tx.go
Outdated
return err | ||
content := gov.ContentFromProposalType(proposal.Title, proposal.Description, proposal.Type) | ||
if content == nil { | ||
return fmt.Errorf("Invalid proposal type %s", proposal.Type) |
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.
Ditto. From the line above I'd have expected something like "proposal content is empty"
simulation.RandStringOfLength(r, 5), | ||
simulation.RandStringOfLength(r, 5), | ||
gov.ProposalTypeText, | ||
gov.NewTextProposal( |
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.
should we add a parameter change proposal too ?
x/params/contents.go
Outdated
} | ||
|
||
// Constructs new ChangeProposal | ||
func NewChangeProposal(title string, description string, changes []Change) ChangeProposal { |
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.
this should be part of governance
x/params/contents.go
Outdated
} | ||
|
||
// Proposal which contains multiple changes on proposals | ||
type ChangeProposal struct { |
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.
ditto
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.
also this should be ParameterChangeProposal
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.
It will be params.ParameterChangeProposal
.. but I agree it makes more sense to name it ParameterChangeProposal
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.
Is ParamChangeProposal
looks good?
x/params/contents.go
Outdated
if len(c.Subkey) != 0 { | ||
subkey = "(" + string(c.Subkey) + ")" | ||
} | ||
return fmt.Sprintf("{%s%s := %X} (%s)", string(c.Key), subkey, c.Value, c.Space) |
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.
unnecessary conversion (from unconvert
)
x/params/contents.go
Outdated
if len(c.Subkey) != 0 { | ||
subkey = "(" + string(c.Subkey) + ")" | ||
} | ||
return fmt.Sprintf("{%s%s := %X} (%s)", string(c.Key), subkey, c.Value, c.Space) |
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.
unnecessary conversion (from unconvert
)
Co-Authored-By: mossid <torecursedivine@gmail.com>
func parseSubmitProposalFlags() (*proposal, error) { | ||
proposal := &proposal{} | ||
proposalFile := viper.GetString(flagProposal) | ||
|
||
if proposalFile == "" { | ||
proposal.Title = viper.GetString(flagTitle) | ||
proposal.Description = viper.GetString(flagDescription) | ||
proposal.Type = govClientUtils.NormalizeProposalType(viper.GetString(flagProposalType)) | ||
proposal.Type = readProposalType() |
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.
Just curious to learn why? Wasn't the inline call enough? I can't find any other place where readProposalType()
is used
Superseded by #4137. |
Replaces: #3799
Closes: #3565
Dependent on: #3779
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: