EOS 错误码整理

EOS 目前大约有180种错误类型,虽然有错误码,但是还是很笼统的,具体的报错信息还得看detail里面的内容
一、常见的错误码以及issue上对应的错误记录

3010001 Invalid name
账户名格式1-12位(a-z,1-5,“.” ) 且”.”不能在首尾
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3010001

3010004 Invalid authority
检查 authorization”: [{
“actor”: “accountname1”,
“permission”: “active”
}] 参数是否填写正确
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3010004

3010008 Invalid block ID
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3010008

3010010 Invalid packed transaction
一般报这个错误就是打包交易的参数传的不正确
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3010010

3010011 Invalid asset
检查资产格式是否正确
如”stake_net_quantity”:”0.0001 EOS” 1.确保正确的精度 空格加Symbol
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3010011

3030000 Block exception
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3030000

3030001 Unlinkable block
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3030001

3030002 Transaction outputs in block do not match transaction outputs from applying block
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3030002

3030003 Block does not guarantee concurrent execution without conflicts
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3030003

3030008 Block is not signed with expected key
检查是否对块信息签名
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3030008

3040000 Transaction exception
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3040000

3040002 Transaction should have at least one normal action
查看action是否添加,是否正确
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3040002

3040005 Expired Transaction
交易过期,过期时间可以设置长一点
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3040005

3040006 Transaction Expiration Too Far
过期时间设置太长

3040007 Invalid Reference Block
引用块无效或不匹配,节点间不同有关
https://github.com/EOSIO/eos/issues/4659

3050000 Action validate exception
检查Action是否正确
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3050000

3050001 Account name already exists
账户名已存在

3050002 Invalid Action Arguments
检查Action参数
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3050002

3050003 eosio_assert_message assertion failure
账户不存在,资产金额不正确等

3060003 Contract Table Query Exception
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3060003

3060004 Contract Query Exception
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3060004

3070002 Runtime Error Processing WASM
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3070002

3080001 Account using more than allotted RAM usage
内存不足,买些内存

3080002 Transaction exceeded the current network usage limit imposed on the transaction
网络资源不足,抵押一些资源

3080004 Transaction exceeded the current CPU usage limit imposed on the transaction
CPU不足,抵押一些CPU

3080006 Transaction took too long
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3080006+

3081001 Transaction reached the deadline set due to leeway on account CPU limits
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3081001

3090003 Provided keys, permissions, and delays do not satisfy declared authorizations
检查权限,签名等是否正确
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3090003

3090004 Missing required authority
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3090004

3110001 Missing Chain API Plugin
https://github.com/EOSIO/eos/issues?utf8=%E2%9C%93&q=3110001

二、EOS 错误码大全

3000000 blockchain exception
3010001 Invalid name
3010002 Invalid public key
3010003 Invalid private key
3010004 Invalid authority
3010005 Invalid action
3010006 Invalid transaction
3010007 Invalid ABI
3010008 Invalid block ID
3010009 Invalid transaction ID
3010010 Invalid packed transaction
3010011 Invalid asset
3010012 Invalid chain ID
3010013 Invalid fixed key
3010014 Invalid symbol
3020000 Fork database exception
3020001 Block can not be found
3030000 Block exception
3030001 Unlinkable block
3030002 Transaction outputs in block do not match transaction outputs from applying block 交易不匹配
3030003 Block does not guarantee concurrent execution without conflicts
3030004 Shard locks in block are incorrect or mal-formed
3030005 Block exhausted allowed resources
3030006 Block is too old to push
3030007 Block is from the future
3030008 Block is not signed with expected key
3030009 Block is not signed by expected producer
3040000 Transaction exception
3040001 Error decompressing transaction
3040002 Transaction should have at least one normal action
3040003 Transaction should have at least one required authority
3040004 Context-free action should have no required authority
3040005 Expired Transaction
3040006 Transaction Expiration Too Far
3040007 Invalid Reference Block
3040008 Duplicate transaction
3040009 Duplicate deferred transaction
3040010 Context free action is not allowed inside generated Transaction
3040011 The transaction can not be found
3040012 Pushing too many transactions at once
3040013 Transaction is too big
3040014 Unknown transaction compression
3050000 Action validate exception
3050001 Account name already exists
3050002 Invalid Action Arguments
3050003 eosio_assert_message assertion failure
3050004 eosio_assert_code assertion failure
3050005 Action can not be found
3050006 Mismatch between action data and its struct
3050007 Attempt to use unaccessible API
3050008 Abort Called
3050009 Inline Action exceeds maximum size limit
3060000 Database exception
3060001 Permission Query Exception
3060002 Account Query Exception
3060003 Contract Table Query Exception
3060004 Contract Query Exception
3060100 Database exception
3060101 Database usage is at unsafe levels
3060102 Reversible block log usage is at unsafe levels
3070000 WASM Exception
3070001 Error in WASM page memory
3070002 Runtime Error Processing WASM
3070003 Serialization Error Processing WASM
3070004 memcpy with overlapping memory
3070005 binaryen exception
3080000 Resource exhausted exception
3080001 Account using more than allotted RAM usage
3080002 Transaction exceeded the current network usage limit imposed on the transaction
3080003 Transaction network usage is too much for the remaining allowable usage of the current block
3080004 Transaction exceeded the current CPU usage limit imposed on the transaction
3080005 Transaction CPU usage is too much for the remaining allowable usage of the current block
3080006 Transaction took too long
3080007 Transaction exceeded the current greylisted account network usage limit
3081001 Transaction reached the deadline set due to leeway on account CPU limits
3090000 Authorization exception
3090001 Duplicate signature included
3090002 Irrelevant signature included
3090003 Provided keys, permissions, and delays do not satisfy declared authorizations
3090004 Missing required authority
3090005 Irrelevant authority included
3090006 Insufficient delay
3090007 Invalid Permission
3090008 The action is not allowed to be linked with minimum permission
3090009 The parent permission is invalid
3100000 Miscellaneous exception
3100001 Internal state is no longer consistent
3100002 Unknown bloc
3100003 Unknown transaction
3100004 Corrupted reversible block database was fixed
3100005 Extracted genesis state from blocks.log
3100006 Subjective exception thrown during block production
3100007 Multiple voter info detected
3100008 Feature is currently unsupported
3100009 Node management operation successfully executed
3110000 Plugin exception
3110001 Missing Chain API Plugin
3110002 Missing Wallet API Plugin
3110003 Missing History API Plugin
3110004 Missing Net API Plugin
3110005 Missing Chain Plugin
3110006 Incorrect plugin configuration
3120000 Wallet exception
3120001 Wallet already exists
3120002 Nonexistent wallet
3120003 Locked wallet
3120004 Missing public key
3120005 Invalid wallet password
3120006 No available wallet
3120007 Already unlocked
3120008 Key already exists
3120009 Nonexistent key
3120010 Unsupported key type
3120011 Wallet lock timeout is invalid
3120012 Secure Enclave Exception
3130000 Actor or contract whitelist/blacklist exception
3130001 Authorizing actor of transaction is not on the whitelist
3130002 Authorizing actor of transaction is on the blacklist
3130003 Contract to execute is not on the whitelist
3130004 Contract to execute is on the blacklist
3130005 Action to execute is on the blacklist
3130006 Public key in authority is on the blacklist
3140000 Exceptions that are allowed to bubble out of emit calls in controller
3140001 Block does not match checkpoint
3150000 ABI exception
3150001 No ABI found
3150002 Invalid Ricardian Clause
3150003 Invalid Ricardian Action
3150004 The type defined in the ABI is invalid
3150005 Duplicate type definition in the ABI
3150006 Duplicate struct definition in the ABI
3150007 Duplicate action definition in the ABI
3150008 uplicate table definition in the ABI
3150009 Duplicate error message definition in the ABI
3150010 ABI serialization time has exceeded the deadline
3150011 ABI recursive definition has exceeded the max recursion depth
3150012 Circular definition is detected in the ABI
3150013 Unpack data exception
3150014 Pack data exception
3160000 Contract exception
3160001 The payer of the table data is invalid
3160002 Table access violation
3160003 Invalid table iterator
3160004 Table can not be found inside the cache
3160005 The table operation is not allowed
3160006 Invalid contract vm type
3160007 Invalid contract vm version
3160008 Contract is already running this version of code
3160009 No wast file found
3160010 No abi file found
3170000 Producer exception
3170001 Producer private key is not available
3170002 Pending block state is missing
3170003 Producer is double confirming known rang
3170004 Producer schedule exception
3170006 The producer is not part of current schedule
3180000 Reversible Blocks exception
3180001 Invalid reversible blocks directory
3180002 Backup directory for reversible blocks already existg
3180003 Gap in the reversible blocks database
3190000 Block log exception
3190001 unsupported version of block log
3190002 fail to append block to the block log
3190003 block log can not be found
3190004 block log backup dir already exists
3200000 http exception
3200001 invalid http client root certificate
3200002 invalid http response
3200003 service resolved to multiple ports
3200004 fail to resolve host
3200005 http request fail
3200006 invalid http request
3210000 Resource limit exception
3220000 Mongo DB exception
3220001 Fail to insert new data to Mongo DB
3220002 Fail to update existing data in Mongo DB
3230000 Contract API exception
3230001 Crypto API Exception
3230002 Database API Exception
3230003 Arithmetic Exception

EOS合约权限(一)- FOMO3D和其山寨的EOS版本

fomo3d

FOMO3D这游戏超魔性,虽然它是以太坊的。

既然我们是EOS博客,先说说 F3D 和 EOS 可能的关联。

Fomo3D的好处很明显:可以帮助锁仓、增加用户数、拉升链上交易活跃度。尤其是EOS有这么多中国玩家,配合国人搏一把心态,加上EOS网络速度,很难不爆发。
而且已经有人做了一个受F3D启发的EOS DAPP出来了,虽然玩法上还不够精致 https://eosbutton.io/

不过EOS合约有个毛病,可以随时改,不像eth合约无法被人控制,就算上了EOS智能合约还是可以卷款跑路。

(2018/07/27 更新:上面的说法不准确,社群里面也收到不少反馈,准确来说EOS的权限设置很灵活,合约可以修改也可以不能修改,如果把合约账户的owner和active设为空,或者没人知道私钥的密钥,或者由超级节点多签的账户,则可以理解为合约将无法修改。另外一点就是升级合约只能改动代码逻辑部分,合约中数据是不能改的,如果要改还需要专门写Action,这是一个很大的话题。)

官网
http://exitscam.me/

官方教程 – 英文
https://fomo3d.hostedwiki.co/

ETH 合约地址
https://etherscan.io/address/0xa62142888aba8370742be823c1782d17a0389da1#code

团队自己直接开发了一个去中心交易所,可以随时买卖P3D:
https://exchange.powh.io/purchase-tokens

中文攻略
https://bihu.com/article/972045
https://bihu.com/article/988957
https://bihu.com/article/1005669

用麦子钱包APP玩FOMO3D说明
https://mp.weixin.qq.com/s/vbWvwLmZZxVFTMc1y2u12w
http://mathwallet.org/

彩蛋:
https://mp.weixin.qq.com/s?__biz=MzU1OTQ3MTI3Ng==&mid=2247484008&idx=1&sn=017ae144c895b80fe0cc7aec641c839d
https://mp.weixin.qq.com/s/FrwzjoP-8vUytEyXlpANpQ
https://mp.weixin.qq.com/s?__biz=MzU0ODg3Mjk2Mw==&mid=2247483809&idx=1&sn=6259ecc668d3e37d398b1371ad00075e

名词解释:
Exitscam – 逃离骗局
Bad advice – 坏的建议
Fomo3D – FOMO – Fear of missing out 害怕踏空
Key – 打开大奖的钥匙
P3D – PoWH3D – Proof of Weak Hands 缺乏投资信念、心理素质极差、特别怂的那类投资者

2018/07/27 更新:

事件后续,果然有个团队做了一个叫做狼人的EOS版本出来(网址:https://eosfo.io/),然后出了本文刚开始说到问题,目前正在由EMAC仲裁,EOS作为一条治理型区块链,真是一个很有趣的社会实验
该狼人EOS游戏被黑事件经过:
https://bihu.com/article/1007040

先写第一篇,介绍大概背景,感觉这个可以写一个系列。

EOS内存投机和资源模型

在美国呆了一周,回来发现整个群风向都变了,RAM投机这事真是毒害不浅

从技术角度,个人觉得有三个方向其实可以研究:

1 BM设计的跨链通讯的理论基础–Merkle证明已经得到证实。BM在Dawn3.0和Dawn4.0之间大幅修改了原先的跨链设计,这里面有很多机会可以研究
https://steemit.com/eos/@dan/inter-blockchain-communication-via-merkle-proofs-with-eos-io

2 Evolution团队这两天也对内存资源模型提出了自己的设计,Evolution会做一条和主网并行但交叉的主网,对主网进行扩容
https://hackernoon.com/solving-ram-speculation-property-rights-in-eos-631ca10c1970

3 EOS原力团队,作为国内的EOS团队,重写了EOS资源模型,使用了与ETH类似的手续费模式,其尝试和探索个人觉得是值得鼓励的。
https://www.eosforce.io/?lang=Cn

EOS MongoDB支持

好消息!EOSIO开始有分支重新支持MongoDB了,兼容现有主网。链接:https://github.com/EOSIO/eos/pull/4304
操作步骤如下:
        git clone -b release/1.1 https://github.com/EOSIO/eos.git
        cd eos
        git fetch –all –tags –prune
        git merge -m “merge” –commit origin/gh#3030-enable-mongodb
        git submodule update –init –recursive
        ./eosio_build.sh
        cd build/
        make install
修改config.ini配置文件,添加如下两行:
        plugin = eosio::mongo_db_plugin
        mongodb-uri = mongodb://localhost:27017/eosmain
其中,eosmain是要写入的MongoDB数据库名。
好了,万事俱备,开始启动
进入~/opt/mongodb/bin目录,启动MongoDB服务。
        cd ~/opt/mongodb/bin
        ./mongod
这时MongoDB服务会默认监听27017端口,如下图所示。
        新开一个小窗,重启nodeos,需要加上–replay-blockchain,以使历史交易数据同步到MongoDB。
        如果没有意外的话,此时MongoDB应该开始写入相关记录了。
        执行mongo程序进入MongoDB控制台,查询相应数据库和记录,如下图。
        本文完。