-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 simulator bugfix for multisim 7601778 #4365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Codecov Report
@@ Coverage Diff @@
## master #4365 +/- ##
=======================================
Coverage 58.11% 58.11%
=======================================
Files 235 235
Lines 14880 14880
=======================================
Hits 8647 8647
Misses 5605 5605
Partials 628 628 |
@@ -134,7 +134,7 @@ func RandomParams(r *rand.Rand) Params { | |||
PastEvidenceFraction: r.Float64(), | |||
NumKeys: RandIntBetween(r, 2, 250), | |||
EvidenceFraction: r.Float64(), | |||
InitialLivenessWeightings: []int{r.Intn(80), r.Intn(10), r.Intn(10)}, | |||
InitialLivenessWeightings: []int{RandIntBetween(r, 1, 80), r.Intn(10), r.Intn(10)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to "protect" the last two parameters to be above 0 as well? If not, maybe another sampling procedure would be required to insure that the sum > 0
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean by that is that any of these values (single one or two of them) being 0 is valid, what is not is if they are all 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope I don't think it matters, As long as there is "some" liveliness we're good aka "protecting" just one of the weightings is fine. I think it's good to simulate with a liveliness weighting of 0 as it's a valid value.
closes #4362
For the record what was happening is all three integers set in
InitialLivenessWeightings
were set to 0 making the "total" of that equal to zero which caused an error for rand here:cosmos-sdk/x/simulation/transition_matrix.go
Line 61 in a23eb32
docs/
)clog add [section] [stanza] [message]
Files changed
in the github PR explorerFor Admin Use: