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

Sim refactor 1: move store decoders to modules #4847

Merged
merged 25 commits into from
Aug 13, 2019

Conversation

fedekunze
Copy link
Collaborator

split work from: #4811 (88fac24)

  • 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] [-t <tag>] [-m <msg>]

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

@codecov
Copy link

codecov bot commented Aug 5, 2019

Codecov Report

Merging #4847 into master will decrease coverage by 0.38%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master    #4847      +/-   ##
==========================================
- Coverage   54.02%   53.63%   -0.39%     
==========================================
  Files         269      270       +1     
  Lines       17141    16982     -159     
==========================================
- Hits         9261     9109     -152     
+ Misses       7192     7184       -8     
- Partials      688      689       +1

@fedekunze fedekunze added Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. C:Simulations WIP labels Aug 6, 2019
@rigelrozanski rigelrozanski self-requested a review August 6, 2019 17:32
Copy link
Contributor

@rigelrozanski rigelrozanski left a comment

Choose a reason for hiding this comment

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

The general approach looks good @fedekunze !

simapp/utils.go Outdated Show resolved Hide resolved
simapp/app.go Outdated Show resolved Hide resolved
simapp/utils.go Show resolved Hide resolved
simapp/utils_test.go Outdated Show resolved Hide resolved
types/store.go Outdated Show resolved Hide resolved
@fedekunze fedekunze marked this pull request as ready for review August 7, 2019 14:59
@fedekunze fedekunze added R4R and removed WIP labels Aug 7, 2019
x/mint/simulation/store.go Outdated Show resolved Hide resolved
x/supply/module.go Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
simapp/sim_test.go Outdated Show resolved Hide resolved
x/auth/simulation/decoder/store_test.go Outdated Show resolved Hide resolved
x/auth/simulation/decoder/store_test.go Outdated Show resolved Hide resolved
@fedekunze fedekunze changed the title move sim store decoders to modules Sim Refactor 1: move sim store decoders to modules Aug 8, 2019
@fedekunze fedekunze changed the title Sim Refactor 1: move sim store decoders to modules Sim refactor 1: move store decoders to modules Aug 8, 2019
client/cmd_test.go Outdated Show resolved Hide resolved
client/cmd_test.go Outdated Show resolved Hide resolved
types/store.go Show resolved Hide resolved
Copy link
Contributor

@rigelrozanski rigelrozanski left a comment

Choose a reason for hiding this comment

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

Approval tentative to new comments being addressed! I'm quite happy with this new code generally! 👏

simapp/utils.go Outdated Show resolved Hide resolved
simapp/utils.go Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
x/gov/simulation/decoder/store_test.go Outdated Show resolved Hide resolved
x/mint/simulation/decoder/store.go Outdated Show resolved Hide resolved
x/mint/simulation/decoder/store_test.go Outdated Show resolved Hide resolved
x/slashing/simulation/decoder/store.go Outdated Show resolved Hide resolved
x/slashing/simulation/decoder/store_test.go Outdated Show resolved Hide resolved
fedekunze and others added 3 commits August 9, 2019 19:48
Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

just left godoc suggestions

types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
x/params/module.go Outdated Show resolved Hide resolved
x/mint/module.go Outdated Show resolved Hide resolved
x/mint/module.go Outdated Show resolved Hide resolved
x/gov/module.go Outdated Show resolved Hide resolved
x/genutil/module.go Outdated Show resolved Hide resolved
x/genaccounts/module.go Outdated Show resolved Hide resolved
x/distribution/module.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Great work @fedekunze; left some feedback, but over LGTM.

Also, why have x/{module}/simulation/operations/* instead of just x/{module}/simulation/*

.pending/improvements/simulation/_4847-simulation-man Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
types/module/module.go Outdated Show resolved Hide resolved
@fedekunze
Copy link
Collaborator Author

why have x/{module}/simulation/operations/* instead of just x/{module}/simulation/*

@alexanderbez because the random messages defined there (x/{module}/simulation/operations/msgs.go) import each module's Handler. If we flatten it, it would cause circle deps.

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK 🍎

@rigelrozanski rigelrozanski merged commit c441ce2 into master Aug 13, 2019
@rigelrozanski rigelrozanski deleted the fedekunze/move-sim-decoders branch August 13, 2019 22:16
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* move store decoders to modules

* fix

* module pattern

* compile

* update Decoders params

* fix

* address @colin-axner comments

* Update cmd_test.go

* simulation manager

* mino fixes

* cleanup

* Apply suggestions from code review

Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>

* address @rigelrozanski comments

* changelog

* Apply suggestions from code review

Co-Authored-By: colin axner <colinaxner@berkeley.edu>

* restructure modules simulation pkgs

* address @alexanderbez comments

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Simulations Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants