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

Rewrite Subset. #319

Closed afck closed 6 years ago

afck commented 6 years ago

This merges the four maps into a single map, each entry of which tracks the progress of both the Broadcast and the BinaryAgreement subalgorithm for an individual proposer. Two advantages:

The module is also split up into smaller files.

Closes #313.

vkomenda commented 6 years ago

Is it possible to move subset.rs to subset/subset.rs instead of deleting?

afck commented 6 years ago

I actually used git mv. (I had moved it to subset/mod.rs anyway, which doesn't really make sense.) But the files probably don't have much in common anymore. I don't think git actually uses these kinds of hints: If the files are too different, it doesn't consider it a move-and-edit anymore, but a delete-and-create.

c0gent commented 6 years ago

You have to use two commits (move + changes) to get git to preserve history, etc.

afck commented 6 years ago

Yes, popping the outputs is another issue where I'd prefer if we could statically ensure that there can be only one. I feel like it was a mistake to make Step depend on DistAlgorithm (I know, I was the one who pushed for it :grimacing:). Maybe it should be generic in not what's currently the output type, but what's currently Vec<Output>… anyway, that's an issue for a separate PR, I guess.