github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/signer.go (about) 1 package hotstuff 2 3 import ( 4 "github.com/onflow/flow-go/consensus/hotstuff/model" 5 "github.com/onflow/flow-go/model/flow" 6 ) 7 8 // Signer is responsible for creating votes, proposals for a given block. 9 type Signer interface { 10 // CreateProposal creates a proposal for the given block. No error returns 11 // are expected during normal operations (incl. presence of byz. actors). 12 CreateProposal(block *model.Block) (*model.Proposal, error) 13 14 // CreateVote creates a vote for the given block. No error returns are 15 // expected during normal operations (incl. presence of byz. actors). 16 CreateVote(block *model.Block) (*model.Vote, error) 17 18 // CreateTimeout creates a timeout for given view. No errors return are 19 // expected during normal operations(incl presence of byz. actors). 20 CreateTimeout(curView uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*model.TimeoutObject, error) 21 }