forked from ava-labs/hypersdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.go
69 lines (60 loc) · 3.06 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (C) 2023, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package chain
import "errors"
var (
// Parsing
ErrInvalidObject = errors.New("invalid object")
// Genesis Correctness
ErrInvalidChainID = errors.New("invalid chain ID")
ErrInvalidBlockRate = errors.New("invalid block rate")
// Block Correctness
ErrTimestampTooEarly = errors.New("timestamp too early")
ErrTimestampTooLate = errors.New("timestamp too late")
ErrStateRootEmpty = errors.New("state root empty")
ErrNoTxs = errors.New("no transactions")
ErrInvalidUnitPrice = errors.New("invalid unit price")
ErrInvalidUnitWindow = errors.New("invalid unit window")
ErrInvalidBlockCost = errors.New("invalid block cost")
ErrInvalidBlockWindow = errors.New("invalid block window")
ErrInvalidUnitsConsumed = errors.New("invalid units consumed")
ErrInsufficientSurplus = errors.New("insufficient surplus fee")
ErrInvalidSurplus = errors.New("invalid surplus fee")
ErrStateRootMismatch = errors.New("state root mismatch")
ErrInvalidResult = errors.New("invalid result")
// Tx Correctness
ErrInvalidSignature = errors.New("invalid signature")
ErrDuplicateTx = errors.New("duplicate transaction")
ErrInsufficientPrice = errors.New("insufficient price")
ErrInvalidType = errors.New("invalid tx type")
ErrInvalidID = errors.New("invalid content ID")
ErrInvalidSchema = errors.New("invalid schema")
ErrInvalidContent = errors.New("invalid content")
ErrContentAlreadyExists = errors.New("content already exists")
ErrContentMissing = errors.New("content does not exist")
ErrWrongOwner = errors.New("wrong owner")
ErrInsufficientTip = errors.New("insufficient tip")
ErrAccountNotEmpty = errors.New("account not empty")
ErrServicerMissing = errors.New("servicer missing")
ErrTooManyTxs = errors.New("too many transactions")
ErrActionNotActivated = errors.New("action not activated")
ErrAuthNotActivated = errors.New("auth not activated")
ErrAuthFailed = errors.New("auth failed")
ErrMisalignedTime = errors.New("misaligned time")
// Execution Correctness
ErrInvalidBalance = errors.New("invalid balance")
ErrBlockTooBig = errors.New("block too big")
ErrKeyNotSpecified = errors.New("key not specified")
// Warp
ErrDisabledChainID = errors.New("cannot import from chain ID")
ErrMissingBlockContext = errors.New("cannot verify warp messages without block context")
ErrUnexpectedWarpMessage = errors.New("unexpected warp message")
ErrExpectedWarpMessage = errors.New("expected warp message")
ErrWarpMessageNotInitialized = errors.New("warp message not initialized")
ErrEmptyWarpPayload = errors.New("empty warp payload")
ErrTooManyWarpMessages = errors.New("too many warp messages")
ErrWarpResultMismatch = errors.New("warp result mismatch")
// Misc
ErrNotImplemented = errors.New("not implemented")
ErrBlockNotProcessed = errors.New("block is not processed")
)