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

Subprotocol tests #34

Open
sbellem opened this issue Aug 24, 2018 · 2 comments
Open

Subprotocol tests #34

sbellem opened this issue Aug 24, 2018 · 2 comments
Assignees
Milestone

Comments

@sbellem
Copy link
Collaborator

sbellem commented Aug 24, 2018

From @amiller on May 26, 2017 4:46

Need tests for individual subprotocols, like reliable broadcast, binary agreement, etc.

Copied from original issue: amiller/HoneyBadgerBFT#10

@sbellem
Copy link
Collaborator Author

sbellem commented Aug 24, 2018

From @amiller on May 30, 2017 3:41

Partially addressed by refactoring and tests:

@sbellem sbellem self-assigned this Aug 24, 2018
@sbellem sbellem added this to the 1.0 milestone Aug 24, 2018
@sbellem
Copy link
Collaborator Author

sbellem commented Aug 24, 2018

The current code base (under the dev branch at the moment of this writing) has ~98% of code coverage. This means that the most of the code of the subprotocols does get executed when the tests are run.

So, what would make sense to tackle as part of this issue, is to verify/test whether the implementations are accurate.

We may perhaps consider the following:

Verify the lemmas & costs of the algorithms

  • Design and implement tests that verify that the various lemmas supporting the algorithms are not violated.
  • Also test that the implementation respects the expected costs.

As a concrete example, lemma 1 for the binary agreement [MMR14_]:

LEMMA 1. Let n > 3t. Consider the situation where, at the beginning of a round r, all the non-faulty processes have the same estimate value v. These processes will never change their estimates, thereafter.

So here the idea is that there would be a test that checks the above lemma.

As a an example of checking the cost, from Mostéfaoui et al._ again:

As far as the cost of the algorithm is concerned, we have the following, where c ≥ n − t denotes the number of correct processes.

If the correct processes propose the same value, each round requires two communication steps (one in the BV-broadcast and one broadcast), and the expected number of rounds to decide is two. Hence, the total number of messages sent by correct processes is 2cn.

So to help ensure that the implementation is correct, the above would be verified by one or more tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant