HotShot icon indicating copy to clipboard operation
HotShot copied to clipboard

[Cleanup] - Make `Proposal`, `QuorumProposal`, and others private structs

Open ss-es opened this issue 1 year ago • 0 comments

What is this task and why do we need to work on it?

In #2852, Leaf was made a private struct. However, we still have quite a few structs with public fields that would be worth making private, like QuorumProposal and Proposal.

We really should avoid a) the code duplication of constructing these by hand throughout the consensus task and b) the possibility that we might accidentally miss a check or build an invalid one somewhere.

What work will need to be done to complete this task?

No response

Are there any other details to include?

No response

What are the acceptance criteria to close this issue?

Minimally, we should:

  • make Proposal private
  • make QuorumProposal private
  • make SimpleVote private and cleanup constructor methods for these. For example, QuorumVote should be constructed directly from a QuorumProposal, and QuorumProposal should be constructed directly from the high_qc and view change evidence.

Branch work will be merged to (if not the default branch)

No response

ss-es avatar Apr 03 '24 15:04 ss-es