Extends all APIs so that the user doesn't need to import the
`DistAlgorithm` trait.
Also, removes the error on inputting too late into `BinaryAgreement`:
whether the input still matters is an implementation detail.
The `network` test module now verifies that correct nodes are never
reported as faulty.
The `DuplicateAck` fault is removed for now, because the same ack is
usually handled multiple times in DHB.
Profiling the simulation example (with mock crypto) identified this as a hot
spot, and using a `Vec` instead and returning early where possible
speeds it up.
* Use threshold_crypto 0.2.0-beta1 to fix overflow.
* Upgrade to hex_fmt 0.2.
* Depend on threshold_crypto 0.2.0-beta2.
This avoids depending on two different versions of hex_fmt.
* adds an RNG argument to the transaction queue
* minimal support of transaction queue RNG in tests
* added the TransactionQueue trait object
* review comments and streamlining of trait bounds
* removed the RNG from the transaction Q and placed it into QueueingHoneyBadger
* formatting fix
Instead of just the public key, the batches returned from
`DynamicHoneyBadger` and `QueueingHoneyBadger` now contain the full
`NetworkInfo`, so the user can use the validators' keys for signing and
encryption.
Using `hbbft` in other software that is based on frameworks like [tokio](https://tokio.rs), being `Send` is often a requirement on shared data structures.
* Use inverse of `is_bft` function for checking in `average_higher`.
* Inline in `NetworkDimension`.
* Check more invariants when averaging network sizes.
* Added test that finds shrinking regression of `NetworkDimension`.
* Use bijection for shrinking of network dimensions.
* Fix types on dimensions.
* Hide `size` and `faulty` behind accessor methods.
* Make limits dependant on input size.
* Fixed clippy lints.
* Simplify averaging.
* Add support for RNG instantiation in proptests.
* Use `proptest` module strategy to create the rng for `net_dynamic_honey_badger`.
* Use seed generation instead of RNG instantiation in tests.
* Remove fixed RNG in `generate_map`.
* `VirtualNet` now supports setting the random generator through the builder.
* Add missing `time_limit` field to `::std::fmt::Debug` trait implementation on `NetBuilder`.
* Pass an instantiated random number generator through `NewNodeInfo` as a convenience.
* Make the random number generator of `DynamicHoneyBadgerBuilder` configurable, at the cost of now requiring mutability to call `build_first_node()`.
* Ensure RNGs are derive from passed in seed in `net_dynamic_hb` tests.
* Correct inappropriate use of `random::Random` instead of `Rng::gen` to generate dependent values in `binary_agreement`.
The original implementation used `rand::random()`, which will always use the `thread_rng`, ignoring the fact that an RNG has actually been passed in.
* Do not use `OsRng` but passed in RNG instead.
* Use reference/non-reference passing of rngs more in line with the `rand` crates conventions.
* Document `rng` field on `DynamicHoneyBadger`.
* Make `SyncKeyGen` work with the extend (`encrypt_with_rng`) API of `threshold_crypto`.
* Use passed-in random number generator in `HoneyBadger`.
* Create `SubRng` crate in new `util` module to replace `create_rng()`.
* Use an RNG seeded from the configure RNG when reinitializing `DynamicHoneyBadger`.
* Use the correct branch of `threshold_crypto` with support for passing RNGs.
* Outputing subset messages as received
This outputs subset messages as they are received. All tests pass.
* Fix test suite, while still outputing results early
This fixes the test suite, while still outputting results early.
* Actually do the optimization
There is a testsuite failure in the `dynamic_honey_badger` tests. Is
this a testsuite bug?
* Respond to code review
* Document the meaning of `None` in Subset::broadcast_results
* Fix adding Contributions and fault check
* Fix clippy
* Keep track of nodes that have sent us valid messages
Otherwise, we reject all nodes as faulty.
* Remove excessive debug logging
There is no need to log a quadratic amount of data.
* Re-add check that the observer’s values match
the rest of the nodes. Also `panic!` if `Done` is ever not the last
value in a series of `SubsetOutput`s.
* Respond to review
* Rename field
* Disable beta, use `stable` channel.
* Pin to Rust 1.29 stable.
* Streamline clippy operation.
* Fix or disable remaining failing clippy lints.
* Use `$TRAVIS_RUST_VERSION` instead of `stable` to name toolchain.
* Added a default time limit to `NetBuilder`.
* Added environment-variable override via `HBBFT_NO_TIME_LIMIT`.
* Check for time limit exceeded when cranking.
* Fix typos and factual errors in API docs.
* Document time limit setting in tests `README.md`.