Skip to content

Conversation

@meling
Copy link
Member

@meling meling commented Dec 22, 2024

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.

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.
@meling meling changed the base branch from master to config-and-latency-cleanup December 22, 2024 10:29
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.
@meling
Copy link
Member Author

meling commented Jan 5, 2025

We probably need to remove the uniqueness requirement on the locations slice.

@meling meling changed the base branch from config-and-latency-cleanup to master January 5, 2025 08:40
@AlanRostem
Copy link
Collaborator

Reviewing this now. How does the tree positions work? Is this related to a simulated network topology?

Copy link
Collaborator

@AlanRostem AlanRostem left a 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.

meling added 5 commits January 6, 2025 17:26
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.
@meling meling merged commit 66cb690 into master Jan 7, 2025
4 checks passed
@meling meling deleted the cue-config branch January 7, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants