HotShot icon indicating copy to clipboard operation
HotShot copied to clipboard

[CX_CLEANUP] - Diverge the Quorum Vote Task

Open shenkeyao opened this issue 9 months ago • 0 comments

Closes #3172. Currently a draft, because it's based on https://github.com/EspressoSystems/HotShot/pull/3156. Will rebase after that PR is merged.

This PR:

  • Adds the ValidatedState dependency to the quorum vote task.
  • Refactors the update_state_and_vote_if_able function:
    • Adds the dependency-task-related logic to the vote task.
    • Only uses it in non-dependency tasks.
    • Updates quorum vote task tests.
      • Adds the ValidatedStateValidted event to the inputs.
      • Fixes incorrect view index.
      • Adds a test for mismatched inputs.
  • Misc:
    • Combines test_helpers.rs and task_helpers.rs into helpers.rs.
    • Renames create_fake_view_with_leaf_* functions to build_fake_view_with_leaf_* to be consistent with other names.
    • Renames disperse_share to vid_share, and VID disperse to VID share.

This PR does not:

Change other tasks other than the vote task.

Key places to review:

  • crates/task-impls/src/consensus/helpers.rs.
  • crates/task-impls/src/quorum_vote.rs.

shenkeyao avatar May 23 '24 07:05 shenkeyao