state

package
v0.29.6-upgrade-to-bad... 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: 3 Imported by: 0

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 IsNoValidChildBlockError

func IsNoValidChildBlockError(err error) bool

func IsOutdatedExtensionError

func IsOutdatedExtensionError(err error) bool

func IsUnknownBlockError

func IsUnknownBlockError(err error) bool

func IsUnverifiableExtensionError

func IsUnverifiableExtensionError(err error) bool

func NewInvalidExtensionError

func NewInvalidExtensionError(msg string) error

func NewInvalidExtensionErrorf

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

func NewNoValidChildBlockError

func NewNoValidChildBlockError(msg string) error

func NewNoValidChildBlockErrorf

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

func NewOutdatedExtensionError

func NewOutdatedExtensionError(msg string) error

func NewOutdatedExtensionErrorf

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

func NewUnknownBlockError

func NewUnknownBlockError(blockID flow.Identifier) error

func NewUnverifiableExtensionError

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

func WrapAsUnknownBlockError

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

func (e InvalidExtensionError) Unwrap() error

type NoValidChildBlockError

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

NoValidChildBlockError is a sentinel error when the case where a certain block has no valid child.

func (NoValidChildBlockError) Unwrap

func (e NoValidChildBlockError) 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

func (e OutdatedExtensionError) Unwrap() error

type UnknownBlockError

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

func (e UnknownBlockError) Unwrap() error

type UnverifiableExtensionError

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

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