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 network to test_pacemaker #1659

Merged
merged 4 commits into from
Sep 21, 2023

Conversation

fcecin
Copy link

@fcecin fcecin commented Sep 19, 2023

  • test_pacemaker allows each test to define a specific connection mesh between nodes
  • added a simple unit test that can be used to test a solution for IF: propagate hs_*_messages #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

- 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 self-assigned this Sep 19, 2023
@fcecin fcecin linked an issue Sep 19, 2023 that may be closed by this pull request
fcecin and others added 3 commits September 20, 2023 11:52
- add const& 's
- all members private
- remove dead code
- better loop patterns by @greg7mdp
@fcecin fcecin merged commit 10d3435 into hotstuff_integration Sep 21, 2023
22 checks passed
@fcecin fcecin deleted the hs-1658-multihop-testing branch September 21, 2023 12:36
@heifner heifner changed the title Add multi-hop network to test_pacemaker IF: Add multi-hop network to test_pacemaker Sep 21, 2023
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: MESSAGES
summary: Tests message passing for specific network topology setup.
Note:end

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.

IF: add multi-hop networking to test_pacemaker
4 participants