-
Notifications
You must be signed in to change notification settings - Fork 13
Introduce additional simulation options and restructure constants #179
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
Refactor the simulation initialization to accept a variable number of Option arguments. These options transform constants into adjustable parameters, such as the latency model, enabling a versatile combination of simulation scenarios. Update the test suite to reflect these changes, eliminating redundant code. Convert dedicated tests into table tests, which now include basic tests covering BLS, non-BLS, agreement, and split convergence onto the base chain. Refactor no-latency, also known as sync tests, to explicitly utilize a latency.None model, enhancing clarity. Restructure adversary instantiation within a Generator. This change streamlines the adversary API, allowing it to leverage the existing gpbft API for initiating adversary logic, and obviates the need for specific Begin functions previously invoked sporadically across tests. Additionally, introducing generators enables the simulation API to present a fixed set of receivers and privatize most fields and receiver functions, minimizing potential errors when utilizing simulation APIs. The current revisions include several TODO markers for future enhancements to maintain a manageable scope of changes in this pull request. The refactoring facilitates the future addition of probabilistic adversary populations and probabilistic ec chain mutations, with implementation details to follow in subsequent PRs.
| opts.graniteConfig = &defaultGraniteConfig | ||
| } | ||
| if opts.signingBacked == nil { | ||
| opts.signingBacked = signing.NewFakeBackend() |
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.
BLS envvar override is missing
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.
Moved to f3sim command as it is the entrypoint to running a simulation.
Does that make sense?
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.
When working on BLS, I used it to run all the tests with BLS as a final sanity check.
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.
Noted. I'll make sure that env var is respected in test scope.
Kubuxu
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.
Apart from the one comment, SGWM.
Refactor the simulation initialization to accept a variable number of Option arguments. These options transform constants into adjustable parameters, such as the latency model, enabling a versatile combination of simulation scenarios.
Update the test suite to reflect these changes, eliminating redundant code. Convert dedicated tests into table tests, which now include basic tests covering BLS, non-BLS, agreement, and split convergence onto the base chain.
Refactor no-latency, also known as sync tests, to explicitly utilize a latency.None model, enhancing clarity.
Restructure adversary instantiation within a Generator. This change streamlines the adversary API, allowing it to leverage the existing gpbft API for initiating adversary logic, and obviates the need for specific Begin functions previously invoked sporadically across tests. Additionally, introducing generators enables the simulation API to present a fixed set of receivers and privatize most fields and receiver functions, minimizing potential errors when utilizing simulation APIs.
The current revisions include several TODO markers for future enhancements to maintain a manageable scope of changes in this pull request. The refactoring facilitates the future addition of probabilistic adversary populations and probabilistic ec chain mutations, with implementation details to follow in subsequent PRs.