* 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`.
* Fixed bug in `average_higher`, due to wrong assumptions about operator precendence.
* Enable overflow checks in `--release` tests.
This will hardly impact test performance, as the heavy lifting is done in the threshold crypto crate. Rough benchmarks showed significant differences only when `overflow-checks` was enable for `[profile.release]` (instead of `[profile.bench]`), causing it to be applied to `threshold_crypto` as well.
* Added missing debug implementations for various test networking parts.
* Initial proptest parts added, including network dimensions.
* Use a test configuration for proptests.
* Tweaks and documentation.
* Improved documentation for `net_dynamic_hb` test.
* Added two missing `;`.
* Allow insane topology creation.
* Renamed `is_sane()` to `is_bft`, `halfway` to `average_higher` and improved comments per suggestions.
* Rename `NetworkTopology` -> `NetworkDimension`.
* Silence newly added clippy warning.
* Smoothed `README.md`.
* Remove workaround for beta/nightly again.
* Caved in to clippy and changed the bft condition.
Added a new adversary API, which changes how adversaries in tests can affect the network and nodes, restricting them to the capabilities listed in the HBBFT paper.
* spam protection part 1: remote epoch tracking in HoneyBadger
* moved handling of EpochStarted out of EpochState
* allowed EpochStarted from observers
* removed an unnecessary function call
* updated formatting to beta
* removed an unnecessary variable
Added new virtual network implementation for tests.
Added `net::VirtualNet` as an upcoming replacement for the current networking implementation in the test, along with auxiliary functions. The new system allows easier manipulation through implemented adversaries, better reporting and should offer a more friendly API.
Documentation for the functionality can be found in `tests/README.md`.
* Make the `merkle` module private.
* Make sure the algorithm names are consistent.
* Add the Threshold Decryption and Synchronous Key Generation algorithms
to the list in the main crate documentation.
* Remove some trailing whitespace from the README.
* Remove checkboxes: all algorithms are implemented.
* Link to the algorithm implementations, not the modules.
* Use relative links in the README.
The Dynamic Honey Badger tests would currently fail _without_ faulty
nodes, because with "first" delivery, all but the first _N - f_ nodes
are lagging indefinitely.
This change makes sure we give lagging nodes a chance to finish the first
phase of the test and arrive at the batch containing the completed
`Remove` event.
* Move `CoinState` and `Agreement` definitions from `agreement/mod.rs`
to `.../agreement.rs`.
* Move `DynamicHoneyBadger` definition from `dynamic_honey_badger/mod.rs`
to `.../dynamic_honey_badger.rs`.
This removes some unnecessary allocation and conversion by accepting
more primitive types and references as the index in threshold decryption
and signing, and as the argument to a polynomial.
This adds a bit of special handling to make sure messages don't stay in
the queue forever in the `dynamic_honey_badger` tests, even if there is
only one validator: the problem was that the single validator is always
ready for input, so it never processed incoming messages. However, to
add the new validator, it needs to process the joining node's key
generation messages.
`DynamicHoneyBadger` now also removes committed key generation messages
from the queue, to avoid committing duplicates.
Random adversaries are created for `broadcast` and `honey_badger`. Random value generation was added for all type-dependencies of these algorithms, causing the `Rand` trait to be implement for a large portion of the codebase.
Additionally, `MessageWithSender` turned into an actual struct, making it much easier to handle. Tuple-like construction is still available through `MessageWithSender::new()`.
* Clear outdated key gen messages from the buffer.
* Process output after proposing, to make `HoneyBadger` work with a
single validator.
* Print an error if threshold decryption fails.
* Verify decryption shares with the correct ciphertext.
* Insert all ciphertexts from an epoch at once; otherwise contributions
can be omitted from a batch.
* Remove `BoolWithFaultLog`: It's easier to return a tuple, and it's
used only in one place now.
* Avoid redundant signature verification in `VoteCounter`.
* Fix the tests for `QueueingHoneyBadger`.
* Use fewer network sizes to speed up tests a bit.