Bottos 主网升级操作指导 V1.2.1

6,489

1 Bottos超级节点准备 【升级文档下载】
1.1 硬件准备

超级节点要求的最小配置:

1.2 网络准备

当前网络只支持公网IP连接,需满足如下要求:

到种子节点列表(114.67.80.177,)的 ping 值不超过 250ms 使用SSH 工具登录服务器后执行命令:

ping 114.67.80.177

bottos@DS3-2:~$ ping 114.67.80.177

PING 114.67.80.177 (114.67.80.177) 56(84) bytes of data. 64 bytes from 114.67.80.177: icmp_seq=1 ttl=48 time=4.20 ms 64 bytes from 114.67.80.177: icmp_seq=2 ttl=48 time=4.17 ms 64 bytes from 114.67.80.177: icmp_seq=3 ttl=48 time=4.35 ms 64 bytes from 114.67.80.177: icmp_seq=4 ttl=48 time=4.26 ms

— 114.67.80.177 ping statistics –4 packets transmitted, 4 received, 0% packet loss, time 3004ms

rtt min/avg/max/mdev = 4.171/4.248/4.358/0.106 ms 节点外网带宽 >= 20 Mb

端口

默 认 开 启

说明

9868 是 节点间通讯端口,数据同步使用

8689 是 REST API服务访问端口,若节点需对外提供API 访问,则需开启,否则建议关闭

6869 否

钱包服务端口,仅支持本机(127.0.0.1或localhost)访问,若生产节点出块采用钱包签 名(非读取配置文件私钥),则必须启动;其他场景建议生产节点关闭

服务器启动后,在ECS 管理界面,需在网络侧和主机侧启用相关端口:

文件 说明

bcli bottos链交互工具

bottos bottos程序文件

config.toml bottos配置文件(不需修改)

genesis.toml bottos启动文件(不需修改)

检查项 说明

系统漏洞 对已知的系统漏洞打响应的补丁

防火墙关闭不使用的 端口

按照需求,仅开启需要的端口,IP白名单收集中后续会公布,具体防火墙操作见各云 主机商指导,

防火墙开启防DDOS 攻击

开启DDOS 防御功能,具体防火墙操作见各云主机商指导

1.3 系统准备

推荐使用 Linux操作系统,推荐 Ubuntu Server 16.04.5 LTS及以上版本。 1.4 节点运行文件

节点启动需要如下文件,下载方式见2.1 章节

1.5 安全防护

超级节点安全主要从以下方面防护:

2 准备 Bottos 超级节点环境 2.1 下载运行程序

登录服务器后执行如下操作:

1、创建运行目录
# mkdir -p /root/bottos_node/update

2、下载节点运行文件
# cd /root/bottos_node/update;

rm -rf *

# wget wget https://github.com/bottos-project/bottos/releases/download/v3.7.1/bottos_mainnet_V3.7.1.tar.gz

3、解压文件

# tar zxvf bottos_mainnet_V*.tar.gz

4、进入解压后的文件目录

3 启动Bottos超级节点 3.1 启动节点服务

# cd /root/bottos_node/update/bottos/

5、检查是否有如下文件:
ubuntu@bottos:~/bottos_node/update/bottos# ls
bcli bottos genesis.toml wallet walletlog.xml

ubuntu@bottos:~/bottos_node/update/bottos

# md5sum bottos 6329c0c0d492fc800394d931c4330f43 bottos

返回结果为:6329c0c0d492fc800394d931c4330f43 说明文件正确,否则请重新下载

1、进入项目运行路径: # cd /root/bottos_node/bottos/

2、停止已运行的bottos 服务: # ps -ef | grep ‘\./bottos’ | grep -v grep | cut -c 9-15 | xargs kill -SIGINT 可能无结果显示,属于正常

3、检查是否有已经运行的 # ps -ef | grep ‘bottos’ | grep -v grep 若无返回结果,则继续执行步骤4,否则,重复执行步骤2

4、删除历史数据 # rm -rf nohup.out

5、复制升级包 # cp -r /root/bottos_node/update/bottos/b* ./

6、启动超级节点 # nohup ./bottos –delegate delegatexx –delegate-signkey 046aa27050c156314f3567be87c7e339277fdfe193fd8a6ec0e5abf85c8a37a0838f08af60d1c302f9c07447a 0bb8a9fdf49a192b49d8b484984a533f314dc3a6a –enable-wallet &

说明: delegatexx:生产者账号名 –enable-wallet:可选,启动钱包服务 –disable-api:可选,不启动REST api服务 7、(可选)如钱包不存在,需创建区块签名钱包: # ./bcli wallet create –account delegatexx –type delegate Please input your password for your wallet: Please input your password again for your wallet: Please input your private key for your wallet: { “wallet_name”: “delegatexx_sign.keystore” } Create wallet done. Now unlock the wallet within 300 seconds. { “unlock”: true }

3.2 检查节点启动是否正常同步

3.2.1 检查节点启动是否正常

执行如下命令,出现如下打印即为启动成功:(由于创世节点还未启动,日志打印为异常状态,如下字样)

3.2.2 检查节点同步是否正常

当创世节点启动后,执行如下命令,出现如下打印即为启动成功:

3.2.3 检查节点是否出块

8、解锁区块签名钱包: # ./bcli wallet unlock –type delegate –timeout 0 –account delegatexx

Please input your password for your wallet: { “unlock”: true }

# cd /root/bottos_node/bottos/ # head datadir/log/bottos.log 2019-01-24 20:02:29.619 [ERR] block.go:274 processBlockReq(): PROTOCOL get block:95, 1, num 480559 2019-01-24 20:02:29.619 [ERR] block.go:274 processBlockReq(): PROTOCOL get block:95, 1, num 480586 2019-01-24 20:02:29.623 [ERR] forkdb.go:125 Insert(): CHAIN start number 777475, head number 777476, hash c2b1e7dbb8b34b01ca8e8064b070f59034c6f79b394eefe8be061a3b2670aab1 2019-01-24 20:02:29.624 [ERR] blockchain.go:1074 updateDelegate(): CHAIN delegate btoalibaba, update last confirmed block, old 777458, new 777476

2019-01-24 20:02:29.624 [ERR] chainactor.go:244 PreCommitBlockReq(): PreCommitBlock, errorcode:0, number:777476, time:2019-01-24 12:02:30, delegate:bto-alibaba, trxn:0, validatorn: 19, hash:c2b1e7dbb8b34b01ca8e8064b070f59034c6f79b394eefe8be061a3b2670aab1, prevHash:ec900816e073d1dfdd244150b74e151ea4cb0cc1c3cf4f908f34c3f2f7dad6a0

# cd /root/bottos_node/bottos/ # tail -f nohup.out

InsertBlock, number:1, time:2018-12-21 08:14:27, delegate:bottos, trxn:0, hash:8c159d2c1e677a1108f14ab82b205dda642f6ebab60cb26c0543849993b4eb6a, prevHash:caf2bae84f70412354211dd5028142eca6901b06b9a65dfbe9df065bcf56e291, version:3.4.0 InsertBlock, number:2, time:2018-12-21 08:14:30, delegate:bottos, trxn:0, hash:aebbe9d2d9608f0bb18b91689e0654a71a90b5b8a31290232048e8b3ed78f0e9, prevHash:8c159d2c1e677a1108f14ab82b205dda642f6ebab60cb26c0543849993b4eb6a, version:3.4.0 InsertBlock, number:3, time:2018-12-21 08:14:33, delegate:bottos, trxn:0, hash:0a8c0cda99a2cc9b345ae989066e97c7f53da51edcf205545117d98597b5ca22, prevHash:aebbe9d2d9608f0bb18b91689e0654a71a90b5b8a31290232048e8b3ed78f0e9, version:3.4.0 InsertBlock, number:4, time:2018-12-21 08:14:36, delegate:bottos, trxn:0, hash:5025f7c8ac8e25af4a4606f7c6890099dd028b0cb804bf2cd64368ce27c95b20, prevHash:0a8c0cda99a2cc9b345ae989066e97c7f53da51edcf205545117d98597b5ca22, version:3.4.0 InsertBlock, number:5, time:2018-12-21 08:14:39, delegate:bottos, trxn:0, hash:5ef2d46f192ac15eecb1fc3061acbf1813ea55c4d59b7a170e68184a3943961a, prevHash:5025f7c8ac8e25af4a4606f7c6890099dd028b0cb804bf2cd64368ce27c95b20, version:3.4.0

执行如下命令,出现如下信息即为已参与出块。

# tail -f nohup.out

PreCommitBlock, number:777803, time:2019-01-24 12:22:21, delegate:bottos-mainnetnode1, trxn:0, hash:6cd9d51a1419285ae1d66a8b2db82a8ce4887b99455b948b9028a78fe90705ee, prevHash:753038db02f2682964384100227327405655a645754b1695f824626cb7ba5333 CommitBlock, number:777803, time:2019-01-24 12:22:21, delegate:bottos-mainnetnode1, trxn:0, hash:6cd9d51a1419285ae1d66a8b2db82a8ce4887b99455b948b9028a78fe90705ee, prevHash:753038db02f2682964384100227327405655a645754b1695f824626cb7ba5333, version:1.0.0 PreCommitBlock, number:777804, time:2019-01-24 12:22:24, delegate:bottosbaymax, trxn:0, hash:e3b1a5a2faf2cfee14bc7323337279fa8a07b3b1e43aceef79d006e24d0d6c1c, prevHash:6cd9d51a1419285ae1d66a8b2db82a8ce4887b99455b948b9028a78fe90705ee CommitBlock, number:777804, time:2019-01-24 12:22:24, delegate:bottosbaymax, trxn:0, hash:e3b1a5a2faf2cfee14bc7323337279fa8a07b3b1e43aceef79d006e24d0d6c1c, prevHash:6cd9d51a1419285ae1d66a8b2db82a8ce4887b99455b948b9028a78fe90705ee, version:1.0.0

发表评论

电子邮件地址不会被公开。 必填项已用*标注