Module hotshot_task_impls::helpers
source · Expand description
Helper functions used by any task
Structs§
- Helper type to give names and to the output values of the leaf chain traversal operation.
Functions§
- Helper function to send events and log errors
- Ascends the leaf chain by traversing through the parent commitments of the proposal. We begin by obtaining the parent view, and if we are in a chain (i.e. the next view from the parent is one view newer), then we begin attempting to form the chain. This is a direct impl from HotStuff section 5:
- calculate the new decided leaf chain based on the rules of hostuff 2
- Trigger a request to the network for a proposal for a view and wait for the response or timeout.
- Gets the parent leaf and state from the parent of a proposal, returning an [
utils::anytrace::Error
] if not. - Validate the state and safety and liveness of a proposal then emit a
QuorumProposalValidated
event. - Validates, from a given
proposal
that the view that it is being submitted for is valid when compared tocur_view
which is the highest proposed view (so far) for the caller. If the proposal is for a view that’s later than expected, that the proposal includes a timeout or view sync certificate.