parallelchain-io / hotstuff_rs

Rust implementation of the HotStuff consensus algorithm.
34 stars 4 forks source link

Tracking issue: HotStuff-rs version 0.3 #11

Closed lyulka closed 5 months ago

lyulka commented 10 months ago

HotStuff-rs version 0.3

Version 0.3 is the next version of HotStuff-rs. Upgrading from v0.2 to v0.3 will be compilation breaking, but v0.3 replicas will be observationally equivalent to v0.2 replicas, that is, v0.3 replicas will be compatible with v0.2 replicas in a single network.

Changelog

HackMD.

lyulka commented 9 months ago

8 and #12 moved to v0.2.2 scope.

lyulka commented 9 months ago

12 moved back into v0.3 scope.

lyulka commented 8 months ago

Summary of design meeting (09 October)

  1. Extended the set of events to include events used in “Debug” level messages.
  2. Decide that all events should be logged at log level “Info”.
  3. Decide that we prefer to emit events directly from BlockTree code.
  4. Preliminary definition of “progress” for sync trigger timeout: setting highest QC.
  5. TODO: Specify contents and string formatting of logs.
lyulka commented 7 months ago

Summary of design meeting (27 November)

  1. Missing in the v0.3 pull request is a fix for the slow/non-terminating block sync described in #12.
  2. We discussed changes we can make to resolve this issue:
    1. Re-arranging recv to insert a message into the buffer before checking whether it contains a “QC from the future”.
    2. Entering highest_qc() + 2 instead of highest_qc() + 1 in the progress algorithm.
    3. Relaxing the check for ReceiveQCFromFuture to treat qc.view == cur_view as also being from the future.
    4. Returning the QC which triggered sync inside the error enum (e.g., ReceiveQCFromFuture(QuorumCertificate)) and immediately processing it after sync completes without having to get the QC from the progress message buffer.
    5. Splitting safe_block into two checks: one that is evaluated to decide whether a block is safe to vote for, and another that is evaluated to decide whether a block is safe to insert (similar to what is proposed in #4).
  3. We agreed to implement change number 1, and then merge the v0.3 pull request immediately.
  4. We will conduct experiments to verify whether implementing just change number 1 is enough to observably improve the sync behavior to an acceptable level.
  5. If it is already enough, then we shall release HotStuff-rs v0.3 with just change 1. If it is not yet enough, then we will expand the release to also implement some of changes 2-5.

@karolinagrzeszkiewicz