Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added extra message types * Add send functions for new message types * Store original value message received from proposer * Modify handle_value for optimized broadcast * Modify handle_echo for optimized broadcast * Add handle_echo_hash function for optimized broadcast * Add handle_can_decode function for optimized broadcast * Fixes handle_ready and send_echo functions: 1) Modify handle_ready function for optimized broadcast 2) Modify send_echo function to send `Echo` messages to different subset of nodes from handle_value and handle_ready functions * Remove value_message and fix typos * Add functions for filtering all_ids * Separate send_echo to send_echo_left and send_echo_remaining * Rename pessimism_factor to fault_estimate * Remove redundant bools from Broadcast struct * Fix multiple counting of nodes who sent both `Echo` and `EchoHash` by changing `echos` map structure * Allow conflicting `CanDecode`s from same node * Fix left and right iterators for `Echo` and `EchoHash` messages * Fixes bugs in left and right iterators and adds additional checks in handle functions * Change can_decodes to BTreeMap<Digest, BTreeSet<N>> and fix send_can_decode * Minor fixes * Modify send_echo_remaining to take a hash parameter * Fix bug in left and right iterators. * Excluding proposer in iterator led to infinite loop when our_id == proposer_id * Fix bug in handle_echo and compute_output * send_can_decode call in handle_echo returned early * compute_output needed `N - f` full `Echo`s to decode * Refactor `echos` map to take an EchoContent Enum for `Echo` and `EchoHash` messages * Run rustfmt * Refactor to avoid index access and multiple map lookups * Fix comments and minor refactorings. * Add an`AllExcept(BTreeSet<N>)` type to `Target` enum to enable sending messages to non-validators from Broadcast. * Use `Target::AllExcept` in Broadcast to send `Echo` messages to all non-validator nodes. * Add `AllExcept(_)` match arms for `Target` match expressions. * Rename `AllExcept` parameter from `known` to `exclude`. * Modify send_can_decode to send to all nodes who haven't sent an `Echo`. * Update docs for broadcast * Improve formatting and add comments for broadcast docs. * Fix formatting. * Allow for sending multiple `CanDecode` messages with different hashes. * Fix comments. * Fix bug in sending `Echo`s when node has not received `CanDecode`.
- Loading branch information