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

Param Proposal Simulation Messages; Minting Params Fix #4244

Merged
merged 9 commits into from
May 2, 2019

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented May 1, 2019

  • Add parameter change proposal simulated messages
  • Fix minting module params
    • Implement params.ParamSet so we can set params with their respective unique keys individually

closes: #4235


  • 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 a relevant changelog entry: clog add [section] [stanza] [message]

  • 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)

@@ -76,24 +92,6 @@ func SimulateSubmittingVotingAndSlashingForProposal(k gov.Keeper) simulation.Ope
}
}

// SimulateMsgSubmitProposal simulates a msg Submit Proposal
// Note: Currently doesn't ensure that the proposal txt is in JSON form
func SimulateMsgSubmitProposal(k gov.Keeper) simulation.Operation {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

dead code

@alexanderbez alexanderbez marked this pull request as ready for review May 1, 2019 14:40
@codecov
Copy link

codecov bot commented May 1, 2019

Codecov Report

Merging #4244 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4244      +/-   ##
==========================================
- Coverage   60.42%   60.42%   -0.01%     
==========================================
  Files         218      218              
  Lines       15421    15426       +5     
==========================================
+ Hits         9318     9321       +3     
- Misses       5452     5454       +2     
  Partials      651      651

1 similar comment
@codecov
Copy link

codecov bot commented May 1, 2019

Codecov Report

Merging #4244 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4244      +/-   ##
==========================================
- Coverage   60.42%   60.42%   -0.01%     
==========================================
  Files         218      218              
  Lines       15421    15426       +5     
==========================================
+ Hits         9318     9321       +3     
- Misses       5452     5454       +2     
  Partials      651      651

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

A few comments, structure looks fine.

@alexanderbez alexanderbez requested a review from cwgoes May 2, 2019 13:22
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.

overall LGTM, some minor comments only for consistency

@@ -197,11 +198,11 @@ func appStateRandomizedFn(r *rand.Rand, accs []simulation.Account, genesisTimest
slashingGenesis := slashing.GenesisState{
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
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, slashing has no such function. Separate PR.

@@ -6,6 +6,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/params"
)

var minterKey = []byte{0x00} // the one key to use for the keeper store

const (
// ModuleName is the name of the module
ModuleName = "minting"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this differs with the module name (?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed. I didn't write this module -- it should be changed. Separate PR though.


// Implements params.ParamSet
func (p *Params) ParamSetPairs() params.ParamSetPairs {
return params.ParamSetPairs{
Copy link
Collaborator

Choose a reason for hiding this comment

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

it'd be cool to use params.NewParamSetPairs here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need New* constructor for slice literals, but certainly their contents.

@alexanderbez alexanderbez requested a review from fedekunze May 2, 2019 17:28
@alexanderbez
Copy link
Contributor Author

Addressed your comments @fedekunze

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.

LGTM

@alexanderbez alexanderbez merged commit 29ed730 into master May 2, 2019
@alexanderbez alexanderbez deleted the 4235-param-change-sim-msgs branch May 2, 2019 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simulation: Parameter Change Proposal Messages
4 participants