poanetwork / hbbft

An implementation of the paper "Honey Badger of BFT Protocols" in Rust. This is a modular library of consensus.
Other
357 stars 96 forks source link

Remove peers from sender queue #352

Closed vkomenda closed 5 years ago

vkomenda commented 6 years ago

Closes #341

Prior to this PR we had only addition of new peers in the sender queue. This PR allows removal of those peers which are validators that become superseded by other validators in the next epoch.

vkomenda commented 5 years ago

Although… this still doesn't handle the case of two subsequent InProgress changes, does it? Those would leave the failed candidates as zombie entries in the peer_epochs map?

I'm putting together a workaround. Let's see if we can optimise it.

afck commented 5 years ago

Still failling; but it makes sense that the outputs differ, of course, since the re-joined node didn't receive all the batches. So I guess it's just the test?

vkomenda commented 5 years ago

I've just ran drop_and_readd 1000 times and it never failed!

I expected the QHB test to fail though because I'm still updating it. In addition to missed batches, node 0 does not send all of its user transactions, and the unmodified verify_batches will fail.

vkomenda commented 5 years ago

Rebased and ready for review. Comments welcome!