Commit Graph

714 Commits

Author SHA1 Message Date
Marc Brinkmann f38b24de2d Change the time limit to five minutes for now, until the CI situation is resolved. 2018-09-17 20:09:16 +02:00
Marc Brinkmann 900ba76e90 Disable beta, use `stable` channel. (#235)
* 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.
2018-09-17 14:19:20 +01:00
Marc Brinkmann 422d8ef55b Add a test time limit. (#232)
* 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`.
2018-09-13 15:19:22 +01:00
Marc Brinkmann 23bc38bbeb Enable overflow-checks and fix a bug that slipped through during their absence. (#231)
* 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.
2018-09-13 12:03:12 +01:00
Marc Brinkmann 0266a4107c Network dimension strategy for property based tests. (#225)
* 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.
2018-09-11 18:11:04 +01:00
Vladimir Komendantskiy 3c8ea407a2
Merge pull request #227 from poanetwork/mbr-disable-clippy
Temporarily disable clippy.
2018-09-11 16:53:23 +01:00
Marc Brinkmann 0e3cc4501a Temporarily disable clippy. 2018-09-11 16:59:47 +02:00
Andrew Gross 6a727fd281
Merge pull request #224 from poanetwork/ag-README-testing
Update testing instructions
2018-09-05 22:12:36 -06:00
Andrew Gross d8277ed8de Update testing instructions 2018-09-05 16:15:10 -06:00
c0gent 56198e3e1f Add `--test-threads 1` for travis. 2018-09-04 08:38:49 -07:00
c0gent 8ac8bef66c Travis: Enable cpu-specific optimizations.
This is off by default so that binaries can be shared.
2018-09-04 08:38:49 -07:00
Marc Brinkmann 3b6dfcbfc1
Adversary traits (#223)
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.
2018-09-04 14:50:15 +02:00
Andreas Fackler 05b04bba39 Use Formatter debug helpers. 2018-09-03 23:30:17 +02:00
Vladimir Komendantskiy b649dc6268
Spam protection part 1: remote epoch tracking in HoneyBadger (#219)
* 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
2018-09-03 11:29:03 +01:00
Marc Brinkmann fc3d578eea
Advance to Rust beta (#221)
Update Rust version to `beta` in CI, paving the way for 1.29 stable.
2018-08-31 15:57:10 +02:00
DrPeterVanNostrand fb606332f6 Pinned threshold_crypto to version 0.1.0. 2018-08-30 10:52:16 -07:00
Vladimir Komendantskiy aa067d29e4
Merge pull request #218 from poanetwork/afck-rename
Rename Agreement to BinaryAgreement.
2018-08-30 10:57:14 +01:00
Andreas Fackler 383d96fdee Rename Agreement to BinaryAgreement. 2018-08-30 11:19:52 +02:00
Andreas Fackler 7276621397 Rename uid to id. 2018-08-29 19:35:52 +02:00
Andreas Fackler f27eed4eef Rename input to handle_input.
Also update `.gitignore` to avoid checking in test logs.
2018-08-29 19:35:52 +02:00
Marc Brinkmann 85550fcf82
New test network implementation (#216)
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`.
2018-08-29 10:09:35 +02:00
Andreas Fackler 51315a56c3 Update docs: missing algorithms, private merkle, whitespace.
* 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.
2018-08-27 17:07:33 +02:00
Igor Barinov 20193ab009 Update README.md
Changed Travis-CI badge to org from com because we build it on travis-ci.org domain at the moment
2018-08-26 15:11:43 +02:00
Marc Brinkmann d459683288 Added commented-out `after_failure` commands to `.travis.yml` to debug `SIGILL` issues. 2018-08-26 14:47:19 +02:00
Andreas Fackler d93ea7b561 Rename CommonSubset to Subset. 2018-08-22 16:20:09 -07:00
Andreas Fackler 6bcf365cf8 Rename CommonCoin to Coin. 2018-08-22 16:20:09 -07:00
Andreas Fackler f7d4860a94 Fix DHB test: wait for lagging nodes.
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.
2018-08-14 12:08:34 +02:00
Andrew Gross f661e8ace3 Update links
link to threshold crypto
2018-08-12 12:26:33 -07:00
Andreas Fackler e4ddd6a079 Replace ring with tiny-keccak. 2018-08-10 09:23:27 +02:00
Andreas Fackler b90a7bf450 Replace merkle.rs with custom implementation. 2018-08-10 09:23:27 +02:00
Andreas Fackler b7fe494fad Fix build if secure env vars are unavailable. 2018-08-09 22:26:34 +02:00
c0gent ac39de66a8 Make refinements to SyncKeyGen error and fault handling. 2018-08-09 15:44:36 -04:00
DrPeterVanNostrand 8ab58d35d4 Added error handling for mlock errors in threshold_crypto crate. 2018-08-09 15:44:36 -04:00
Andreas Fackler 8cc60698db Move matches from EpochState to SubsetState. 2018-08-09 16:04:09 +02:00
Andreas Fackler e9b960d020 Fix and clean up the HoneyBadger impl.
* Remove unnecessary recursive method calls.
* Add `handle_message` (without the trait).
* Fix a bug where `handle_message_content` would create an `EpochState`
  with the wrong number.
2018-08-09 16:04:09 +02:00
Andreas Fackler df21cdcb07
Merge pull request #199 from poanetwork/afck-bc-split
Split up the broadcast module.
2018-08-09 09:38:40 +02:00
Andreas Fackler 5cc7b54c06 Split up the broadcast module.
Also, rename broadcast and agreement messages to just `Message`.
2018-08-08 15:46:43 +02:00
natalia 6d42d749c5 Added deploy key 2018-08-07 16:02:42 -07:00
Andreas Fackler b017311e49 Split out individual epochs from Honey Badger. 2018-08-06 10:50:30 -07:00
Andreas Fackler 46a8728792 Split out Threshold Decryption from Honey Badger. 2018-08-06 10:50:30 -07:00
Andreas Fackler 22ccb740f1
Merge pull request #187 from c0gent/c0gent-supertraits
Add common supertraits and rename related type parameters.
2018-08-03 11:13:40 +02:00
c0gent 697ba6f0a8
Add common supertraits and rename related type parameters.
* Add the `Contribution`, `NodeUidT`, and `Message` supertraits.
* Rename type parameters:
  * `Tx` -> `T` or `C`
  * `NodeUid` -> `N`
2018-08-02 14:52:12 -07:00
Nick Sanders b1aa82b1c9
Merge pull request #186 from c0gent/c0gent-mod-reorg
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.

Redux.
2018-08-02 13:28:00 -07:00
c0gent f66dbdf3a1
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.
* 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`.
2018-08-02 13:01:57 -07:00
Nick Sanders 5b3522b48b
Merge pull request #185 from poanetwork/revert-184-c0gent-mod-reorg
Revert "Reorganize `dynamic_honey_badger` and `agreement` modules slightly."
2018-08-02 12:59:41 -07:00
Nick Sanders c5977d1ab8
Revert "Reorganize `dynamic_honey_badger` and `agreement` modules slightly." 2018-08-02 12:24:25 -07:00
Nick Sanders d74530004f
Merge pull request #184 from c0gent/c0gent-mod-reorg
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.

* Some additional rustfmt-ing crept in due to me accidentally using a newer version.
2018-08-02 12:13:47 -07:00
c0gent 7824b7a0ea
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.
* 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`.
2018-08-02 11:24:15 -07:00
Andreas Fackler 4b854568f6
Merge pull request #182 from poanetwork/afck-agreement
Extract SBV broadcast from agreement.
2018-08-02 19:06:40 +02:00
Andreas Fackler dd31758bdf Extract SBV broadcast from agreement. 2018-08-02 12:55:17 +02:00