hbbft/examples
Marc Brinkmann d2627272fe
Better proptest persistence through deterministic randomness. (#248)
* 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.
2018-10-02 16:24:51 +02:00
..
network Advance to Rust beta (#221) 2018-08-31 15:57:10 +02:00
README.md added example of intended use of Node and a draft of value encryption 2018-03-27 21:59:38 +01:00
consensus-node.rs separated crypto module into its own crate 2018-07-31 12:15:05 +01:00
run-consensus-nodes.sh Remove protobuf support. 2018-07-31 11:58:44 +02:00
simulation.rs Better proptest persistence through deterministic randomness. (#248) 2018-10-02 16:24:51 +02:00

README.md

Examples for the hbbft library

  • Consensus node - Example of a consensus node that uses the hbbft::node::Node struct for running the distributed consensus state machine.