Commit Graph

714 Commits

Author SHA1 Message Date
Vladimir Komendantskiy cf33bac533 added the proposer ID to common_subset::handle_broadcast and mae it an interface fn 2018-05-10 11:01:25 +01:00
Vladimir Komendantskiy 51ef11b55c fixed the count of matching AUX messages 2018-05-10 10:07:22 +01:00
Vladimir Komendantskiy 259d5369b0 corrected the count of AUX messages 2018-05-10 10:07:22 +01:00
Vladimir Komendantskiy b6a6bb35ea clear the received AUX messages on every epoch update 2018-05-10 10:07:22 +01:00
Vladimir Komendantskiy e0005a672b removed the separate field in Agreement and corrected computation of estimated values 2018-05-10 10:07:22 +01:00
Vladimir Komendantskiy 3e35cc665b added element_proposer_id to the Agreement input to the Common Subset algorithm 2018-05-10 10:07:22 +01:00
Vladimir Komendantskiy 394462c88b changed code according to review comments 2018-05-10 10:07:22 +01:00
Vladimir Komendantskiy 2205f9083e added a TODO file and changed indentation in the .proto file 2018-05-10 10:02:03 +01:00
Vladimir Komendantskiy 5215156ec5 defined the output from the Common Subset algorithm 2018-05-10 10:02:03 +01:00
Vladimir Komendantskiy d3b974f888 Binary Agreement implementation and its wiring into Common Subset 2018-05-10 10:02:03 +01:00
Vladimir Komendantskiy 7748c9073b
Merge pull request #13 from poanetwork/afck--remove-channels
Fix broadcast and example, enable more tests.
2018-05-09 16:47:01 +01:00
Andreas Fackler 43ada2dcc4 Add a fifth node to the example script. 2018-05-09 14:42:29 +02:00
Andreas Fackler 047307be46 Revert to earlier ProtoIo implementation.
This fixes the issue where sometimes messages were skipped.
2018-05-09 14:18:12 +02:00
Andreas Fackler c790a1feba Improve example logging, add BinaryPath. 2018-05-09 13:38:49 +02:00
Andreas Fackler b98bbe9dcd Fix broadcast and example, enable more tests.
This fixes several issues with the broadcast algorithm and enables the
previously ignored tests that now pass:
* Don't decide on a root hash based on anyone's `Echo` message.
* Work around the `merkle` crate's inability to produce the proof of the
  `i`-th leaf for a given index `i`.
* Ignore messages from unknown nodes.
* Avoid decoding multiple times.
* Document the full algorithm.
* Don't count multiple `Echo` or `Ready` messages coming from the same
  node.
* Fix index computation for a given proof.
* Move `BroadcastMessage` into `broadcast` to make the module more
  self-contained.

The example now only executes a single broadcast instance, expecting the
first node (the one with the lexicographically lowest address) to
propose a value. A shell script is added that runs for example nodes.

Use env_logger instead of simple_logger, so the log level can be controlled
with an environment variable. You can e.g. log all output from the broadcast
test and the crate itself in debug mode with:
RUST_LOG=hbbft=debug,broadcast=debug

Some debugging messages are more concise now and use hexadecimal
notation instead of printing arrays of decimal values.

An indentation error in the Travis script is also fixed.
2018-05-08 17:04:38 +02:00
Vladimir Komendantskiy 8af526d61f
Merge pull request #9 from DrPeterVanNostrand/master
Update readme with build instructions
2018-05-07 09:39:55 +01:00
Peter van Nostrand b489d06ddb Updated readme. 2018-05-06 20:25:41 -04:00
Peter van Nostrand e27d9b481d Updated readme with protoc install instructions for Debain 9 and Ubuntu 17. 2018-05-06 20:24:28 -04:00
Peter van Nostrand a6901b9be1 Merge remote-tracking branch 'upstream/master' 2018-05-06 19:32:15 -04:00
Vladimir Komendantskiy dda1570bfc Merge branch 'afck--examples' of github.com:poanetwork/hbbft 2018-05-06 22:49:41 +01:00
Andreas Fackler eec3102cbf Move node to examples, deduplicate code. 2018-05-05 17:54:29 +02:00
Andreas Fackler 7826987af1 added a Travis configuration file, fixed Clippy lints 2018-05-05 09:53:29 +02:00
Peter van Nostrand 817b2da962 Fixed merge conflict in readme. 2018-05-04 12:18:57 -04:00
Peter van Nostrand af2022cfd2 Added build instructions to readme. 2018-05-04 12:11:49 -04:00
Igor Barinov 0732e0bac8
Update README.md 2018-05-04 11:56:38 -04:00
Andreas Fackler e2cd4ca1b7 added (ignored) regression tests for some of the broadcast issues 2018-05-04 11:14:19 +02:00
Andreas Fackler 8bced81438 removed some unnecessary cloning
This also adds a few TODOs to the broadcast implementation: Some of
these issues need a regression test. (Oh, and a fix!)
2018-05-04 09:58:21 +02:00
Vladimir Komendantskiy cde3a879e5 modified Agreement::set_input to output a BVAL message 2018-05-03 10:13:41 +01:00
Vladimir Komendantskiy d64dec2bd1 added Agreement message type and protobuf boilerplate 2018-05-03 10:10:35 +01:00
Andreas Fackler babbd2f36a fixed broadcast failure with malicious value proposal 2018-05-03 11:07:37 +03:00
Andreas Fackler 0f3377c8e9 made broadcast handle its own echo and value messages 2018-05-03 08:47:31 +03:00
Vladimir Komendantskiy 13407c8774 Merge branch 'master' of github.com:poanetwork/hbbft 2018-05-02 15:47:54 +01:00
Vladimir Komendantskiy 98e3cf76a3 implementation of the last clause in Figure 4 2018-05-02 15:47:30 +01:00
Andreas Fackler 7096251b91 extended tests, make broadcast output only once 2018-05-02 16:34:54 +03:00
Vladimir Komendantskiy 7b04d5e084 created broadcast and agreement instances in Common Subset 2018-05-02 14:10:26 +01:00
Vladimir Komendantskiy 389855839f wrote CommonSubset::on_agreement_result and made related updates in agreement.rs 2018-05-02 11:57:28 +01:00
Vladimir Komendantskiy fbb69baa3c updated Common Subset with the new NodeUid type parameter 2018-05-02 08:15:47 +01:00
Vladimir Komendantskiy 579abbf415 merged changes in common_subset.rs into master 2018-05-01 20:21:13 +01:00
Vladimir Komendantskiy feb12ac5ed
Merge pull request #7 from poanetwork/afck-single-thread-test
test broadcast in a single thread
2018-05-01 18:42:19 +01:00
Vladimir Komendantskiy a792a209b5 Common Subset handler for input messages 2018-05-01 18:12:05 +01:00
Andreas Fackler f710806b17 test broadcast in a single thread 2018-05-01 19:38:11 +03:00
Vladimir Komendantskiy bb765cbb06 propose_value function in Broadcast 2018-05-01 15:28:31 +01:00
Vladimir Komendantskiy 2daaf7baf2 rewrote part of Common Subset to call Broadcast via a callback handler 2018-05-01 15:09:08 +01:00
Andreas Fackler d7882bae9c added Broadcast::handle_broadcast_message 2018-05-01 17:01:29 +03:00
Andreas Fackler 6117e11a9e applied rustfmt 2018-04-30 18:55:51 +03:00
Andreas Fackler f399ed2c07 fixed Clippy lint warnings 2018-04-30 18:50:24 +03:00
Vladimir Komendantskiy 1fadff0e30 added the broadcast trigger message in the broadcast test 2018-04-27 13:31:50 +01:00
Vladimir Komendantskiy 329adc3c2b ported sharding and sending out Merkle tree proofs 2018-04-27 13:19:39 +01:00
Vladimir Komendantskiy 3ae0984733 fixed a potential RwLock panic in the Common Subset handler 2018-04-26 18:49:57 +01:00
Vladimir Komendantskiy eef846550f added the ACS algorithm with one clause not ready yet 2018-04-26 14:22:18 +01:00