Commit Graph

595 Commits

Author SHA1 Message Date
Marc Brinkmann bdc4f5b7df Properly handle `cfg.batch_size` and `cfg.contribution_size` in tests. 2018-10-29 19:04:35 +01:00
Marc Brinkmann 71a7331958 Moved queue into progress state. 2018-10-29 16:46:37 +01:00
Marc Brinkmann b58c977627 Fixed missing crate imports in `net_util`. 2018-10-29 15:42:27 +01:00
Marc Brinkmann 2906bf7746 Store packages in debug trace output. 2018-10-29 15:38:24 +01:00
Marc Brinkmann 7665bbbfaa Use logging instead of `println` in `net_dynamic_hbbft`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 83a69918af Use steps correctly in `net_dynamic_hb` test. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 48021ecb7f Add/upgrade FIXMEs. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 6e62e7999c Support processing steps in `net_dynamic_hb` test progress. 2018-10-28 18:45:34 +01:00
Marc Brinkmann b79c3d5635 Use a newtype wrapper for what formerly was `Vec<NodeId, Step>`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 0f7f8d6418 Expand progress tracking. 2018-10-28 18:45:34 +01:00
Marc Brinkmann eecd165825 Record steps instead of asserting they are empty. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 2de997de6a Use proper assertions instead of `let _`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 66680daecc Factored out step state handling into `record_step`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann bc38b09b02 Move `drop_and_readd` state to new struct. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 3d17e47b14 Use "proper channels" for putting in input. This results in `DistAlgorithm` not needing to be imported anymore. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 0e8f4a161d Do not output anything if there is no state change. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 6107cc4e3e Added small instance test for `drop_and_readd`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 2ade78fe23 Added small instance test for `drop_and_readd`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 418c12c6f6 Support dynamically generated adversaries in test configuration. 2018-10-28 18:45:34 +01:00
Marc Brinkmann ab84ff83be Remove execution restriction, going back to 40 instances. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 677c68368e Document and use `Adversary::boxed` in `net` builder. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 6192b69ca6 Allow trivial `Clone`/`Copy` of some simple adversaries. 2018-10-28 18:45:34 +01:00
Marc Brinkmann f728c062db Ensure adversaries implement `fmt::Debug`. 2018-10-28 18:45:34 +01:00
Marc Brinkmann 7f684732f2 Ensure network dimension is at least two nodes when trying drop-and-readd test. 2018-10-28 18:45:34 +01:00
Andreas Fackler a331982fa6
Fix minimal NetworkDimension in tests, and Subset bug. (#303)
* Fix minimal NetworkDimension in tests.

* Fix: Subset must try output on broadcast results, too.
2018-10-28 15:05:26 +01:00
Vladimir Komendantskiy 45ce045922 allow the observer on a TestNetwork to send messages 2018-10-27 10:42:49 +02:00
Andreas Fackler f27af31ac7 Improve SyncKeyGen error handling. 2018-10-25 17:22:16 +02:00
Andreas Fackler dda2f54a06
Minor improvements to the Step API. (#292)
* Minor improvements to the Step API.

* Make use of DistAlgorithm::our_id.

* Rename Step::and to join.
2018-10-25 14:44:28 +02:00
Andreas Fackler c6e0406596 Fix abbreviations from the paper: ABA. 2018-10-25 13:15:52 +02:00
Vladimir Komendantskiy 7aad658511 fixed early output from Subset 2018-10-25 11:33:56 +02:00
Andreas Fackler 3981b37fa3 Minor API and documentation improvements. 2018-10-24 17:38:41 +02:00
Andreas Fackler 26ef33e4d1 Return fault on duplicate broadcast values. Remove obsolete TODOs. 2018-10-24 16:20:02 +02:00
Andreas Fackler 493b946a4a Use DeserializeOwned where applicable. 2018-10-24 15:03:56 +02:00
Andreas Fackler 6375decbc0 Use derivative for configurable Debug impls. (#283) 2018-10-24 13:01:52 +02:00
Andreas Fackler bc6a67dc01 Extend API to work without DistAlgorithm.
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.
2018-10-23 22:10:28 +02:00
Andreas Fackler 6bcd6bc499 Replace Coin with ThresholdSign. (#280)
* Avoid redundant hashing in Coin.

* Return the full signature from Coin.

* Rename Coin to ThresholdSign.
2018-10-23 10:49:19 +01:00
Vladimir Komendantskiy 13308906aa
Merge pull request #279 from poanetwork/afck-no-dkg-fault
Log more DKG-related faults, check faults in tests.
2018-10-23 10:27:26 +01:00
Andreas Fackler ff8fe493d2 Limit the number of buffered key gen messages. 2018-10-23 11:13:55 +02:00
Andreas Fackler 36583de455 Add fault checks to the tests.
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.
2018-10-22 17:23:03 +02:00
Andreas Fackler d49350ecd9 Log more DKG-related faults. 2018-10-22 16:09:00 +02:00
Andreas Fackler b3e858a079
Use published threshold_crypto 0.2. (#278)
Also: Follow the soon-to-be-official formatting guidelines:
https://github.com/nrc/rfcs/blob/style-guide/style-guide/cargo.md
2018-10-20 13:42:41 +02:00
Marc Brinkmann ba2390191f Changed the defaults for tracing to `false`. (#277)
* Changed the defaults for tracing to `false`.

* Cleanup envvar handling.

* Update `README.md`.
2018-10-18 16:13:02 +02:00
Vladimir Komendantskiy c5ebdb5347
Merge pull request #276 from poanetwork/afck-perf
Avoid BTreeMap in EpochState.
2018-10-18 11:52:59 +01:00
Andreas Fackler 06515407fc Avoid BTreeMap in EpochState.
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.
2018-10-18 12:22:10 +02:00
Vladimir Komendantskiy f8bf552165
Allowed building a HB with a non-0 starting epoch (#237)
* include the starting epoch in the HB builder

* added DHB starting epoch
2018-10-17 13:28:19 +01:00
Andreas Fackler 8a84109c88 Use threshold_crypto 0.2.0-beta2 to fix overflow. (#273)
* 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.
2018-10-17 12:04:13 +02:00
Marc Brinkmann 26e659079a Added `cargo audit` to CI. 2018-10-16 11:50:46 +02:00
Marc Brinkmann df1471f86d Factored out CI execution into `ci.sh`. 2018-10-16 11:02:05 +02:00
Andreas Fackler 6df72d86cc Reorder: public imports come last. 2018-10-15 13:55:04 +02:00
Andreas Fackler 13b0b04943 Update crypto, add mock crypto for testing. 2018-10-15 13:55:04 +02:00