state

package
v0.29.10 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: AGPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknownSnapshotReference indicates that the reference point for a queried
	// snapshot cannot be resolved. The reference point is either a height above the
	// finalized boundary, or a block ID that does not exist in the state.
	ErrUnknownSnapshotReference = errors.New("reference block of the snapshot is not resolvable")
)

Functions

func IsInvalidExtensionError

func IsInvalidExtensionError(err error) bool

IsInvalidExtensionError returns whether the given error is an InvalidExtensionError error

func IsNoChildBlockError added in v0.29.0

func IsNoChildBlockError(err error) bool

func IsOutdatedExtensionError

func IsOutdatedExtensionError(err error) bool

func IsUnknownBlockError added in v0.26.17

func IsUnknownBlockError(err error) bool

func IsUnverifiableExtensionError added in v0.29.0

func IsUnverifiableExtensionError(err error) bool

func NewInvalidExtensionError

func NewInvalidExtensionError(msg string) error

func NewInvalidExtensionErrorf

func NewInvalidExtensionErrorf(msg string, args ...interface{}) error

func NewNoChildBlockError added in v0.29.0

func NewNoChildBlockError(msg string) error

func NewNoChildBlockErrorf added in v0.29.0

func NewNoChildBlockErrorf(msg string, args ...interface{}) error

func NewOutdatedExtensionError

func NewOutdatedExtensionError(msg string) error

func NewOutdatedExtensionErrorf

func NewOutdatedExtensionErrorf(msg string, args ...interface{}) error

func NewUnknownBlockError added in v0.26.17

func NewUnknownBlockError(blockID flow.Identifier) error

func NewUnverifiableExtensionError added in v0.29.0

func NewUnverifiableExtensionError(msg string, args ...interface{}) error

func WrapAsUnknownBlockError added in v0.26.17

func WrapAsUnknownBlockError(blockID flow.Identifier, err error) error

WrapAsUnknownBlockError wraps a given error as UnknownBlockError

Types

type InvalidExtensionError

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

InvalidExtensionError is an error for invalid extension of the state. An invalid extension is distinct from outdated or unverifiable extensions, in that it indicates a malicious input.

func (InvalidExtensionError) Unwrap added in v0.14.0

func (e InvalidExtensionError) Unwrap() error

type NoChildBlockError added in v0.29.0

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

NoChildBlockError is returned where a certain block has no valid child. Since all blocks are validated before being inserted to the state, this is equivalent to have no stored child.

func (NoChildBlockError) Unwrap added in v0.29.0

func (e NoChildBlockError) Unwrap() error

type OutdatedExtensionError

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

OutdatedExtensionError is an error for the extension of the state being outdated. Being outdated doesn't mean it's invalid or not. Knowing whether an outdated extension is an invalid extension or not would take more state queries.

func (OutdatedExtensionError) Unwrap added in v0.14.0

func (e OutdatedExtensionError) Unwrap() error

type UnknownBlockError added in v0.26.17

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

UnknownBlockError is a sentinel error indicating that a certain block has not been ingested yet.

func (UnknownBlockError) Unwrap added in v0.26.17

func (e UnknownBlockError) Unwrap() error

type UnverifiableExtensionError added in v0.29.0

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

UnverifiableExtensionError represents a state extension (block) which cannot be verified at the moment. For example, it does not connect to the finalized state, or an entity referenced within the payload is unknown. Unlike InvalidExtensionError, this error is only used when the failure CANNOT be attributed to a malicious input, therefore this error can be treated as a benign failure.

func (UnverifiableExtensionError) Unwrap added in v0.29.0

func (e UnverifiableExtensionError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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