github.com/onflow/flow-go@v0.33.17/model/flow/quorum_certificate.go (about) 1 package flow 2 3 // QuorumCertificate represents a quorum certificate for a block proposal as defined in the HotStuff algorithm. 4 // A quorum certificate is a collection of votes for a particular block proposal. Valid quorum certificates contain 5 // signatures from a super-majority of consensus committee members. 6 type QuorumCertificate struct { 7 View uint64 8 BlockID Identifier 9 10 // SignerIndices encodes the HotStuff participants whose vote is included in this QC. 11 // For `n` authorized consensus nodes, `SignerIndices` is an n-bit vector (padded with tailing 12 // zeros to reach full bytes). We list the nodes in their canonical order, as defined by the protocol. 13 SignerIndices []byte 14 15 // For consensus cluster, the SigData is a serialization of the following fields 16 // - SigType []byte, bit-vector indicating the type of sig produced by the signer. 17 // - AggregatedStakingSig []byte 18 // - AggregatedRandomBeaconSig []byte 19 // - ReconstructedRandomBeaconSig crypto.Signature 20 // For collector cluster HotStuff, SigData is simply the aggregated staking signatures 21 // from all signers. 22 SigData []byte 23 } 24 25 // ID returns the QuorumCertificate's identifier 26 func (qc *QuorumCertificate) ID() Identifier { 27 if qc == nil { 28 return ZeroID 29 } 30 return MakeID(qc) 31 } 32 33 // QuorumCertificateWithSignerIDs is a QuorumCertificate, where the signing nodes are 34 // identified via their `flow.Identifier`s instead of indices. Working with IDs as opposed to 35 // indices is less efficient, but simpler, because we don't require a canonical node order. 36 // It is used for bootstrapping new Epochs, because the FlowEpoch smart contract has no 37 // notion of node ordering. 38 type QuorumCertificateWithSignerIDs struct { 39 View uint64 40 BlockID Identifier 41 SignerIDs []Identifier 42 SigData []byte 43 }