invalid

package
v0.31.9-HCU-test Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epoch

type Epoch struct {
	// contains filtered or unexported fields
}

Epoch represents an epoch that does not exist or could not be retrieved.

func NewEpoch

func NewEpoch(err error) *Epoch

NewEpoch returns a new invalid epoch, containing an error describing why the epoch could not be retrieved. The following are expected errors when constructing an invalid Epoch:

  • protocol.ErrNoPreviousEpoch - if the epoch represents a previous epoch which does not exist. This happens when the previous epoch is queried within the first epoch of a spork.
  • protocol.ErrNextEpochNotSetup - if the epoch represents a next epoch which has not been set up. This happens when the next epoch is queried within the EpochStaking phase of any epoch.
  • state.ErrUnknownSnapshotReference - if the epoch is queried from an unresolvable snapshot.
  • generic error in case of unexpected critical internal corruption or bugs

func NewEpochf added in v0.28.0

func NewEpochf(msg string, args ...interface{}) *Epoch

NewEpochf is NewEpoch with ergonomic error formatting.

func (*Epoch) Cluster

func (u *Epoch) Cluster(uint) (protocol.Cluster, error)

func (*Epoch) ClusterByChainID added in v0.26.1

func (u *Epoch) ClusterByChainID(chainID flow.ChainID) (protocol.Cluster, error)

func (*Epoch) Clustering

func (u *Epoch) Clustering() (flow.ClusterList, error)

func (*Epoch) Counter

func (u *Epoch) Counter() (uint64, error)

func (*Epoch) DKG

func (u *Epoch) DKG() (protocol.DKG, error)

func (*Epoch) DKGPhase1FinalView added in v0.20.0

func (u *Epoch) DKGPhase1FinalView() (uint64, error)

func (*Epoch) DKGPhase2FinalView added in v0.20.0

func (u *Epoch) DKGPhase2FinalView() (uint64, error)

func (*Epoch) DKGPhase3FinalView added in v0.20.0

func (u *Epoch) DKGPhase3FinalView() (uint64, error)

func (*Epoch) FinalHeight added in v0.30.0

func (u *Epoch) FinalHeight() (uint64, error)

func (*Epoch) FinalView

func (u *Epoch) FinalView() (uint64, error)

func (*Epoch) FirstHeight added in v0.30.0

func (u *Epoch) FirstHeight() (uint64, error)

func (*Epoch) FirstView

func (u *Epoch) FirstView() (uint64, error)

func (*Epoch) InitialIdentities

func (u *Epoch) InitialIdentities() (flow.IdentityList, error)

func (*Epoch) RandomSource

func (u *Epoch) RandomSource() ([]byte, error)

type Epochs

type Epochs struct {
	// contains filtered or unexported fields
}

Epochs is an epoch query for an invalid snapshot.

func (*Epochs) Current

func (u *Epochs) Current() protocol.Epoch

func (*Epochs) Next

func (u *Epochs) Next() protocol.Epoch

func (*Epochs) Previous

func (u *Epochs) Previous() protocol.Epoch

type Params added in v0.23.2

type Params struct {
	// contains filtered or unexported fields
}

Params represents parameters for an invalid state snapshot query.

func (Params) ChainID added in v0.23.2

func (p Params) ChainID() (flow.ChainID, error)

func (Params) EpochCommitSafetyThreshold added in v0.29.0

func (p Params) EpochCommitSafetyThreshold() (uint64, error)

func (Params) ProtocolVersion added in v0.23.2

func (p Params) ProtocolVersion() (uint, error)

func (Params) SporkID added in v0.23.2

func (p Params) SporkID() (flow.Identifier, error)

func (Params) SporkRootBlockHeight added in v0.29.6

func (p Params) SporkRootBlockHeight() (uint64, error)

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

Snapshot represents a snapshot that does not exist or could not be queried.

func NewSnapshot

func NewSnapshot(err error) *Snapshot

NewSnapshot returns a new invalid snapshot, containing an error describing why the snapshot could not be retrieved. The following are expected errors when constructing an invalid Snapshot:

  • state.ErrUnknownSnapshotReference if the reference point for the snapshot (height or block ID) does not resolve to a queriable block in the state.
  • generic error in case of unexpected critical internal corruption or bugs

func NewSnapshotf added in v0.28.0

func NewSnapshotf(msg string, args ...interface{}) *Snapshot

NewSnapshotf is NewSnapshot with ergonomic error formatting.

func (*Snapshot) Commit

func (u *Snapshot) Commit() (flow.StateCommitment, error)

func (*Snapshot) Descendants added in v0.17.6

func (u *Snapshot) Descendants() ([]flow.Identifier, error)

func (*Snapshot) Epochs

func (u *Snapshot) Epochs() protocol.EpochQuery

func (*Snapshot) Head

func (u *Snapshot) Head() (*flow.Header, error)

func (*Snapshot) Identities

func (u *Snapshot) Identities(_ flow.IdentityFilter) (flow.IdentityList, error)

func (*Snapshot) Identity

func (u *Snapshot) Identity(_ flow.Identifier) (*flow.Identity, error)

func (*Snapshot) Params added in v0.23.2

func (u *Snapshot) Params() protocol.GlobalParams

func (*Snapshot) Phase

func (u *Snapshot) Phase() (flow.EpochPhase, error)

func (*Snapshot) QuorumCertificate

func (u *Snapshot) QuorumCertificate() (*flow.QuorumCertificate, error)

func (*Snapshot) RandomSource added in v0.25.0

func (u *Snapshot) RandomSource() ([]byte, error)

func (*Snapshot) SealedResult

func (u *Snapshot) SealedResult() (*flow.ExecutionResult, *flow.Seal, error)

func (*Snapshot) SealingSegment

func (u *Snapshot) SealingSegment() (*flow.SealingSegment, error)

func (*Snapshot) VersionBeacon added in v0.31.0

func (u *Snapshot) VersionBeacon() (*flow.SealedVersionBeacon, error)

Jump to

Keyboard shortcuts

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