mirror of https://github.com/poanetwork/hbbft.git
b98bbe9dcd
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. |
||
---|---|---|
.. | ||
broadcast.rs |