@@ -26,33 +26,41 @@ type Receipt struct {
26
26
}
27
27
28
28
const (
29
- Success = iota
30
- Unknown
31
- BadRLP
32
- InvalidFormat
33
- OutOfGasIntrinsic
34
- InvalidSignature
35
- InvalidNonce
36
- NotEnoughCash
37
- OutOfGasBase
38
- BlockGasLimitReached
39
- BadInstruction
40
- BadJumpDestination
41
- OutOfGas
42
- OutOfStack
43
- StackUnderflow
44
- NonceCheckFail
45
- BlockLimitCheckFail
46
- FilterCheckFail
47
- NoDeployPermission
48
- NoCallPermission
49
- NoTxPermission
50
- PrecompiledError
51
- RevertInstruction
52
- InvalidZeroSignatureFormat
53
- AddressAlreadyUsed
54
- PermissionDenied
55
- CallAddressError
29
+ Success = iota
30
+ Unknown = 1
31
+ OutOfGasLimit = 2 ///< Too little gas to pay for the base transaction cost.
32
+ NotEnoughCash = 7
33
+ BadInstruction = 10
34
+ BadJumpDestination = 11
35
+ OutOfGas = 12 ///< Ran out of gas executing code of the transaction.
36
+ OutOfStack = 13 ///< Ran out of stack executing code of the transaction.
37
+ StackUnderflow = 14
38
+ PrecompiledError = 15
39
+ RevertInstruction = 16
40
+ ContractAddressAlreadyUsed = 17
41
+ PermissionDenied = 18
42
+ CallAddressError = 19
43
+ GasOverflow = 20
44
+ ContractFrozen = 21
45
+ AccountFrozen = 22
46
+ AccountAbolished = 23
47
+ ContractAbolished = 24
48
+ WASMValidationFailure = 32
49
+ WASMArgumentOutOfRange = 33
50
+ WASMUnreachableInstruction = 34
51
+ WASMTrap = 35
52
+ NonceCheckFail = 10000 /// txPool related errors
53
+ BlockLimitCheckFail = 10001
54
+ TxPoolIsFull = 10002
55
+ Malformed = 10003
56
+ AlreadyInTxPool = 10004
57
+ TxAlreadyInChain = 10005
58
+ InvalidChainId = 10006
59
+ InvalidGroupId = 10007
60
+ InvalidSignature = 10008
61
+ RequestNotBelongToTheGroup = 10009
62
+ TransactionPoolTimeout = 10010
63
+ AlreadyInTxPoolAndAccept = 10011
56
64
)
57
65
58
66
// GetStatusMessage returns the status message
@@ -63,22 +71,8 @@ func getStatusMessage(status int) string {
63
71
message = "success"
64
72
case Unknown :
65
73
message = "unknown"
66
- case BadRLP :
67
- message = "bad RLP"
68
- case InvalidFormat :
69
- message = "invalid format"
70
- case OutOfGasIntrinsic :
71
- message = "out of gas intrinsic"
72
- case InvalidSignature :
73
- message = "invalid signature"
74
- case InvalidNonce :
75
- message = "invalid nonce"
76
74
case NotEnoughCash :
77
75
message = "not enough cash"
78
- case OutOfGasBase :
79
- message = "out of gas base"
80
- case BlockGasLimitReached :
81
- message = "block gas limit reached"
82
76
case BadInstruction :
83
77
message = "bad instruction"
84
78
case BadJumpDestination :
@@ -89,30 +83,58 @@ func getStatusMessage(status int) string {
89
83
message = "out of stack"
90
84
case StackUnderflow :
91
85
message = "stack underflow"
92
- case NonceCheckFail :
93
- message = "nonce check fail"
94
- case BlockLimitCheckFail :
95
- message = "block limit check fail"
96
- case FilterCheckFail :
97
- message = "filter check fail"
98
- case NoDeployPermission :
99
- message = "no deploy permission"
100
- case NoCallPermission :
101
- message = "no call permission"
102
- case NoTxPermission :
103
- message = "no tx permission"
104
86
case PrecompiledError :
105
87
message = "precompiled error"
106
88
case RevertInstruction :
107
89
message = "revert instruction"
108
- case InvalidZeroSignatureFormat :
109
- message = "invalid zero signature format"
110
- case AddressAlreadyUsed :
111
- message = "address already used"
90
+ case ContractAddressAlreadyUsed :
91
+ message = "contract address already used"
112
92
case PermissionDenied :
113
93
message = "permission denied"
114
94
case CallAddressError :
115
95
message = "call address error"
96
+ case GasOverflow :
97
+ message = "gas overflow"
98
+ case ContractFrozen :
99
+ message = "contract frozen"
100
+ case AccountFrozen :
101
+ message = "account frozen"
102
+ case AccountAbolished :
103
+ message = "account abolished"
104
+ case ContractAbolished :
105
+ message = "contract abolished"
106
+ case WASMValidationFailure :
107
+ message = "WASM validation failure"
108
+ case WASMArgumentOutOfRange :
109
+ message = "WASM argument out of range"
110
+ case WASMUnreachableInstruction :
111
+ message = "WASM unreachable instruction"
112
+ case WASMTrap :
113
+ message = "WASM trap"
114
+ case NonceCheckFail :
115
+ message = "nonce check fail"
116
+ case BlockLimitCheckFail :
117
+ message = "block limit check fail"
118
+ case TxPoolIsFull :
119
+ message = "tx pool is full"
120
+ case Malformed :
121
+ message = "malformed"
122
+ case AlreadyInTxPool :
123
+ message = "already in tx pool"
124
+ case TxAlreadyInChain :
125
+ message = "tx already in chain"
126
+ case InvalidChainId :
127
+ message = "invalid chain id"
128
+ case InvalidGroupId :
129
+ message = "invalid group id"
130
+ case InvalidSignature :
131
+ message = "invalid signature"
132
+ case RequestNotBelongToTheGroup :
133
+ message = "request not belong to the group"
134
+ case TransactionPoolTimeout :
135
+ message = "transaction pool timeout"
136
+ case AlreadyInTxPoolAndAccept :
137
+ message = "already in tx pool and accept"
116
138
default :
117
139
message = strconv .Itoa (status )
118
140
}
0 commit comments