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

R4R: Parameter Change Proposal #3880

Closed
wants to merge 89 commits into from

Conversation

mossid
Copy link
Contributor

@mossid mossid commented Mar 14, 2019

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 explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@mossid mossid added the WIP label Mar 14, 2019
@mossid
Copy link
Contributor Author

mossid commented Mar 14, 2019

Some XXXs are remaining but ready for review for most of the part.

Also, I'm not sure is it safe to modify gov.MsgSubmitProposal + any existing types, I suspect there could be an (un/) marshaling problem.

@mossid mossid marked this pull request as ready for review March 14, 2019 03:38
@mossid
Copy link
Contributor Author

mossid commented Mar 14, 2019

(I'll remove SubmitForm right now which seems like an overgeneralization)

@codecov
Copy link

codecov bot commented Mar 14, 2019

Codecov Report

Merging #3880 into develop will decrease coverage by 0.33%.
The diff coverage is 55.78%.

@@             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

@mossid mossid changed the title WIP: Parameter Change Proposal R4R: Parameter Change Proposal Mar 14, 2019
@mossid
Copy link
Contributor Author

mossid commented Apr 10, 2019

Docker related tests are failing but ready for review

@mossid mossid changed the title WIP: Parameter Change Proposal R4R: Parameter Change Proposal Apr 10, 2019
Copy link
Collaborator

@fedekunze fedekunze left a 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

cmd/gaia/app/app.go Outdated Show resolved Hide resolved
cmd/gaia/app/app.go Outdated Show resolved Hide resolved
cmd/gaia/app/app.go Outdated Show resolved Hide resolved
x/gov/client/cli/tx.go Outdated Show resolved Hide resolved
return err
content := gov.ContentFromProposalType(proposal.Title, proposal.Description, proposal.Type)
if content == nil {
return fmt.Errorf("Invalid proposal type %s", proposal.Type)
Copy link
Collaborator

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(
Copy link
Collaborator

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/gov/tags/tags.go Outdated Show resolved Hide resolved
}

// Constructs new ChangeProposal
func NewChangeProposal(title string, description string, changes []Change) ChangeProposal {
Copy link
Collaborator

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

}

// Proposal which contains multiple changes on proposals
type ChangeProposal struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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/tags/tags.go Outdated Show resolved Hide resolved
if len(c.Subkey) != 0 {
subkey = "(" + string(c.Subkey) + ")"
}
return fmt.Sprintf("{%s%s := %X} (%s)", string(c.Key), subkey, c.Value, c.Space)
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary conversion (from unconvert)

if len(c.Subkey) != 0 {
subkey = "(" + string(c.Subkey) + ")"
}
return fmt.Sprintf("{%s%s := %X} (%s)", string(c.Key), subkey, c.Value, c.Space)
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary conversion (from unconvert)

@mossid mossid requested a review from alessio as a code owner April 16, 2019 18:08
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()
Copy link
Contributor

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

@alexanderbez alexanderbez mentioned this pull request Apr 16, 2019
5 tasks
@alexanderbez
Copy link
Contributor

Superseded by #4137.

@cwgoes cwgoes deleted the joon/3565-parameter-change-proposal-2 branch April 18, 2019 09:35
This was referenced Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameter Change Proposal
8 participants