Commit Graph

34 Commits

Author SHA1 Message Date
Andreas Fackler 9d6b851466 Accept FnOnce/FnMut where possible. 2019-09-26 12:52:26 +02:00
Weiliang Li 7078387115 Fix unused error in test and fix markdown format error 2019-07-24 15:39:58 +02:00
Andreas Fackler 87b1d45d97 Rename DistAlgorithm to ConsensusProtocol. 2019-01-08 14:14:34 +01:00
phahulin 5bfcd6c692 Split FaultKind. (#371) 2019-01-02 13:55:50 +03:00
Demi Marie Obenour 7fb172cda2 Switch to 2018 edition idioms (#359)
* Switch to 2018 edition idioms

* Fix build with Rust 2018.

* Remove unnecessary cloning, make `max_faulty` const.

* Remove unneeded `extern crate` statements.
2018-12-11 14:44:36 +01:00
Vladimir Komendantskiy c1c7ffff49
Added fault checking on every step in the net framework (#338)
* added fault checking in the net framework

* check that the node in the fault report is not faulty

* simplified a condition

* made error on fault a parameter of VirtualNet

* updated the BA test to error on fault

* explained errors and refactored an assignment

* typo fix
2018-12-11 08:12:38 +00:00
Andreas Fackler 5dc52e0e51 Apply review suggestions. 2018-11-27 12:25:50 +01:00
Andreas Fackler b2071fe2be Extend the documentation, simplify errors.
This changes and adds several doc comments, adds the `missing_docs` lint
and simplifies some of the error types.
2018-11-27 12:25:50 +01:00
Andreas Fackler ae37879239 Remove the random_value option. 2018-11-22 13:07:58 +01:00
Andreas Fackler 30cce9bed8 Add a random_value option to HB and DHB.
This includes a threshold signature in each batch that can be used as a
pseudorandom value.

Also moves `EncryptionSchedule` from `threshold_decrypt` to
`honey_badger`.
2018-11-12 14:16:21 +01:00
Vladimir Komendantskiy e4435d5622
Make the incoming message queue finite in Binary Agreement (#329)
* added BA max_future_epochs and limited incoming messages in an epoch

* corrected a comment
2018-11-12 11:15:02 +00:00
Andrew Lyjak 9a8836cf15 Rename `ThresholdDecryption` to `ThresholdDecrypt` 2018-11-07 11:13:10 -05:00
Vladimir Komendantskiy ee46dd4b81 sender queue implementation 2018-11-05 11:11:00 +00:00
Andreas Fackler 13340d7ad0 Remove redundant log statements, minor cleanups. 2018-11-03 15:36:32 +01:00
Andreas Fackler f27af31ac7 Improve SyncKeyGen error handling. 2018-10-25 17:22:16 +02:00
Andreas Fackler 26ef33e4d1 Return fault on duplicate broadcast values. Remove obsolete TODOs. 2018-10-24 16:20:02 +02: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 383d96fdee Rename Agreement to BinaryAgreement. 2018-08-30 11:19: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
Andreas Fackler 6bcf365cf8 Rename CommonCoin to Coin. 2018-08-22 16:20:09 -07:00
c0gent ac39de66a8 Make refinements to SyncKeyGen error and fault handling. 2018-08-09 15:44:36 -04: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
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
Andreas Fackler d19afc2634 Change the QHB criterion for moving on to the next epoch.
`QueueingHoneyBadger` now waits after an output, and only makes its
proposal for the next epoch when:

* there are pending transactions in the queue,
* there are pending key generation or vote messages, or
* _f + 1_ other validators have already made their proposal.

This rule should work well for small networks: With 1 - 3 nodes, it will
produce a new batch whenever at least one of them has transactions to
contribute. In larger networks, it prevents an adversary controlling _f_
nodes from producing lots of empty epochs.

An exception is made for a currently joining validator: We will commit
up to _(N + 1)² + 1_ key generation messages for them, which is the
maximum number a correct node will send.
2018-08-01 18:52:32 +02:00
Andreas Fackler 8beab3d2b4 Log duplicate agreement messages as faults. 2018-07-30 12:04:28 +02:00
Andreas Fackler d787173dd8 Rename DKG messages to Part and Ack. 2018-07-19 12:28:15 +02:00
Vladimir Komendantskiy 9979e790aa added must_use to tests and removed Clone from FaultLog 2018-07-16 14:31:21 +01:00
Andreas Fackler bfab919c76 Add FaultLog::is_empty. 2018-07-12 09:54:26 +02:00
Andreas Fackler bed019b166 Report faults from VoteCounter. 2018-07-12 09:54:26 +02:00
Andreas Fackler 313fe1da75 Extract vote counter from DHB. 2018-07-12 09:54:26 +02:00
Peter van Nostrand 6783ece9b0 Added faulty node logging to algorithms. 2018-07-09 13:45:11 -04:00