Documentation ¶
Index ¶
- type ApprovalRequest
- type ApprovalResponse
- type BatchRequest
- type BlockProposal
- type BlockResponse
- type BlockVote
- type BroadcastDKGMessage
- type ChunkDataRequest
- type ChunkDataResponse
- type ClusterBlockProposal
- type ClusterBlockResponse
- type ClusterBlockVote
- type ClusterTimeoutObject
- type CollectionRequest
- type CollectionResponse
- type DKGMessage
- type EntityRequest
- type EntityResponse
- type PrivDKGMessageIn
- type PrivDKGMessageOut
- type RangeRequest
- type SubmitCollectionGuarantee
- type SyncRequest
- type SyncResponse
- type TimeoutObject
- type UntrustedBlock
- type UntrustedBlockPayload
- type UntrustedClusterBlock
- type UntrustedClusterBlockPayload
- type UntrustedExecutionResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalRequest ¶ added in v0.14.0
type ApprovalRequest struct { Nonce uint64 ResultID flow.Identifier ChunkIndex uint64 }
ApprovalRequest represents a request for a ResultApproval corresponding to a specific chunk.
type ApprovalResponse ¶ added in v0.14.0
type ApprovalResponse struct { Nonce uint64 Approval flow.ResultApproval }
ApprovalResponse contains a response to an approval request.
type BatchRequest ¶
type BatchRequest struct { Nonce uint64 BlockIDs []flow.Identifier }
BatchRequest is part of the sychronization protocol and represents an active (pulling) attempt to synchronize with the consensus state of the network. It requests finalized or unfinalized blocks by a list of block IDs.
type BlockProposal ¶
type BlockProposal struct {
Block UntrustedBlock
}
BlockProposal is part of the consensus protocol and represents the leader of a consensus round pushing a new proposal to the network.
func NewBlockProposal ¶ added in v0.29.0
func NewBlockProposal(internal *flow.Block) *BlockProposal
type BlockResponse ¶
type BlockResponse struct { Nonce uint64 Blocks []UntrustedBlock }
BlockResponse is part of the synchronization protocol and represents the reply to any active synchronization attempts. It contains a list of blocks that should correspond to the request.
func (*BlockResponse) BlocksInternal ¶ added in v0.29.0
func (br *BlockResponse) BlocksInternal() []*flow.Block
type BlockVote ¶
type BlockVote struct { BlockID flow.Identifier View uint64 SigData []byte }
BlockVote is part of the consensus protocol and represents a consensus node voting on the proposal of the leader of a given round.
type BroadcastDKGMessage ¶ added in v0.20.0
type BroadcastDKGMessage struct { DKGMessage CommitteeMemberIndex uint64 `json:"-"` // CommitteeMemberIndex field is set when reading broadcast messages using the NodeID to find the index of the sender in the DKG committee NodeID flow.Identifier `json:"-"` // NodeID field is added when reading broadcast messages from the DKG contract, this field is ignored when sending broadcast messages Signature crypto.Signature }
BroadcastDKGMessage is a wrapper around a DKGMessage intended for broadcasting. It contains a signature of the DKGMessage signed with the staking key of the sender. When the DKG contract receives BroadcastDKGMessage' it will attach the NodeID of the sender, we then add this field to the BroadcastDKGMessage when reading broadcast messages.
type ChunkDataRequest ¶
type ChunkDataRequest struct { ChunkID flow.Identifier Nonce uint64 // so that we aren't deduplicated by the network layer }
ChunkDataRequest represents a request for the a chunk data pack which is specified by a chunk ID.
type ChunkDataResponse ¶
type ChunkDataResponse struct { ChunkDataPack flow.ChunkDataPack Nonce uint64 // so that we aren't deduplicated by the network layer }
ChunkDataResponse is the response to a chunk data pack request. It contains the chunk data pack of the interest.
type ClusterBlockProposal ¶
type ClusterBlockProposal struct {
Block UntrustedClusterBlock
}
ClusterBlockProposal is a proposal for a block in collection node cluster consensus. The header contains information about consensus state and the payload contains the proposed collection (may be empty).
func NewClusterBlockProposal ¶ added in v0.29.0
func NewClusterBlockProposal(internal *cluster.Block) *ClusterBlockProposal
type ClusterBlockResponse ¶
type ClusterBlockResponse struct { Nonce uint64 Blocks []UntrustedClusterBlock }
ClusterBlockResponse is the same thing as BlockResponse, but for cluster consensus.
func (*ClusterBlockResponse) BlocksInternal ¶ added in v0.29.0
func (br *ClusterBlockResponse) BlocksInternal() []*cluster.Block
type ClusterBlockVote ¶
type ClusterBlockVote BlockVote
ClusterBlockVote is a vote for a proposed block in collection node cluster consensus; effectively a vote for a particular collection.
type ClusterTimeoutObject ¶ added in v0.29.0
type ClusterTimeoutObject TimeoutObject
ClusterTimeoutObject is part of the collection cluster protocol and represents a collection node timing out in given round. Contains a sequential number for deduplication purposes.
type CollectionRequest ¶
type CollectionRequest struct { ID flow.Identifier Nonce uint64 // so that we aren't deduplicated by the network layer }
CollectionRequest request all transactions from a collection with the given fingerprint.
type CollectionResponse ¶
type CollectionResponse struct { Collection flow.Collection Nonce uint64 // so that we aren't deduplicated by the network layer }
CollectionResponse is a response to a request for a collection.
type DKGMessage ¶ added in v0.20.0
DKGMessage is the type of message exchanged between DKG nodes.
func NewDKGMessage ¶ added in v0.20.0
func NewDKGMessage(data []byte, dkgInstanceID string) DKGMessage
NewDKGMessage creates a new DKGMessage.
type EntityRequest ¶
type EntityRequest struct { Nonce uint64 EntityIDs []flow.Identifier }
EntityRequest is a request for a set of entities, each keyed by an identifier. The relationship between the identifiers and the entity is not specified here. In the typical case, the identifier is simply the ID of the entity being requested, but more complex identifier-entity relationships can be used as well.
type EntityResponse ¶
type EntityResponse struct { Nonce uint64 EntityIDs []flow.Identifier Blobs [][]byte }
EntityResponse is a response to an entity request, containing a set of serialized entities and the identifiers used to request them. The returned entity set may be empty or incomplete.
type PrivDKGMessageIn ¶ added in v0.20.0
type PrivDKGMessageIn struct { DKGMessage CommitteeMemberIndex uint64 // CommitteeMemberIndex field is set when the message arrives at the Broker OriginID flow.Identifier }
PrivDKGMessageIn is a wrapper around a DKGMessage containing the network ID of the sender.
type PrivDKGMessageOut ¶ added in v0.20.0
type PrivDKGMessageOut struct { DKGMessage DestID flow.Identifier }
PrivDKGMessageOut is a wrapper around a DKGMessage containing the network ID of the destination.
type RangeRequest ¶
RangeRequest is part of the synchronization protocol and represents an active (pulling) attempt to synchronize with the consensus state of the network. It requests finalized blocks by a range of block heights, including from and to heights.
type SubmitCollectionGuarantee ¶
type SubmitCollectionGuarantee struct {
Guarantee flow.CollectionGuarantee
}
SubmitCollectionGuarantee is a request to submit the given collection guarantee to consensus nodes. Only valid as a node-local message.
type SyncRequest ¶
SyncRequest is part of the synchronization protocol and represents a node on the network sharing the height of its latest finalized block and requesting the same information from the recipient.
type SyncResponse ¶
SyncResponse is part of the synchronization protocol and represents the reply to a synchronization request that contains the latest finalized block height of the responding node.
type TimeoutObject ¶ added in v0.29.0
type TimeoutObject struct { TimeoutTick uint64 View uint64 NewestQC *flow.QuorumCertificate LastViewTC *flow.TimeoutCertificate SigData []byte }
TimeoutObject is part of the consensus protocol and represents a consensus node timing out in given round. Contains a sequential number for deduplication purposes.
type UntrustedBlock ¶ added in v0.29.0
type UntrustedBlock struct { Header flow.Header Payload UntrustedBlockPayload }
UntrustedBlock is a duplicate of flow.Block used within untrusted messages. It exists only to provide a memory-safe structure for decoding messages and should be replaced in the future by updating the core flow.Block type. Deprecated: Please update flow.Payload to use []flow.Guarantee etc., then replace instances of this type with flow.Block
func UntrustedBlockFromInternal ¶ added in v0.29.0
func UntrustedBlockFromInternal(flowBlock *flow.Block) UntrustedBlock
UntrustedBlockFromInternal converts the internal flow.Block representation to the representation used in untrusted messages.
func (*UntrustedBlock) ToInternal ¶ added in v0.29.0
func (ub *UntrustedBlock) ToInternal() *flow.Block
ToInternal returns the internal representation of the type.
type UntrustedBlockPayload ¶ added in v0.29.0
type UntrustedBlockPayload struct { Guarantees []flow.CollectionGuarantee Seals []flow.Seal Receipts []flow.ExecutionReceiptMeta Results []UntrustedExecutionResult }
UntrustedBlockPayload is a duplicate of flow.Payload used within untrusted messages. It exists only to provide a memory-safe structure for decoding messages and should be replaced in the future by updating the core flow.Payload type. Deprecated: Please update flow.Payload to use []flow.Guarantee etc., then replace instances of this type with flow.Payload
type UntrustedClusterBlock ¶ added in v0.29.0
type UntrustedClusterBlock struct { Header flow.Header Payload UntrustedClusterBlockPayload }
UntrustedClusterBlock is a duplicate of cluster.Block used within untrusted messages. It exists only to provide a memory-safe structure for decoding messages and should be replaced in the future by updating the core cluster.Block type. Deprecated: Please update cluster.Payload.Collection to use []flow.TransactionBody, then replace instances of this type with cluster.Block
func UntrustedClusterBlockFromInternal ¶ added in v0.29.0
func UntrustedClusterBlockFromInternal(clusterBlock *cluster.Block) UntrustedClusterBlock
UntrustedClusterBlockFromInternal converts the internal cluster.Block representation to the representation used in untrusted messages.
func (*UntrustedClusterBlock) ToInternal ¶ added in v0.29.0
func (ub *UntrustedClusterBlock) ToInternal() *cluster.Block
ToInternal returns the internal representation of the type.
type UntrustedClusterBlockPayload ¶ added in v0.29.0
type UntrustedClusterBlockPayload struct { Collection []flow.TransactionBody ReferenceBlockID flow.Identifier }
UntrustedClusterBlockPayload is a duplicate of cluster.Payload used within untrusted messages. It exists only to provide a memory-safe structure for decoding messages and should be replaced in the future by updating the core cluster.Payload type. Deprecated: Please update cluster.Payload.Collection to use []flow.TransactionBody, then replace instances of this type with cluster.Payload
type UntrustedExecutionResult ¶ added in v0.29.0
type UntrustedExecutionResult struct { PreviousResultID flow.Identifier BlockID flow.Identifier Chunks []flow.Chunk ServiceEvents flow.ServiceEventList ExecutionDataID flow.Identifier }
UntrustedExecutionResult is a duplicate of flow.ExecutionResult used within untrusted messages. It exists only to provide a memory-safe structure for decoding messages and should be replaced in the future by updating the core flow.ExecutionResult type. Deprecated: Please update flow.ExecutionResult to use []flow.Chunk, then replace instances of this type with flow.ExecutionResult
func UntrustedExecutionResultFromInternal ¶ added in v0.29.0
func UntrustedExecutionResultFromInternal(internal *flow.ExecutionResult) UntrustedExecutionResult
UntrustedExecutionResultFromInternal converts the internal flow.ExecutionResult representation to the representation used in untrusted messages.
func (*UntrustedExecutionResult) ToInternal ¶ added in v0.29.0
func (ur *UntrustedExecutionResult) ToInternal() *flow.ExecutionResult
ToInternal returns the internal representation of the type.