messages

package
v0.29.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalRequest

type ApprovalRequest struct {
	Nonce      uint64
	ResultID   flow.Identifier
	ChunkIndex uint64
}

ApprovalRequest represents a request for a ResultApproval corresponding to a specific chunk.

type ApprovalResponse

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

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

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

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

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

func (br *ClusterBlockResponse) BlocksInternal() []*cluster.Block

type ClusterBlockVote

type ClusterBlockVote struct {
	BlockID flow.Identifier
	View    uint64
	SigData []byte
}

ClusterBlockVote is a vote for a proposed block in collection node cluster consensus; effectively a vote for a particular collection.

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

type DKGMessage struct {
	Data          []byte
	DKGInstanceID string
}

DKGMessage is the type of message exchanged between DKG nodes.

func NewDKGMessage

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 ExecutionStateDelta

type ExecutionStateDelta struct {
	entity.ExecutableBlock
	StateInteractions  []*delta.Snapshot
	EndState           flow.StateCommitment
	Events             []flow.Event
	ServiceEvents      []flow.Event
	TransactionResults []flow.TransactionResult
}

func (*ExecutionStateDelta) Checksum

func (b *ExecutionStateDelta) Checksum() flow.Identifier

func (*ExecutionStateDelta) Height

func (b *ExecutionStateDelta) Height() uint64

func (*ExecutionStateDelta) ID

func (*ExecutionStateDelta) ParentID

func (b *ExecutionStateDelta) ParentID() flow.Identifier

type ExecutionStateSyncRequest

type ExecutionStateSyncRequest struct {
	FromHeight uint64
	ToHeight   uint64
}

ExecutionStateSyncRequest represents a request for state deltas between the block at the `FromHeight` and the block at the `ToHeight` since the state sync request only requests for sealed blocks, heights should be enough to specify the block deterministically.

type PrivDKGMessageIn

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

type PrivDKGMessageOut struct {
	DKGMessage
	DestID flow.Identifier
}

PrivDKGMessageOut is a wrapper around a DKGMessage containing the network ID of the destination.

type RangeRequest

type RangeRequest struct {
	Nonce      uint64
	FromHeight uint64
	ToHeight   uint64
}

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

type SyncRequest struct {
	Nonce  uint64
	Height uint64
}

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

type SyncResponse struct {
	Nonce  uint64
	Height uint64
}

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 UntrustedBlock

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

func UntrustedBlockFromInternal(flowBlock *flow.Block) UntrustedBlock

UntrustedBlockFromInternal converts the internal flow.Block representation to the representation used in untrusted messages.

func (*UntrustedBlock) ToInternal

func (ub *UntrustedBlock) ToInternal() *flow.Block

ToInternal returns the internal representation of the type.

type UntrustedBlockPayload

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

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

func UntrustedClusterBlockFromInternal(clusterBlock *cluster.Block) UntrustedClusterBlock

UntrustedClusterBlockFromInternal converts the internal cluster.Block representation to the representation used in untrusted messages.

func (*UntrustedClusterBlock) ToInternal

func (ub *UntrustedClusterBlock) ToInternal() *cluster.Block

ToInternal returns the internal representation of the type.

type UntrustedClusterBlockPayload

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

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

func UntrustedExecutionResultFromInternal(internal *flow.ExecutionResult) UntrustedExecutionResult

UntrustedExecutionResultFromInternal converts the internal flow.ExecutionResult representation to the representation used in untrusted messages.

func (*UntrustedExecutionResult) ToInternal

func (ur *UntrustedExecutionResult) ToInternal() *flow.ExecutionResult

ToInternal returns the internal representation of the type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL