-
Notifications
You must be signed in to change notification settings - Fork 67
Cue-based experiment configurations #139
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
Conversation
The cue-based configuration allows to specify separate machines for clients and replicas. Further, it allows to specify how many replicas and clients should be placed on those machines. The Go code takes care of assigning replicas and clients to machines based on the number of replicas and clients specified in the config. Furthermore, you may optionally specify locations where the replicas should be placed (and corresponding latencies will be applied by the latency framework). Finally, you may also specify treePositions for the replicas; the treePositions refers to the positions in the locations list, and follow a given format (root, left, right, left-left...) Finally, you may also specify Byzantine strategies of the different replicas in the locations list, by providnig a map from strategy name (slow, silent) to a list of replicas that exhibit this behavior. Please see the schema.cue for specification of constraints, and the code for details on how to use it within the framework.
We don't need to provide a latency file if we are not using the locations field. We currently don't check if locations is provided (so we still allow to provide the latenciesFile even though we don't use it when locations isn't provided.)
This allows to specify also the branch factor to use for a given tree configuration.
We no longer support providing latency file at runtime as part of the config; we instead compile the hotstuff binary with the appropriate latency file. Hence, you should run the latencygen before running with a given configuration. One issue is that the config file may contain location names that don't match the csv latency file.
|
We probably need to remove the uniqueness requirement on the locations slice. |
|
Reviewing this now. How does the tree positions work? Is this related to a simulated network topology? |
AlanRostem
left a comment
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.
Cue-based config tests work, are thorough, and the changes do not conflict with the existing config setup.
As we discussed, this needs to be adapted to the experimentation framework in a future PR.
It seems reasonable to allow duplicates in the locations slice, since some deployments may have muliple replicas at the same location. I don't recall the reason for the previous decision to require that a location can only be used once.
If we find that we need the join func elsewhere in hotstuff, we should move the join function to a more suitable location for shared library use. Maybe it should be added to the std lib.
The cue-based configuration allows to specify separate machines
for clients and replicas. Further, it allows to specify how many
replicas and clients should be placed on those machines. The Go
code takes care of assigning replicas and clients to machines
based on the number of replicas and clients specified in the config.
Furthermore, you may optionally specify locations where the replicas
should be placed (and corresponding latencies will be applied by
the latency framework). Finally, you may also specify treePositions
for the replicas; the treePositions refers to the positions in the
locations list, and follow a given format (root, left, right, left-left...)
Finally, you may also specify Byzantine strategies of the different
replicas in the locations list, by providing a map from strategy
name (slow, silent) to a list of replicas that exhibit this behavior.
Please see the schema.cue for specification of constraints, and the
code for details on how to use it within the framework.