github.com/onflow/flow-go@v0.33.17/model/flow/timeout_certificate.go (about) 1 package flow 2 3 import "github.com/onflow/flow-go/crypto" 4 5 // TimeoutCertificate proves that a super-majority of consensus participants want to abandon the specified View. 6 // At its core, a timeout certificate is an aggregation of TimeoutObjects, which individual nodes send to signal 7 // their intent to leave the active view. 8 type TimeoutCertificate struct { 9 View uint64 10 // NewestQCViews lists for each signer (in the same order) the view of the newest QC they supplied 11 // as part of their TimeoutObject message (specifically TimeoutObject.NewestQC.View). 12 NewestQCViews []uint64 13 // NewestQC is the newest QC from all TimeoutObject that were aggregated for this certificate. 14 NewestQC *QuorumCertificate 15 // SignerIndices encodes the HotStuff participants whose TimeoutObjects are included in this TC. 16 // For `n` authorized consensus nodes, `SignerIndices` is an n-bit vector (padded with tailing 17 // zeros to reach full bytes). We list the nodes in their canonical order, as defined by the protocol. 18 SignerIndices []byte 19 // SigData is an aggregated signature from multiple TimeoutObjects, each from a different replica. 20 // In their TimeoutObjects, replicas sign the pair (View, NewestQCView) with their staking keys. 21 SigData crypto.Signature 22 } 23 24 // ID returns the TimeoutCertificate's identifier 25 func (t *TimeoutCertificate) ID() Identifier { 26 if t == nil { 27 return ZeroID 28 } 29 30 body := struct { 31 View uint64 32 NewestQCViews []uint64 33 NewestQCID Identifier 34 SignerIndices []byte 35 SigData crypto.Signature 36 }{ 37 View: t.View, 38 NewestQCViews: t.NewestQCViews, 39 NewestQCID: t.NewestQC.ID(), 40 SignerIndices: t.SignerIndices, 41 SigData: t.SigData, 42 } 43 return MakeID(body) 44 }