hbbft icon indicating copy to clipboard operation
hbbft copied to clipboard

More tests: Binary Agreement

Open afck opened this issue 5 years ago • 1 comments

Other than in the very specific binary_agreement_mitm, the tests currently only use an adversary that randomly reorders messages but doesn't send any.

We should add a general test where the attacker not only reorders, but also creates random messages. Those shouldn't be "completely random", of course: E.g. the epoch should usually be the current one (otherwise they just get ignored), or maybe sometimes ±1. (Configurable as proptest parameters?) And the boolean value should probably either be random, or the opposite of the correct node's input. Or the opposite of the current coin value, if known? Ideally, we should come up with different kinds of simple attack strategies that are most likely to uncover bugs.

Not sure if this should replace the existing test, or be added to it.

afck avatar Apr 03 '19 08:04 afck

And let's also try different reordering strategies, in addition to the random one, e.g. always pick the lowest-ID node with a nonempty queue.

afck avatar Apr 03 '19 08:04 afck