Skip to content
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

IF: add multi-hop networking to test_pacemaker #1658

Closed
Tracked by #1508
fcecin opened this issue Sep 19, 2023 · 0 comments · Fixed by #1659
Closed
Tracked by #1508

IF: add multi-hop networking to test_pacemaker #1658

fcecin opened this issue Sep 19, 2023 · 0 comments · Fixed by #1659
Assignees

Comments

@fcecin
Copy link

fcecin commented Sep 19, 2023

test_pacemaker currently assumes all nodes are directly connected to each other. Must change it so that a test may specify an arbitrary mesh of connections between nodes, which will allow us to write unit tests for #1548.

@fcecin fcecin self-assigned this Sep 19, 2023
fcecin added a commit that referenced this issue Sep 19, 2023
- test_pacemaker allows each test to define a specific connection mesh between nodes
- added a simple unit test (#7) that can be used to test a solution for #1548 (just needs to introduce a disconnect between nodes)
- added support to write multi-hop unit tests (with selective message propagation by type)

The hotstuff protocol has "phases", and between two adjacent phases, we are typically using different message types. This allows us to write tests where we loop propagating a specific message type across the network, for as many hops as necessary, until the `dispatch` method on the `test_pacemaker` returns an empty vector, signaling no more message propagation happened. And then, we can start propagating the message type that's expected for the next phase of the protocol (these were generated during propagation of the previous type, but were just retained).

All unit tests still use a full connection mesh, which is easily created by calling `test_pacemaker::connect(vector-with-all-node-names)`. The added test is meant to be changed by the inclusion of an explicit disconnect between the two rotating leaders; this can be used as the first test of a solution to message propagation.

Closes #1658
@fcecin fcecin linked a pull request Sep 19, 2023 that will close this issue
@arhag arhag added 👍 lgtm and removed triage labels Sep 19, 2023
@arhag arhag closed this as completed Sep 21, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Backlog Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants