-
Notifications
You must be signed in to change notification settings - Fork 106
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
Check flag on simulation #264
Conversation
// 1 - check only at root | ||
// 2 - check at each level of the tree | ||
VerifyResponse int | ||
|
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.
Instead of giving it as a parameter in the message, you can also use a setter and call that setter in https://github.com/dedis/cothority/blob/master/lib/sda/simulation.go#L43 - which will be somewhere in https://github.com/dedis/cothority/blob/check/protocols/cosi/simulation.go#L83 - if you do that, be sure to call
cs.SimulationBFTree.Node( config )
before, so that the tree and the entityList are set up. This setter has access to all config.toml
-parameters, too. So you can directly set any parameter from the simulation.
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.
Please, make an example because I don't see how can I access each node in this function.
Moreover, when we will attack the external api issue, a lot of things will be able to pass through that.
Anyway, it's only for simulation anyway, all theses protocols should not be used as something else...!
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.
Here you go for an example:
Check with simulation node
|
||
ln := tree.ListNodes() | ||
randomNode := ln[rand.Intn(len(ln))] | ||
var idx int |
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.
Nice, some serious testing :-)
+1 for merge |
Not sure if this related to changes made here, but running the simulation with debug level 3 shows quite some race conditions. |
Thanks for catching that - has to be fixed. What simulation were you running? |
|
Race conditions on CoSi is removed from another PR now merged into development. |
Agreed. |
Merged: Check flag on simulation
Refers to #260