Commit Graph

625 Commits

Author SHA1 Message Date
Peter van Nostrand 04f654ff31 Removed protoc installation from CI setup. 2018-07-14 07:46:15 -04:00
Vladimir Komendantskiy 72f7b1c06d
Merge branch 'master' into afck-dhb-votes 2018-07-14 08:20:02 +01:00
Peter van Nostrand 53a891380f Replaced clear-on-drop with 'std::ptr::write_volatile'. 2018-07-13 20:58:30 -04:00
Vladimir Komendantskiy 993a164ca9 ignored the failing doc test 2018-07-13 23:27:31 +01:00
Vladimir Komendantskiy db9191768b review comments 2018-07-13 22:53:44 +01:00
Vladimir Komendantskiy 03153cf788 Merge branch 'master' into vk-api-refactor66 2018-07-13 22:18:01 +01:00
Nick Sanders b30d272394
Merge pull request #134 from c0gent/c0gent-hydrabadger-dyn_hb
Add QueueingHoneyBadger::dyn_hb.
2018-07-13 10:38:13 -07:00
c0gent 28da78c709
Add QueueingHoneyBadger::dyn_hb.
Needed to retrieve netinfo.
2018-07-13 08:31:03 -07:00
Vladimir Komendantskiy d7a2808774
Merge branch 'master' into vk-api-refactor66 2018-07-13 13:53:21 +01:00
Vladimir Komendantskiy c12bb58ac0
Merge pull request #112 from poanetwork/mbr--random-adversary-model
Implement a random adversary
2018-07-13 13:51:06 +01:00
Marc Brinkmann 591b546402 Removed unnecessary `Hash` where clause. 2018-07-13 13:27:49 +02:00
Marc Brinkmann 5336fbe707 Added `RandomAdversary` and the necessary auxiliary functions.
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()`.
2018-07-13 13:27:49 +02:00
Marc Brinkmann 510c4478d4 Ensure the adversary is playing fair and give a more helpful error message if they are not. 2018-07-13 13:27:49 +02:00
Marc Brinkmann a0da8b7385 Added extended example for broadcast api and other docstrings. 2018-07-13 13:27:49 +02:00
Vladimir Komendantskiy 97e0505d11
Merge pull request #132 from poanetwork/mbr-fix-new-clippy-lints
Fix clippy lints.
2018-07-13 10:34:07 +01:00
Marc Brinkmann 0e6a8aa272 Fix clippy lints.
Extra lints have been added in the latest version of clippy; this fixes four instances of two of the new lints.
2018-07-13 10:52:44 +02:00
Vladimir Komendantskiy 92f0602dd7 formatting omission fix 2018-07-12 22:25:44 +01:00
Vladimir Komendantskiy 7fb1017bb1 changed Step::output to Vec but that didn't fix the dynamic HB test 2018-07-12 21:23:52 +01:00
Andreas Fackler 3f3ac7be13 Minor fixes and simplifications.
* 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.
2018-07-12 17:54:27 +02:00
Vladimir Komendantskiy 1254d40147 fixed a starvation issue in Agreement when num_faulty=0 2018-07-12 15:12:06 +01:00
Vladimir Komendantskiy 0ba06fdb76 added step output in DistAlgorithm 2018-07-12 14:54:05 +01:00
Andreas Fackler 3bf32832bc
Merge pull request #124 from poanetwork/afck-dhb-votes
Extract vote counter from DHB.
2018-07-12 10:40:51 +02: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
Andreas Fackler 0e39bfed40
Merge pull request #125 from c0gent/c0gent-arc
Make `*HoneyBadger` types thread safe.
2018-07-12 09:41:44 +02:00
c0gent f0ed2e6e12 Make `*HoneyBadger` types thread safe.
Replaces `Rc` with `Arc`. This allows usage from different threads
which will be necessary for use with Parity.
2018-07-11 16:28:41 -07:00
Andreas Fackler c31e01fa28
Merge pull request #123 from poanetwork/afck-dhb-votes
Split the dynamic_honey_badger module.
2018-07-11 15:39:09 +02:00
Andreas Fackler b41ada1809 Split the dynamic_honey_badger module. 2018-07-11 11:36:40 +02:00
Andreas Fackler 6194c0e461
Merge pull request #117 from poanetwork/afck-queue
Separate queue from Honey Badger.
2018-07-11 11:03:59 +02:00
Andreas Fackler ca2dd2327e Add back InvalidNodeTransactionSignature fault.
This was accidentally removed due to a merge conflict.
2018-07-10 17:29:58 +02:00
Andreas Fackler c1b4381753 Separate queue from Honey Badger.
This makes Honey Badger a bit more complicated but a lot more flexible:
It is now unaware of transactions and basically just runs one Subset
instance per epoch.

That way, users can use any kind of external queue, control throttling
and prioritization.
2018-07-10 17:29:58 +02:00
Andreas Fackler b546c16a5e
Merge pull request #111 from andogro/ag-example-information
Add documentation and screenshot for network simulation
2018-07-10 16:11:56 +02:00
Andrew Gross 95dce9eee3 Text updates (review comments) 2018-07-10 07:32:27 -06:00
Andreas Fackler eb22d84db9
Merge pull request #99 from poanetwork/report-faulty-nodes
Added logging for faulty nodes
2018-07-10 12:26:40 +02:00
Vladimir Komendantskiy 68d5d0829b
Merge pull request #107 from poanetwork/afck-cargo-toml
Add recommended metadata to Cargo.toml
2018-07-09 22:56:17 +01:00
Andrew Gross 2121292621 README adjustments (review comments) 2018-07-09 12:06:24 -06:00
Peter van Nostrand 6783ece9b0 Added faulty node logging to algorithms. 2018-07-09 13:45:11 -04:00
Andreas Fackler 64e5f49b8d Add more authors to Cargo.toml. 2018-07-09 16:11:13 +02:00
Vladimir Komendantskiy 4f7feda9fc
Merge pull request #114 from poanetwork/afck-subset-1-node
Fix Subset for a single validator.
2018-07-09 11:33:15 +01:00
Andreas Fackler 6248e4079f Fix Subset for a single validator. 2018-07-09 11:38:56 +02:00
Andrew Gross f3abd3a574 Updated screenshot 2018-07-06 14:37:01 -06:00
Andrew Gross b014fe56b0 Add documentation for network simulation 2018-07-06 13:58:58 -06:00
Andreas Fackler d63bc64159
Merge pull request #110 from poanetwork/mbr--show-rustfmt-version
Show `rustfmt` version in CI
2018-07-06 17:47:21 +02:00
Vladimir Komendantskiy 90e468ecf6
Merge pull request #101 from poanetwork/afck-docs
Add module-level Agreement, Coin and Subset documentation.
2018-07-05 17:39:09 +01:00
Vladimir Komendantskiy 1945473740
Merge pull request #105 from andogro/ag_contributing_file_coc
Doc updates: Contributing File, Code of Conduct, README
2018-07-05 17:38:45 +01:00
Vladimir Komendantskiy 0038d3cad9
Merge pull request #96 from poanetwork/afck-hb-delay
Add a max_future_epochs option to Honey Badger.
2018-07-05 16:54:19 +01:00
Andreas Fackler c42f606644 Fix module docs. (Review comments.) 2018-07-05 17:51:55 +02:00
Marc Brinkmann 1107e54771 Show `rustfmt` version in CI to make it easier to hit the correct version in your local dev environment. 2018-07-05 17:29:04 +02:00
Andreas Fackler 6f7245f123 Prefer HB::builder over HBBuilder::new. 2018-07-05 11:47:19 +02:00