EOS本地安装
最近对去中心化交易感兴趣,于是想摆弄一下EOS。进入它的官网(https://eos.io/),看到现在已经发布到DAWN3.0了,于是去github下载安装最新版(https://github.com/EOSIO/eos),想自己安装一个本地环境。
按照它的说明一步步设置,我安装环境是Ubuntu16.04,下面执行都没有问题
git clone https://github.com/eosio/eos --recursive
cd eos
./eosio_build.sh
等了几分钟,显示编译成功,可以运行了
按照单节点测试运行 Creating and launching a single-node testnet
进入到 eos/build/programs/eosiod 目录
先运行 eosiod 然后ctrl+c 终止,发现没有说明书上的data-dir目录生成,然后一通找,终于在
eos/build/etc/eosio/node_00目录发现了config.ini
下一步把整段内容添加到config.ini的后面
//# Load the testnet genesis state, which creates some initial block producers with the default key
genesis-json = /path/to/eos/source/genesis.json
// # Enable production on a stale chain, since a single-node test chain is pretty much always stale
enable-stale-production = true
//# Enable block production with the testnet producers
producer-name = inita
producer-name = initb
producer-name = initc
producer-name = initd
producer-name = inite
producer-name = initf
producer-name = initg
producer-name = inith
producer-name = initi
producer-name = initj
producer-name = initk
producer-name = initl
producer-name = initm
producer-name = initn
producer-name = inito
producer-name = initp
producer-name = initq
producer-name = initr
producer-name = inits
producer-name = initt
producer-name = initu
//# Load the block producer plugin, so you can produce blocks
plugin = eosio::producer_plugin
//# Wallet plugin
plugin = eosio::wallet_api_plugin
//# As well as API and HTTP plugins
plugin = eosio::chain_api_plugin
plugin = eosio::http_plugin
再次运行eosiod
报告一堆错误信息,反复检查和搜索之后,终于找到原因
enable-stale-production 项目有两条设置,注释掉=false那一条
再运行eosiod
这次报告genesis-json文件找不到,看看上面的内容
genesis-json = /path/to/eos/source/genesis.json
确实不对,把它改为
genesis-json = /home/ls/eos/genesis.json
终于看到了
------ NEW CHAIN ------
Welcome to EOSIO!
但是,稳定下来后一直输出
556500ms thread-0 producer_plugin.cpp:229 block_production_loo ] Not producing block because it isn't my turn, its eosio
557000ms thread-0 producer_plugin.cpp:229 block_production_loo ] Not producing block because it isn't my turn, its eosio
557500ms thread-0 producer_plugin.cpp:229 block_production_loo ] Not producing block because it isn't my turn, its eosio
558000ms thread-0 producer_plugin.cpp:229 block_production_loo ] Not producing block because it isn't my turn, its eosio
显然不能生成区块链,没有看到说明书中的generated block类似的信息
这次查了很久,问题依然,最后从错误信息中分析,难道是需要一个eosio用户?
于是试试看增加了一行配置 producer-name = eosio
这次输出:
eosio generated block 736a4611... #1 @ 2018-03-21T03:30:52.000 with 0 trxs
eosio generated block 639d8722... #2 @ 2018-03-21T03:30:52.500 with 0 trxs
eosio generated block 0d3183f4... #3 @ 2018-03-21T03:30:53.000 with 0 trxs
eosio generated block 4fbd44da... #4 @ 2018-03-21T03:30:53.500 with 0 trxs
ohyeah!成功了。
Congratulations @eoline, you have decided to take the next big step with your first post! The Steem Network Team wishes you a great time among this awesome community.
The proven road to boost your personal success in this amazing Steem Network
Do you already know that awesome content will get great profits by following these simple steps that have been worked out by experts?
谢谢,我也遇到了这个问题,官方给的文档和最新的master分支对不上,坑死了
这两天又更新了,eosiod换成nodeos、eosioc换成cleos了
Congratulations @eoline! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Congratulations @eoline! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!