state

package
v0.37.16 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: AGPL-3.0 Imports: 2 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 IsOutdatedExtensionError

func IsOutdatedExtensionError(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 NewOutdatedExtensionError

func NewOutdatedExtensionError(msg string) error

func NewOutdatedExtensionErrorf

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

func NewUnverifiableExtensionError added in v0.29.0

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

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 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 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

Jump to

Keyboard shortcuts

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