文档

合约链错误码

更新时间:

本文将合约平台相关的错误码按出错来源分为以下五类:

说明

说明:本文所列的错误码均为合约链开发过程中可能会出现的错误。

平台校验错误码

错误码

错误码值

错误消息

描述

BAD_HASH

100

the hash is not correctly computed

哈希计算错误

TX_IS_NULL

101

the tx pointer is nullptr

交易指针为空指针

TX_PAYLOAD_INVALID

102

the data of tx does not satisfy type constraint

交易的 data 字段不满足类型约束

TX_INVALID_SIGNATURE

103

the signature is not valid, used in PreResetPubKey/ResetPubKey/ActivateNode tx

签名不可用

TX_INSUFFICIENT_BALANCE

104

the sender of tx doesn’t have enough money

交易的发送账户余额不足

TX_INVALID_TIMESTAMP

105

the timestamp of tx is not in valid period

交易的时间戳所在时间段无效,合约平台会对时间戳做检查,不在特定的时间范围内将被认为不可用

TX_INVALID_DEST_ACCOUNT

106

the dest account of tx doesn’t have valid contract hash

交易的目标账户不包含可用的合约哈希

TX_DEST_ACCOUNT_IS_NULL

107

the dest account of tx is empty

交易的目标账户为空

TX_CREATE_ACCOUNT_INVALID

108

the create account tx doesn’t satisfy requirement

创建账户的交易不满足需求

TX_DEPLOY_CONTRACT_INVALID

109

the deploy contract tx doesn’t satisfy requirement

部署合约的交易不满足需求

TX_TYPE_CONSTRAINT_INVALID

110

basic tx type requirement verify failed

基本的交易类型需求校验失败

TX_TYPE_UNKNOWN

111

the type of tx is unknown

交易类型未知

TX_RECOVER_TIME_INVALID

112

the recover time is invalid

恢复时间未知

TX_REPLAY_ATTACK

113

the tx is replayed

交易被重放

TX_PAYLOAD_TOO_BIG

114

the data of tx is too big, beyond system constraint

交易的 data 字段太大,超过系统限制

TX_GAS_TOO_BIG

115

the gas if tx is too big, beyond system constraint

交易消耗的 gas 太大,超过系统限制

TX_SOURCE_ACCOUNT_NOT_FOUND

116

the source account of tx doesn’t exists in blockchain

交易的提交账户在区块链上不存在,提交账户是交易数据结构中的 from 字段

TX_SOURCE_ACCOUNT_IS_NULL

117

the source account of tx is empty

交易的提交账户为空

TX_SOURCE_ACCOUNT_IS_FREEZE

118

the source account of tx is frozen

交易的提交账户被冻结

TX_SOURCE_ACCOUNT_IS_RECOVERING

119

the source account of tx is recovering

交易的提交账户正在恢复中

TX_DEST_ACCOUNT_NOT_FOUND

120

the dest account of tx doesn’t exit in blockchain

交易的目标账户在区块链上不存在,目标账户是交易数据结构中的 to 字段

TX_DEST_ACCOUNT_IS_FREEZE

121

the dest account of tx is frozen

交易的目标账户被冻结

TX_INVALID_PERMISSION

122

the weight of all signatures of tx is less than 100

多签名的所有签名权重之和小于 100,合约平台要求必须等于 100

TX_DEST_ACCOUNT_ALREADY_EXIST

123

the dest account of tx already exist

交易的目标账户已经存在

TX_INVALID_GROUP_ID

132

the group id of tx constraint is not satisfied

不满足交易的 group id 约束要求

TX_INVALID_VERSION

133

tx version constraint is not satisfied

不满足交易的版本约束要求

虚拟机错误码

错误码

错误码值

错误消息

描述

VM_GENERIC_FAILED

10000

vm general failure

虚拟机一般故障

VM_INVALID_INSTRUCTION

10001

for bad instruction

错误指令

VM_STACK_OVERFLOW

10002

vm stack over flow

虚拟机堆栈溢出

VM_STACK_UNDERFLOW

10003

vm stack under flow

虚拟机空栈取项出错

VM_MEMORY_ERROR

10004

vm memory error

虚拟机内存错误

VM_EMPTY_CODE

10005

the empty code error

代码为空

VM_CONFIG_OVER_GAS_LIMIT

10100

vm execute over the gas limit

虚拟机消耗超出限制

VM_CREATE_FAILED

10101

vm create failure

虚拟机创建失败

VM_PARAMETER_CODE_EMPTY_FAILED

10102

vm parameter code empty

虚拟机参数代码为空

VM_PARAMETER_INPUT_DATA_EMPTY_FAILED

10103

vm parameter input data empty

虚拟机参数输入数据为空

VM_OUT_OF_GAS

10200

out of gas

燃料不足

VM_REVERT

10201

caused by revert instruction

revert 指令触发的错误

VM_OUT_OF_LIMIT

10202

caused by touint64 method

touint64 方法触发的错误

VM_DISALLOWED_STATE_CHANGE

10203

caused by static_call module

static_call模块触发的错误

VM_GET_BALANCE_FAILED

10300

vm get balance fail

获取余额失败

VM_SET_STORAGE_FAILED

10301

vm set storage fail

虚拟机设置存储失败

VM_GET_STORAGE_FAILED

10302

vm get storage fail

虚拟机获取存储失败

VM_TRANSFER_BALANCE_FAILED

10303

vm transfer balance fail

虚拟机转账失败

VM_GET_CODE_FAILED

10304

vm get code fail

虚拟机获取代码失败

VM_GET_BLOCKHASH_FAILED

10305

vm get block hash fail

虚拟机获取块哈希失败

VM_GET_CODEHASH_FAILED

10306

vm get code fail

虚拟机获取代码哈希失败

VM_GET_GASLIMIT_FAILED

10307

vm get gas limit fail

虚拟机受燃料限制

VM_INTERNAL_ERROR

10500

vm internal error

虚拟内部错误

区块链错误码

错误码

错误码值

错误消息

描述

SERVICE_PLUGIN_NOT_EXISTS

400

plugin not exists

插件不存在

SERVICE_MSG_CONVERT_FAILED

401

msg convert failed

消息转换失败

SERVICE_RUN_LOCAL_TX_FAILED

402

execute local transaction failed

本地交易执行失败

SERVICE_PUSH_CACHE_FAILED

403

push transaction into cache queue failed

无法将交易推送至缓存队列

SERVICE_QUERY_NO_RESULT

404

no result when querypossible reasons: 1) transaction verify failed 2) transaction has not been executed in block 3) get last block failed 4) wrong parameters when query block or block header 5) wrong parameters when query account

查询无结果,可能的原因有: 1. 交易验证失败; 2. 交易尚未在区块中执行; 3. 无法获取最后一个块; 4. 查询块或块头时,参数出错 5. 查询账户时,参数出错

SERVICE_NOT_SUPPORT

405

service not supportpossible reasons: 1) incorrect service configure, complete configure is [transaction, query, event, admin] now 2) invalid message type

业务不支持,可能的原因有: 1. 业务配置有误,完整的配置应为 [transaction, query, event, admin]; 2. 消息类型无效

SERVICE_EVENT_NOT_EXISTS

406

event not existspossible reasons: 1) the event has not been registered 2) the event timeout in pull mode

事件不存在,可能的原因有: 1. 事件未注册; 2. 在拉取模式下,事件超时

SERVICE_LOG_INSTANCE_NOT_EXISTS

407

log instance not exists

日志实例不存在

SERVICE_TX_VERIFY_FAILED

408

transaction verify failed

交易验证失败

SERVICE_FORWARD_NO_NODEID

409

no node to forward request

无节点可转发请求

SERVICE_FORWARD_TIMEOUT

410

forward request timeout

请求转发超时

SERVICE_FORWARD_RESPONSE_ERROR

411

forward response error

响应转发超时

SERVICE_ADD_GROUP_CHAIN_FAILED

412

add group chain failed

添加群链失败

SERVICE_TX_WAITING_VERIFY

413

tx is pending to be verified

交易尚未验证

SERVICE_TX_WAITING_EXECUTE

414

tx is verified, waiting to be executed

交易已验证,等待执行

WS_NO_DATABASE_FAILED

1000

ws database is not Initialized

世界状态(WS)数据库未初始化

WS_NO_CODE_HASH_FAILED

1001

ws failed to find the code hash for the contract

世界状态中找不到合约的代码哈希

WS_NO_OBJECT_FAILED

1002

the state object is not found from the world state

世界状态中未找到该状态对象

WS_OBJECT_EXIST_FAILED

1003

the state object (id) is occupied

状态对象(ID)被占用

WS_OBJECT_DELETED_FAILED

1004

the given state object (id) has been deleted

指定的状态对象(ID)已删除

WS_NO_ENOUGH_BALANCE_FAILED

1005

the given state object doesn’t have enough balance

指定的状态对象余额不足

WS_TRANSFER_FAILED

1006

failed to transfer balance

转账失败

WS_AUTH_NO_PUB_KEY_FAILED

1007

the given public key doesn’t exist from auth map

指定的公钥不存在

WS_BALANCE_OVERFLOW_FAILED

1008

balance overflow

余额溢出

WS_UNKNOWN_FAILED

1009

unknown failure from

未知故障

WS_INVALID_AUTH_MAP_FAILED

1010

the given auth map is invalid

指定的权重值无效

CHAIN_TX_GAS_INVALID

2000

the transaction runner can’t get enough gas from the tx

交易执行无法从交易获取足够的燃料

CHAIN_TX_IDENTITY_INVALID

2001

the transaction runner can’t locate the identity from the chain

交易执行无法在区块链中定位到标识

CHAIN_TX_AUTH_MAP_INVALID

2002

the auth map in the payload is invalid

负载中的权重值无效

CHAIN_TX_PAYLOAD_INVALID

2003

the payload of transaction is invalid

交易负载无效

CHAIN_TX_RECOVER_INVALID

2004

invalid recover time

恢复时间无效

CHAIN_TX_INSIDE_ERROR

2005

unknown error from transaction runner

交易执行出现未知错误

客户端系统错误码

错误码

错误码值

错误消息

描述

SDK_INTERNAL_ERROR

20000

sdk interval error

SDK 内部错误

SDK_ADDRESS_FAMILY_NOT_SUPPORTED

20001

ipc/network argument errors: address family not supported by protocol family

IPC/网络参数错误:协议族不支持的地址族

SDK_ADDRESS_IN_USE

20002

ipc/network argument errors: address already in use

IPC/网络参数错误:该地址已被使用

SDK_ADDRESS_NOT_AVAILABLE

20003

ipc/network argument errors: can’t assign requested address

IPC/网络参数错误:无法分配请求的地址

SDK_ALREADY_CONNECTED

20004

ipc/network operational errors: socket is already connected

IPC/网络运行出错:套接口已连接

SDK_ARGUMENT_LIST_TOO_LONG

20005

argument list too long

参数列表太长

SDK_ARGUMENT_OUT_OF_DOMAIN

20006

math: numerical argument out of domain

数值参数不在域内

SDK_BAD_ADDRESS

20007

bad address

地址不详

SDK_BAD_FILE_DESCRIPTOR

20008

bad file descriptor

文件描述符不详

SDK_BAD_MESSAGE

20009

program loading errors: bad message

程序加载错误:消息不详

SDK_BROKEN_PIPE

20010

broken pipe

管道破损

SDK_CONNECTION_ABORTED

20011

ipc/network operational errors: software caused connection abort

IPC/网络运行出错:软件问题导致连接中断

SDK_CONNECTION_ALREADY_IN_PROGRESS

20012

non-blocking and interrupt i/o: operation already in progress

非阻塞和中断 I/O:操作进行中

SDK_CONNECTION_REFUSED

20013

ipc/network operational errors: connection refused

IPC/网络运行出错:连接被拒绝

SDK_CONNECTION_RESET

20014

connection reset by peer

连接被对方重设

SDK_CROSS_DEVICE_LINK

20015

cross-device link

跨设备链接

SDK_DESTINATION_ADDRESS_REQUIRED

20016

ipc/network argument errors: destination address required

IPC/网络参数错误:目标地址不得为空

SDK_DEVICE_OR_RESOURCE_BUSY

20017

device / Resource busy

设备或资源忙

SDK_DIRECTORY_NOT_EMPTY

20018

should be rearranged: directory not empty

目录不为空,需重新安排

SDK_EXECUTABLE_FORMAT_ERROR

20019

exec format error

执行格式错误

SDK_FILE_EXISTS

20020

file exists

文件已存在

SDK_FILE_TOO_LARGE

20021

file too large

文件太大

SDK_FILENAME_TOO_LONG

20022

ipc/network operational errors: file name too long

IPC/网络运行出错:文件名太长

SDK_FUNCTION_NOT_SUPPORTED

20023

network file system: function not implemented

网络文件系统:功能未实现

SDK_HOST_UNREACHABLE

20024

should be rearranged: no route to host

无主机路由,需重新安排

SDK_IDENTIFIER_REMOVED

20025

program loading errors: identifier removed

程序加载错误:标识已被删除

SDK_ILLEGAL_BYTE_SEQUENCE

20026

program loading errors: illegal byte sequence

程序加载错误:非法字节序列

SDK_INAPPROPRIATE_IO_CONTROL_OPERATION

20027

inappropriate ioctl for device

ioctl 不适合设备

SDK_INTERRUPTED

20028

interrupted system call

系统调用中断

SDK_INVALID_ARGUMENT

20029

invalid argument

参数无效

SDK_INVALID_SEEK

20030

illegal seek

非法寻求

SDK_IO_ERROR

20031

input/output error

输入/输出错误

SDK_IS_A_DIRECTORY

20032

is a directory

此为目录

SDK_MESSAGE_SIZE

20033

ipc/network argument errors: message too long

IPC/网络参数错误:消息太长

SDK_NETWORK_DOWN

20034

ipc/network operational errors: network is down

IPC/网络运行出错:网络故障

SDK_NETWORK_RESET

20035

ipc/network operational errors: network dropped connection on reset

IPC/网络运行出错:重置时网络断开连接

SDK_NETWORK_UNREACHABLE

20036

ipc/network operational errors: network is unreachable

IPC/网络运行出错:网络无法访问

SDK_NO_BUFFER_SPACE

20037

ipc/network operational errors: no buffer space available

IPC/网络运行出错:无缓冲空间

SDK_NO_CHILD_PROCESS

20038

no child processes

无子程序

SDK_NO_LINK

20039

program loading errors: reserved

程序加载错误:已保留

SDK_NO_LOCK_AVAILABLE

20040

network file system: no locks available

网络文件系统,无锁可用

SDK_NO_MESSAGE_AVAILABLE

20041

program loading errors: no message available on stream

程序加载错误:消息流上无消息

SDK_NO_MESSAGE

20042

program loading errors: no message of desired type

程序加载错误:无预期类型的消息

SDK_NO_PROTOCOL_OPTION

20043

ipc/network argument errors: protocol not available

IPC/网络参数错误:协议不可用

SDK_NO_SPACE_ON_DEVICE

20044

no space left on device

设备空间不足

SDK_NO_STREAM_RESOURCES

20045

program loading errors: no stream resources

程序加载错误:无流资源

SDK_NO_SUCH_DEVICE_OR_ADDRESS

20046

device not configured

设备未配置

SDK_NO_SUCH_DEVICE

20047

operation not supported by device

设备不支持该操作

SDK_NO_SUCH_FILE_OR_DIRECTORY

20048

no such file or directory

该文件或目录不存在

SDK_NO_SUCH_PROCESS

20049

no such process

该程序不存在

SDK_NOT_A_DIRECTORY

20050

not a directory

非目录

SDK_NOT_A_SOCKET

20051

ipc/network argument errors: socket operation on non-socket

IPC/网络参数错误:未在套接口上执行套接口操作

SDK_NOT_A_STREAM

20052

program loading errors: not a stream

程序加载错误:非流

SDK_NOT_CONNECTED

20053

ipc/network operational errors: socket is not connected

IPC/网络运行出错:套接口未连接

SDK_NOT_ENOUGH_MEMORY

20054

cannot allocate memory

无法分配内存

SDK_NOT_SUPPORTED

20055

ipc/network argument errors: operation not supported

IPC/网络参数错误:不支持该操作

SDK_OPERATION_CANCELED

20056

program loading errors: operation canceled

程序加载错误:操作已取消

SDK_OPERATION_IN_PROGRESS

20057

non-blocking and interrupt i/o: operation now in progress

非阻塞和中断 I/O:操作进行中

SDK_OPERATION_NOT_PERMITTED

20058

operation not permitted

操作不允许

SDK_OPERATION_NOT_SUPPORTED

20059

this value is only discrete when compiling __DARWIN_UNIX03, or KERNE: operation not supported on socket

仅当编译 __DARWIN_UNIX03 时该值为离散值,或 KERNE:套接口不支持该操作

SDK_OPERATION_WOULD_BLOCK

20060

non-blocking and interrupt i/o: operation would block

非阻塞和中断 I/O:操作将阻塞

SDK_OWNER_DEAD

20061

program loading errors: previous owner died

程序加载错误:之前的 Owner 已去世

SDK_PERMISSION_DENIED

20062

permission denied

权限不足

SDK_PROTOCOL_ERROR

20063

program loading errors: protocol error

程序加载错误:协议错误

SDK_PROTOCOL_NOT_SUPPORTED

20064

ipc/network argument errors: protocol not supported

IPC/网络参数错误:不支持该协议

SDK_READ_ONLY_FILE_SYSTEM

20065

read-only file system

只读文件系统

SDK_RESOURCE_DEADLOCK_WOULD_OCCUR

20066

resource deadlock avoided

避免资源死锁

SDK_RESOURCE_UNAVAILABLE_TRY_AGAIN

20067

non-blocking and interrupt i/o: resource temporarily unavailable

非阻塞和中断 I/O:资源暂时不可用

SDK_RESULT_OUT_OF_RANGE

20068

math: result too large

结果太大

SDK_STATE_NOT_RECOVERABLE

20069

program loading errors: state not recoverable

程序加载错误:状态不可恢复

SDK_STREAM_TIMEOUT

20070

program loading errors: stream ioctl timeout

程序加载错误:流 ioctl 超时

SDK_TEXT_FILE_BUSY

20071

text file busy

文本文件忙

SDK_TIMED_OUT

20072

ipc/network operational errors: operation timed out

IPC/网络运行出错:运行超时

SDK_TOO_MANY_FILES_OPEN_IN_SYSTEM

20073

too many open files in system

系统打开的文件太多

SDK_TOO_MANY_FILES_OPEN

20074

too many open files

打开的文件太多

SDK_TOO_MANY_LINKS

20075

too many links

太多链接

SDK_TOO_MANY_SYMBOLIC_LINK_LEVELS

20076

ipc/network operational errors: too many levels of symbolic links

IPC/网络运行出错:符号链接级别太多

SDK_VALUE_TOO_LARGE

20077

intelligent device errors: value too large to be stored in data type

智能设备错误:值太大导致无法存储在数据类型中

SDK_WRONG_PROTOCOL_TYPE

20078

ipc/network argument errors: protocol wrong type for socket

IPC/网络参数错误:套接口协议类型错误

SDK_INVALID_PARAMETER

30000

sdk parameter is invalid

SDK 参数无效

SDK_INVALID_PRIVATE_KEY

30001

sdk invalid private key

SDK 私钥无效

SDK_SIGN_TOOL_VERIFY_ERROR

30002

sdk sign tool verify error

SDK 签名工具验证出错

SDK_UNSUPPORT_ENCODING_FAILED

30003

sdk unsupport encoding error

SDK 不支持编码

SDK_GET_FILE_INPUT_STREAM_FAILED

30004

sdk get file input stream failed

SDK 获取文件输入流失败

SDK_FIND_THREAD_FAILED

30005

sdk find thread failed

SDK 查找线程失败

SDK_BYTES_OPERATE_FAILED

30006

sdk bytes operate failed

SDK 字节操作失败

SDK_CONVERT_PUBLIC_KEY_FAILED

30007

sdk convert public key failed

SDK 转换公钥失败

SDK_MESSAGE_ENCODING_FAILED

30008

sdk message encoding failed

SDK 消息编码失败

SDK_READ_CONFIG_FAILED

30009

sdk read client config failed

SDK 读取客户端配置失败

SDK_INIT_FAILED

30010

sdk init failed

SDK 初始化失败

SDK_CONNECT_NETWORK_FAILED

30011

sdk connect to network failed

SDK 连接网络失败

SDK_DECODE_ERROR

30012

sdk decode error

SDK 解码出错

SDK_UNSUPPORT_MESSAGE_TYPE_ERROR

30013

sdk unsupport message type error

SDK 不支持该消息类型

SDK_HAND_SHAKE_ERROR

30014

did not handshake

未做握手

SDK_INIT_SSL_CONTEXT_FAILED

30015

init ssl context failed

初始化 SSL 上下文失败

Solidity 合约 JSON/XML 解析错误码

错误码

错误码值

错误消息

描述

PROPERTY_ARGS_FORMAT

10900

the format of arguments is wrong

参数格式错误。

PROPERTY_PATH_NOT_EXIST

10901

the target path does not exist

JSON/XML 的目标路径不存在。

PROPERTY_HANDLER_NOT_EXIST

10902

the handler parameter does not exist, please check whether property_parse succeed

传入的 handler 参数不存在,检查 property_parse 是否执行成功。

PROPERTY_NODE_TYPE_NOT_MATCH

10903

the target data type does not match the function which is using now

数据类型不匹配,当前使用的方法不能获取目标类型的数据。

REST服务错误码

错误码

错误码值

错误消息

描述

ACCESS_TOKEN_INVALID

202

invalid access token

misuse access token

access token timeout

access token无效/错误/超时

  • 本页导读 (0)
文档反馈