github.com/onflow/flow-go@v0.33.17/state/protocol/inmem/encodable.go (about)

     1  package inmem
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/cluster"
     5  	"github.com/onflow/flow-go/model/encodable"
     6  	"github.com/onflow/flow-go/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  	SealedVersionBeacon *flow.SealedVersionBeacon
    21  }
    22  
    23  // EncodableEpochs is the encoding format for protocol.EpochQuery
    24  type EncodableEpochs struct {
    25  	Previous *EncodableEpoch
    26  	Current  EncodableEpoch // cannot be nil
    27  	Next     *EncodableEpoch
    28  }
    29  
    30  // EncodableEpoch is the encoding format for protocol.Epoch
    31  type EncodableEpoch struct {
    32  	Counter            uint64
    33  	FirstView          uint64
    34  	DKGPhase1FinalView uint64
    35  	DKGPhase2FinalView uint64
    36  	DKGPhase3FinalView uint64
    37  	FinalView          uint64
    38  	RandomSource       []byte
    39  	InitialIdentities  flow.IdentityList
    40  	Clustering         flow.ClusterList
    41  	Clusters           []EncodableCluster
    42  	DKG                *EncodableDKG
    43  	FirstHeight        *uint64
    44  	FinalHeight        *uint64
    45  }
    46  
    47  // EncodableDKG is the encoding format for protocol.DKG
    48  type EncodableDKG struct {
    49  	GroupKey     encodable.RandomBeaconPubKey
    50  	Participants map[flow.Identifier]flow.DKGParticipant
    51  }
    52  
    53  type EncodableFullDKG struct {
    54  	GroupKey      encodable.RandomBeaconPubKey
    55  	PrivKeyShares []encodable.RandomBeaconPrivKey
    56  	PubKeyShares  []encodable.RandomBeaconPubKey
    57  }
    58  
    59  // EncodableCluster is the encoding format for protocol.Cluster
    60  type EncodableCluster struct {
    61  	Index     uint
    62  	Counter   uint64
    63  	Members   flow.IdentityList
    64  	RootBlock *cluster.Block
    65  	RootQC    *flow.QuorumCertificate
    66  }
    67  
    68  // EncodableParams is the encoding format for protocol.GlobalParams
    69  type EncodableParams struct {
    70  	ChainID                    flow.ChainID
    71  	SporkID                    flow.Identifier
    72  	SporkRootBlockHeight       uint64
    73  	ProtocolVersion            uint
    74  	EpochCommitSafetyThreshold uint64
    75  }