Documentation ¶
Overview ¶
Package cluster contains models related to collection node cluster consensus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
Block represents a block in collection node cluster consensus. It contains a standard block header with a payload containing only a single collection.
func (Block) ID ¶
func (b Block) ID() flow.Identifier
ID returns the ID of the underlying block header.
func (*Block) SetPayload ¶
SetPayload sets the payload and payload hash.
type Payload ¶
type Payload struct { // Collection is the collection being created. Collection flow.Collection // ReferenceBlockID is the ID of a reference block on the main chain. It // is defined as the ID of the reference block with the lowest height // from all transactions within the collection. // // This determines when the collection expires, using the same expiry rules // as transactions. It is also used as the reference point for committee // state (staking, etc.) when validating the containing block. // // The root block of a cluster chain has an empty reference block ID, as it // is created in advance of its members (necessarily) being authorized network // members. It is invalid for any non-root block to have an empty reference // block ID. ReferenceBlockID flow.Identifier }
Payload is the payload for blocks in collection node cluster consensus. It contains only a single collection.
func EmptyPayload ¶
func EmptyPayload(refID flow.Identifier) Payload
EmptyPayload returns a payload with an empty collection and the given reference block ID.
func PayloadFromTransactions ¶
func PayloadFromTransactions(refID flow.Identifier, transactions ...*flow.TransactionBody) Payload
PayloadFromTransactions creates a payload given a reference block ID and a list of transaction hashes.