区块链中文技术社区

部署EOS Mainnet 主网络,并接入eosfans测试网络,成为BP

开始准备EOS项目

git clone https://github.com/EOS-Mainnet/eos.git
git checkout --no-track -b Branch_v1.1.0 Mainnet-1.1.0 --
./eosio_build.sh
sudo make install
ln -s /usr/local/eosio/bin/nodeos /usr/local/bin/nodeos
ln -s /usr/local/eosio/bin/cleos /usr/local/bin/cleos

开始配置,接入eosfans测试网络

先运行下nodeos,将会自动创建~/.local/share/eosio/nodeos/config目录和config.ini文件。
修改config.ini中如下内容

//添加
p2p-peer-address = p2p.party.eostea.io:56234
//修改 可忽略
agent-name = "EOS Test Agent"
//如果需要外部eosjs调用的话,修改
access-control-allow-origin = *
//如果需要查看get actions,取消前面注释
filter-on = *
//如果需要返回错误信息,修改
verbose-http-errors = true
//添加插件支持
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
如果需要生产区块,成为BP

继续修改config.ini

//修改BP名
producer-name = 你的节点名字
//修改BP节点名对应的公钥,私钥 (不要用下面现成的,自己去重新生成!!!)
signature-provider = EOS66bcyj8NBeJigeCDqCeYnaJNFZfCZt328yEpHCh7VZKSxed4Cn=KEY:5KHqSSajXUi11wPEWagiWgY51G6mo4zE4FKfrD2tNH9i4PHHVxU
//添加插件支持
plugin = eosio::producer_plugin
下载测试网络对应的genesis.json

切换到~/.local/share/eosio/nodeos/config目录,
新建genesis.json,将(测试网络genesis.json)内容复制到新建的genesis.json文件中,不要用wget直接下载,github会有转向内容不对.

开始准备启动

rm -rf ~/.local/share/eosio/nodeos/data
nodeos --genesis-json genesis.json

此时已启动并开始同步区块

开始配置成为BP

root@iZj6cgy98yiuluw41gz0aoZ:~/.local/share/eosio/nodeos/config# cleos get currency balance eosio.token bcskillsurou EOS
20000000.0000 EOS
root@iZj6cgy98yiuluw41gz0aoZ:~/.local/share/eosio/nodeos/config# cleos system delegatebw bcskillsurou bcskillsurou '10000000.0000 EOS' '10000000.0000 EOS'
2018-07-20T12:20:56.591 thread-0   main.cpp:438                  create_action        ] result: {"binargs":"a0129ddec45aab49a0129ddec45aab4900e876481700000004454f530000000000e876481700000004454f530000000000"} arg: {"code":"eosio","action":"delegatebw","args":{"from":"bcskillsurou","receiver":"bcskillsurou","stake_net_quantity":"10000000.0000 EOS","stake_cpu_quantity":"10000000.0000 EOS","transfer":false}} 
executed transaction: ed7bfc3787629ae9fd27c8ef2a51440a2f89717a4e442e5c5588184ce7664c4b  144 bytes  1798 us
#         eosio <= eosio::delegatebw            {"from":"bcskillsurou","receiver":"bcskillsurou","stake_net_quantity":"10000000.0000 EOS","stake_cpu...
#   eosio.token <= eosio.token::transfer        {"from":"bcskillsurou","to":"eosio.stake","quantity":"20000000.0000 EOS","memo":"stake bandwidth"}
#  bcskillsurou <= eosio.token::transfer        {"from":"bcskillsurou","to":"eosio.stake","quantity":"20000000.0000 EOS","memo":"stake bandwidth"}
#   eosio.stake <= eosio.token::transfer        {"from":"bcskillsurou","to":"eosio.stake","quantity":"20000000.0000 EOS","memo":"stake bandwidth"}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 
root@iZj6cgy98yiuluw41gz0aoZ:~/.local/share/eosio/nodeos/config# cleos system regproducer bcskillsurou EOS8H6rzgwpV2KD5AtiDMZLQWw6nDxWaV6jGc7rVY8sHfFuJZjCq4 http://bcskill.com
2018-07-20T12:36:19.839 thread-0   main.cpp:438                  create_action        ] result: {"binargs":"a0129ddec45aab490003be6e9ef6503430e4c80a2cd52149d2b7b9330d92c2cea4a839632f94ced75daf10687474703a2f2f64617070702e636f6d0000"} arg: {"code":"eosio","action":"regproducer","args":{"producer":"bcskillsurou","producer_key":"EOS8H6rzgwpV2KD5AtiDMZLQWw6nDxWaV6jGc7rVY8sHfFuJZjCq4","url":"http://dappp.com","location":0}} 
executed transaction: 91df9e3e6e27708ab803ee6da121c2ddd7845fef5f76145dbfd618937ecee5e5  160 bytes  1130 us
#         eosio <= eosio::regproducer           {"producer":"bcskillsurou","producer_key":"EOS8H6rzgwpV2KD5AtiDMZLQWw6nDxWaV6jGc7rVY8sHfFuJZjCq4","u...
warning: transaction executed locally, but may not be confirmed by the network yet    ]

需要等主网启动后,才会出块。

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »