Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackfillClusterBlockByReferenceHeightIndex ¶ added in v0.25.15
func BackfillClusterBlockByReferenceHeightIndex(db *badger.DB, log zerolog.Logger, me flow.Identifier, state protocol.State, backfillNum int) error
BackfillClusterBlockByReferenceHeightIndex populates the reference height to cluster block index for all blocks in this node's cluster for the previous 2 epochs. This is intended for use when initially deploying transaction deduplication mid-spork.
This procedure is idempotent - it will backfill the index only once and on all subsequent calls will be a no-op.
TODO this method should not be included in the master branch.
Types ¶
type MutableState ¶ added in v0.14.0
type MutableState struct { *State // contains filtered or unexported fields }
func NewMutableState ¶ added in v0.14.0
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot represents a snapshot of chain state anchored at a particular reference block.
func (*Snapshot) Collection ¶
func (s *Snapshot) Collection() (*flow.Collection, error)
type State ¶
type State struct {
// contains filtered or unexported fields
}
func Bootstrap ¶ added in v0.14.0
Bootstrap initializes the persistent cluster state with a genesis block. The genesis block must have height 0, a parent hash of 32 zero bytes, and an empty collection as payload.
type StateRoot ¶ added in v0.14.0
type StateRoot struct {
// contains filtered or unexported fields
}
StateRoot is the root information required to bootstrap the cluster state
type Translator ¶
type Translator struct {
// contains filtered or unexported fields
}
Translator is a translation layer that determines the reference block on the main chain for a given cluster block, using the reference block from the cluster block's payload.
func NewTranslator ¶
func NewTranslator(payloads storage.ClusterPayloads, state protocol.State) *Translator
NewTranslator returns a new block ID translator.
func (*Translator) Translate ¶
func (t *Translator) Translate(blockID flow.Identifier) (flow.Identifier, error)
Translate retrieves the reference main-chain block ID for the given cluster block ID.