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
Implement divergent EC chain in simulations #187
Conversation
5a3a566
to
2953820
Compare
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.
I skimmed, looking mainly at the tests and how they changed. The main code still needs a proper review.
Looks good except for some confusion around which value is being expected, or how it's fetched, in the multi-instance tests.
2953820
to
0c0caaa
Compare
5965ccb
to
4506c1c
Compare
4506c1c
to
52f910b
Compare
So far simulations used the same EC chain across all participants after the first instance. This approach was simple but not representative of the real-world where the EC chain may diverge across multiple subsets of participants. The changes here implement a comprehensive set of APIs that allow a set of EC generation strategies to mix-and-match and replicate complex EC chain evolution through iterations of a simulation. The chain evolution is controllable by instance by actor ID. This allows us to simulate fluctuating EC evolution patterns throughout a simulation. The changes include an initial set of EC generators that cover: * Fixed EC for all instances and participants. * Random EC per instance per participant. * Random EC per instance but uniform across all participants. * Common prefix EC per instance with probabilistic length * Majority common prefix across a set of participants with probabilistic length The EC generators can be aggregated and set per number of participants, which enables simulation of a flexible set of scenarios including evolving majority common prefix. Fixes #115
280f454
to
1519aec
Compare
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.
SGTM
Thanks for pushing forward to land something.
Yes.
But what about scenarios without EC divergence? I'm just trying to preserve the behaviour in those. The code that landed in multi_instance_test looks fine. If the same thing can be achieved without running the sim into instance one-past-the-end, that will be fine too. But if what I'm saying sounds like nonsense to you, probably best we leave it as-is. |
Thanks Alex, I think at the depth current tests assert things it makes no difference. We might want to revisit this if we decide to simulate failure scenarios, where we expect the simulation to not converge and eventually converge back. The current simulation logic simply errors out in such cases. For now what's there seems reasonable. 🙏 |
So far simulations used the same EC chain across all participants after the first instance. This approach was simple but not representative of the real-world where the EC chain may diverge across multiple subsets of participants.
The changes here implement a comprehensive set of APIs that allow a set of EC generation strategies to mix-and-match and replicate complex EC chain evolution through iterations of a simulation. The chain evolution is controllable by instance by actor ID. This allows us to simulate fluctuating EC evolution patterns throughout a simulation. The changes include an initial set of EC generators that cover:
The EC generators can be aggregated and set per number of participants, which enables simulation of a flexible set of scenarios including evolving majority common prefix.
Fixes #115