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] simulation: Make validator choice use validator set #2660

Merged
merged 2 commits into from
Nov 1, 2018

Conversation

ValarDragon
Copy link
Contributor

@ValarDragon ValarDragon commented Nov 1, 2018

This also had to change the default seed, since with the previous one it
actually got into a state where there were no validators left bonded, lol.

This also changes Unbond msgs from failing with almost 100% probability to now
only failing with 33% probability.
Thus more of the state machine is getting tested!

This does slow it down a fair amount (went from 500 blocks in ~55 seconds, to now 500 blocks in 100 seconds) but I think this is a fair trade-off since now its actually testing these, whereas before it wasn't.

Before:

stake/MsgDelegate/false => 650
stake/MsgDelegate/true => 2896
stake/MsgBeginUnbonding/false => 3481
stake/MsgBeginUnbonding/true => 70

After:

stake/MsgDelegate/false => 291
stake/MsgDelegate/true => 2864
stake/MsgBeginUnbonding/false => 1156
stake/MsgBeginUnbonding/true => 2181

Closes #2621

  • 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 - sim is the test

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

This also had to change the default seed, since with the previous one it
actually got into a state where there were no validators left bonded, lol.

This also changes Unbond msgs from failing with almost 100% probability to now
only failing with 33% probability.
Thus more of the state machine is getting tested!
@codecov
Copy link

codecov bot commented Nov 1, 2018

Codecov Report

Merging #2660 into develop will decrease coverage by 0.04%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           develop    #2660      +/-   ##
===========================================
- Coverage    58.82%   58.77%   -0.05%     
===========================================
  Files          152      152              
  Lines         9425     9433       +8     
===========================================
  Hits          5544     5544              
- Misses        3511     3519       +8     
  Partials       370      370

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.

All for this! Good summary. Thanks @ValarDragon .

testedACK

@alexanderbez alexanderbez changed the title simulation: Make validator choice use validator set [R4R] simulation: Make validator choice use validator set Nov 1, 2018
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

@cwgoes cwgoes merged commit f4d3e65 into develop Nov 1, 2018
@cwgoes cwgoes deleted the dev/reduce_msg_fails branch November 2, 2018 00:00
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.

3 participants