Bitshares见证人备用服务器节点教程

in #bitshares8 years ago (edited)
  1. 选用备用服务器,最好换一家服务器提供商和地点,安装见证人节点,这个过程就略掉;

  2. 同步区块:
    screen -S witness_node
    ./programs/witness_node/witness_node --replay-blockchain --rpc-endpoint=127.0.0.1:8090 #加上--replay-blockchain选项,可以降低内存

  3. 运行钱包,设置密码,解锁钱包
    screen -S cli_wallet
    .programs/cli_wallet/cli_wallet -s ws://127.0.0.1:8090
    new>>>set_password 123456
    locked >>> unlock 123456

  4. 创建sign秘钥对:

    suggest_brain_key
    {
    "brain_priv_key": "XXXXX XXXX XXXXX XXXX",
    "wif_priv_key": "5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxkf2ure",
    "pub_key": "BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaerwr"
    }
    保存秘钥对,以供后面作为signing key使用;

  5. Ctrl+C, 重新运行witness_node(关闭和启动的时候多耐心等待)
    ./witness_node -s 104.200.28.117:61705 --rpc-endpoint=127.0.0.1:8090 --witness-id '"1.6.71"' --private-key '["pub_key", "wif_priv_key"]’
    #将1.671换成你的见证人序列号,pub_key和wif_priv_key分别换成第4步你创建的pub_key和wif_priv_key

  6. 运行钱包,解锁,导入sigin private key和active wif key
    screen -r cli_wallet
    .programs/cli_wallet/cli_wallet -s ws://127.0.0.1:8090
    unlocked >>> import_key “witness.yao” 5Kxxxxxxxxxxx3 true #witness.yao换成你自己的账号,5Kxxxxxxxxxxx3换称该账号的签名权限的signing key
    unlocked >>> import_key “witness.yao” 5Gxxxxxxxxxxx6 true #witness.yao换成你自己的账号,5Gxxxxxxxxxxx6换称该账号的活跃权限active key

  7. 更新见证人signing key
    update_witness “witness.yao” "https://bitsharestalk.org/index.php/topic,23628.0.html" "BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaerwr" true
    #将witness.yao换成你自己的账号,https://xxx换成你自己的url,没有可以填xxx,BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaerwr换成你第4步创建的pub_key

  8. 过几秒钟,在你主节点cli钱包查看你自己的见证人信息,检查你的signing_key是否更新:

get_witness “witness.yao” #将witness.yao换成你自己的见证人账号
{
[...]
"id": "1.6.71",
"signing_key": "BTSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaerwr",
[...]
}
或者进入http://cryptofresh.com/查看你自己的见证人信息,检查你的signing_key是否更新
,若signing_key更新了,同时出块正常,代表你成功了。

|9. 把你主节点和备用节点的signing key都保存下来,当你的当前出块节点出现问题的时候,你就可通过第7步更新成你的另一个节点的signing key,这样你就可以避免大量丢快。
P.S. 目前在研究见证人监控脚本,后面最好做到当出块节点出现故障的时候,自动切换到备用节点,希望多多交流。

Sort:  

赞!期待下一篇监测和自动切换备用节点,让 witness 更具有鲁棒性!^_^

感谢!^^

Congratulations @kimziv! You have received a personal award!

Happy Birthday - 1 Year
Click on the badge to view your own Board of Honnor on SteemitBoard.

For more information about this award, click here

By upvoting this notification, you can help all Steemit users. Learn how here!