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

x/evidence: StoreDecoder simulation #6035

Merged
merged 15 commits into from
Apr 23, 2020
Merged

Conversation

fedekunze
Copy link
Collaborator

@fedekunze fedekunze commented Apr 20, 2020

Closes: #5961

Description


For contributor use:

  • 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.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

Merging #6035 into master will decrease coverage by 0.01%.
The diff coverage is 55.55%.

@@            Coverage Diff             @@
##           master    #6035      +/-   ##
==========================================
- Coverage   54.66%   54.64%   -0.02%     
==========================================
  Files         425      426       +1     
  Lines       25866    25890      +24     
==========================================
+ Hits        14139    14148       +9     
- Misses      10750    10763      +13     
- Partials      977      979       +2     

@fedekunze fedekunze marked this pull request as ready for review April 21, 2020 22:01
@alessio
Copy link
Contributor

alessio commented Apr 21, 2020

test-sim-nondeterminism fails

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.

I think we could simulate a bit more precisely, and are there any other evidence types yet?

x/evidence/simulation/genesis.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.

The PR is a bit misleading, no? We're not really simulating anything AFAICT. Yes, we generate some random genesis state, but that's not used for anything substantial in the state-machine apart from querying and varying state in DecodeStore.

Until we have actual evidence we can submit and verify, I'd hold off in adding this module to simulation.

@fedekunze fedekunze removed the R4R label Apr 22, 2020
@fedekunze fedekunze marked this pull request as draft April 22, 2020 14:27
@fedekunze fedekunze changed the title x/evidence: simulations x/evidence: StoreDecoder simulation Apr 23, 2020
@fedekunze fedekunze marked this pull request as ready for review April 23, 2020 14:23
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.

utACK

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.

LGTM. Added a few non-blocking nitpicks.

x/evidence/simulation/genesis.go Outdated Show resolved Hide resolved
x/evidence/simulation/decoder.go Outdated Show resolved Hide resolved
@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Apr 23, 2020
@mergify mergify bot merged commit 8c736bb into master Apr 23, 2020
@mergify mergify bot deleted the fedekunze/5961-evidence-sims branch April 23, 2020 14:51
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* x/evidence: simulations

* update app

* evidence store decoder

* add evidence to sim import export

* fix test

* prevent zero values on randomized genesis

* return empty evidences for genesis state

* address comments from review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Simulations C:x/evidence
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write simulations for evidence module
4 participants