Andreas Fackler
bbc27e8a66
Update terminology: "observers" and "validators"
2018-07-02 14:14:19 +02:00
Andreas Fackler
33eadc94ef
Apply code review comments; improve broadcast docs.
2018-06-28 21:46:51 +02:00
Andreas Fackler
824a23775d
Move broadcast docs to module-level.
...
Also replaces the word "good" with "correct".
2018-06-28 12:49:11 +02:00
Andreas Fackler
aaec3d4074
Simplify observer/peer-specific code.
...
Extract some methods to make the branches more readable.
2018-06-26 14:50:06 +02:00
Andreas Fackler
2db67df325
Rename is_full_node to is_peer.
2018-06-26 10:57:44 +02:00
Andreas Fackler
2a5f9f1bfe
Allow observer nodes in all algorithms.
...
This allows nodes to join the network without sending any messages
themselves. They can't give any input and just observe the outcome.
Closes #81
2018-06-26 09:17:12 +02:00
Andreas Fackler
83f8d61402
Support serde by default.
...
This removes the `serialization-serde` feature, since serde is already
used internally and therefore a dependency anyway.
2018-06-20 10:21:52 +02:00
Andreas Fackler
66f396e01c
Remove more NodeUid trait bounds.
...
Use a `BTreeMap` instead of `HashMap` in `NetworkInfo`. The number of
nodes can't grow very large anyway.
2018-06-18 16:37:07 +02:00
Andreas Fackler
3f707a8e12
Return proposer info from HoneyBadger.
...
Also, consistently name generic arguments, and remove some unused trait
bounds.
2018-06-18 16:19:54 +02:00
Vladimir Komendantskiy
3393052b4b
review comment coverage
2018-06-14 12:28:38 +01:00
Vladimir Komendantskiy
5008d11ada
Revert "the set of node indices of common coin shares is now computed only once"
...
This reverts commit e9808efc61
.
2018-06-14 10:05:05 +01:00
Vladimir Komendantskiy
e9808efc61
the set of node indices of common coin shares is now computed only once
2018-06-13 22:05:11 +01:00
Andreas Fackler
9859002e1b
Don't panic on shards of unequal size.
2018-05-31 09:12:15 +02:00
Andreas Fackler
bb61d0c5ab
Ignore messages in Agreement after termination.
2018-05-30 17:33:24 +02:00
Andreas Fackler
c91fa13213
Make Broadcast handle large payloads.
2018-05-30 15:40:15 +02:00
Vladimir Komendantskiy
d09f3e26b4
introduced common shared network information
2018-05-29 14:53:01 +01:00
Andreas Fackler
9a0622f3f2
Update Rust, re-enable rustfmt.
2018-05-21 11:26:42 +02:00
Peter van Nostrand
19b982284b
Added error-chain error handling.
2018-05-20 07:51:33 -04:00
Andreas Fackler
50d007b954
Remove protoc dep, use new MerkleTree methods.
2018-05-17 16:50:47 +02:00
Andreas Fackler
b8c534da2b
Rename has_output to decided, add output iterator.
2018-05-15 16:05:55 +02:00
Andreas Fackler
3895949cf6
Fix broadcast for size < 4, and test more network sizes.
2018-05-15 15:53:37 +02:00
Andreas Fackler
10d9aa73e3
Rename UnexpectedMessage error.
2018-05-15 15:48:43 +02:00
Andreas Fackler
5528fc2de8
Define a common DistAlgorithm trait.
...
This will allow us to deduplicate network simulations in tests for the
different algorithms. More generally, it facilitates writing general
tools and applying them to all distributed algorithms.
2018-05-15 15:48:43 +02:00
Andreas Fackler
b543b771a7
Rename util to fmt.
2018-05-15 08:31:13 +02:00
Andreas Fackler
e2c66e9a0a
Add optional serde support.
...
If the feature "serialization-serde" is specified, protocol messages
implement serde's `Serialize` and `Deserialize` traits.
Close #18
2018-05-14 18:32:59 +02:00
Andreas Fackler
e8838f1491
Make protobuf support optional.
...
Protobuf support is now only built if the feature
"serialization-protobuf" is enabled.
Close #19
2018-05-14 17:29:04 +02:00
Andreas Fackler
71fa32c18f
Remove interior mutability.
...
The `RwLock` is not needed anymore, since the broadcast implementation
doesn't handle any threading internally.
2018-05-14 09:35:34 +02:00
Andreas Fackler
38cdd596a2
Start implementing the top-level Honey Badger algorithm.
...
This also contains a few fixes for the `common_subset` module:
* Rename `common_subset::Output` to `Message` to avoid confusing it
with the value that the algorithm outputs as a result.
* Implement dispatch of messages to the right instance within
`CommonSubset`, in a way that is transparent to the user.
2018-05-12 16:09:07 +02:00
Andreas Fackler
36183b1e27
Simplify the message types.
2018-05-10 17:52:12 +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
Andreas Fackler
eec3102cbf
Move node to examples, deduplicate code.
2018-05-05 17:54:29 +02: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
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
Andreas Fackler
7096251b91
extended tests, make broadcast output only once
2018-05-02 16:34:54 +03: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
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
329adc3c2b
ported sharding and sending out Merkle tree proofs
2018-04-27 13:19:39 +01:00
Vladimir Komendantskiy
eef846550f
added the ACS algorithm with one clause not ready yet
2018-04-26 14:22:18 +01:00