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 simulator bugfix for multisim 7601778 #4365

Merged
merged 2 commits into from
May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pending/bugfixes/sdk/4362-simulation-setu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4362 simulation setup bugfix for multisim 7601778
4 changes: 2 additions & 2 deletions cmd/gaia/contrib/runsim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
3012, 4728, 37827, 981928, 87821, 891823782,
989182, 89182391, 11, 22, 44, 77, 99, 2020,
3232, 123123, 124124, 582582, 18931893,
29892989, 30123012, 47284728,
29892989, 30123012, 47284728, 7601778,
}

// goroutine-safe process map
Expand All @@ -36,7 +36,7 @@ var (
results chan bool

// command line arguments and options
jobs int = runtime.GOMAXPROCS(0)
jobs = runtime.GOMAXPROCS(0)
blocks string
period string
testname string
Expand Down
2 changes: 1 addition & 1 deletion x/simulation/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

LivenessTransitionMatrix: defaultLivenessTransitionMatrix,
BlockSizeTransitionMatrix: defaultBlockSizeTransitionMatrix,
}
Expand Down