HotShot
HotShot copied to clipboard
[Cleanup] - Make `Proposal`, `QuorumProposal`, and others private structs
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
Proposalprivate - make
QuorumProposalprivate - make
SimpleVoteprivate and cleanup constructor methods for these. For example,QuorumVoteshould be constructed directly from aQuorumProposal, andQuorumProposalshould be constructed directly from thehigh_qcand view change evidence.
Branch work will be merged to (if not the default branch)
No response