github.com/koko1123/flow-go-1@v0.29.6/state/protocol/inmem/encodable.go (about) 1 package inmem 2 3 import ( 4 "github.com/koko1123/flow-go-1/model/cluster" 5 "github.com/koko1123/flow-go-1/model/encodable" 6 "github.com/koko1123/flow-go-1/model/flow" 7 ) 8 9 // EncodableSnapshot is the encoding format for protocol.Snapshot 10 type EncodableSnapshot struct { 11 Head *flow.Header 12 Identities flow.IdentityList 13 LatestSeal *flow.Seal 14 LatestResult *flow.ExecutionResult 15 SealingSegment *flow.SealingSegment 16 QuorumCertificate *flow.QuorumCertificate 17 Phase flow.EpochPhase 18 Epochs EncodableEpochs 19 Params EncodableParams 20 } 21 22 // EncodableEpochs is the encoding format for protocol.EpochQuery 23 type EncodableEpochs struct { 24 Previous *EncodableEpoch 25 Current EncodableEpoch // cannot be nil 26 Next *EncodableEpoch 27 } 28 29 // EncodableEpoch is the encoding format for protocol.Epoch 30 type EncodableEpoch struct { 31 Counter uint64 32 FirstView uint64 33 DKGPhase1FinalView uint64 34 DKGPhase2FinalView uint64 35 DKGPhase3FinalView uint64 36 FinalView uint64 37 RandomSource []byte 38 InitialIdentities flow.IdentityList 39 Clustering flow.ClusterList 40 Clusters []EncodableCluster 41 DKG *EncodableDKG 42 } 43 44 // EncodableDKG is the encoding format for protocol.DKG 45 type EncodableDKG struct { 46 GroupKey encodable.RandomBeaconPubKey 47 Participants map[flow.Identifier]flow.DKGParticipant 48 } 49 50 type EncodableFullDKG struct { 51 GroupKey encodable.RandomBeaconPubKey 52 PrivKeyShares []encodable.RandomBeaconPrivKey 53 PubKeyShares []encodable.RandomBeaconPubKey 54 } 55 56 // EncodableCluster is the encoding format for protocol.Cluster 57 type EncodableCluster struct { 58 Index uint 59 Counter uint64 60 Members flow.IdentityList 61 RootBlock *cluster.Block 62 RootQC *flow.QuorumCertificate 63 } 64 65 // EncodableParams is the encoding format for protocol.GlobalParams 66 type EncodableParams struct { 67 ChainID flow.ChainID 68 SporkID flow.Identifier 69 ProtocolVersion uint 70 }