Documentation ¶
Index ¶
- func HandleGetBlockError(blk interfaces.ReadOnlySignedBeaconBlock, err error) error
- func IsOptimistic(ctx context.Context, stateId []byte, ...) (bool, error)
- func PrepareStateFetchGRPCError(err error) error
- func ValidateSyncGRPC(ctx context.Context, syncChecker sync.Checker, ...) error
- func ValidatorStatus(val state.ReadOnlyValidator, epoch primitives.Epoch) (validator.Status, error)
- func ValidatorSubStatus(val state.ReadOnlyValidator, epoch primitives.Epoch) (validator.Status, error)
- type IndexedVerificationFailure
- type SingleIndexedVerificationFailure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleGetBlockError ¶
func HandleGetBlockError(blk interfaces.ReadOnlySignedBeaconBlock, err error) error
func IsOptimistic ¶
func IsOptimistic( ctx context.Context, stateId []byte, optimisticModeFetcher blockchain.OptimisticModeFetcher, stateFetcher lookup.Stater, chainInfo blockchain.ChainInfoFetcher, database db.ReadOnlyDatabase, ) (bool, error)
IsOptimistic checks whether the beacon state's block is optimistic.
func PrepareStateFetchGRPCError ¶
PrepareStateFetchGRPCError returns an appropriate gRPC error based on the supplied argument. The argument error should be a result of fetching state.
func ValidateSyncGRPC ¶
func ValidateSyncGRPC( ctx context.Context, syncChecker sync.Checker, headFetcher blockchain.HeadFetcher, timeFetcher blockchain.TimeFetcher, optimisticModeFetcher blockchain.OptimisticModeFetcher, ) error
ValidateSyncGRPC checks whether the node is currently syncing and returns an error if it is. It also appends syncing info to gRPC headers.
func ValidatorStatus ¶
func ValidatorStatus(val state.ReadOnlyValidator, epoch primitives.Epoch) (validator.Status, error)
ValidatorStatus returns a validator's status at the given epoch.
func ValidatorSubStatus ¶
func ValidatorSubStatus(val state.ReadOnlyValidator, epoch primitives.Epoch) (validator.Status, error)
ValidatorSubStatus returns a validator's sub-status at the given epoch.
Types ¶
type IndexedVerificationFailure ¶
type IndexedVerificationFailure struct {
Failures []*SingleIndexedVerificationFailure `json:"failures"`
}
IndexedVerificationFailure represents a collection of verification failures.
type SingleIndexedVerificationFailure ¶
type SingleIndexedVerificationFailure struct { Index int `json:"index"` Message string `json:"message"` }
SingleIndexedVerificationFailure represents an issue when verifying a single indexed object e.g. an item in an array.