HotShot icon indicating copy to clipboard operation
HotShot copied to clipboard

[Consensus2] Decouple quorum proposal recv task

Open jparr721 opened this issue 9 months ago • 0 comments

Closes #3173

This PR:

Right now the quorum proposal recv task relies on calling the existing consensus functions, but isolates the call site so that way it can exist in an idempotent manner. This has created some issues due to the need to keep backwards compatibility with the consensus task. Instead, we will author our own new logic and only reuse functions that have limited scope.

Specifically, this PR:

  • Implements the handler for the QuorumProposalRecv event.
  • Exhaustively unit tests all branching cases.
  • Handles the liveness check and vote logic.

Don't be alarmed by the diff, a lot of this PR is tests. Specifically, this PR adds tests for all branching cases, but not necessarily all failure cases, as asserting on the early returns is not cleanly supported yet in our test suite.

This PR does not:

Key places to review:

  • Please let me know if my handling of the start_consensus method is reasonable. The idea here is to log when dependency tasks is set to make sure that we're working with the correct version of the executable.
  • The view number for the LivenessCheckProposalRecv event.
    • Please see the design document for a detailed explanation of this event.

jparr721 avatar May 14 '24 17:05 jparr721