[中文]
PlatON 主网1.4.4版本- 节点升级操作指南
版本信息
ChainID: 210425
Version: 1.4.4
Git Commit: af1168d0b62febf53913cb1ceebaa6413d3ba9b3
二进制下载:
Ubuntu 18.04系统:
https://download.platon.network/platon/platon/1.4.4/platon
Ubuntu 20.04系统:
https://download.platon.network/platon/platon/ubuntu20.04/1.4.4/platonUbuntu 22.04系统:
https://download.platon.network/platon/platon/ubuntu22.04/1.4.4/platon
1、安装指南
若已安装了PlatON节点,请跳到第2点进行更新操作;
未安装节点,请严格按照官方文档安装,如有需要帮助请联系客服。
2、更新指南(先更新,暂不重启)
以下步骤以 Ubuntu18.04系统为例,更新操作分为两种方式:直接使用二进制、源码编译,选其中一种方式更新即可;请严格按照以下步骤操作升级,如有需要帮助请联系客服。
-
直接用二进制
# 备份二进制 $ [[ -x /usr/bin/platon ]] && sudo mv /usr/bin/platon /usr/bin/platon_`platon version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'` # 根据节点主机系统选择不同的版本 $ wget https://download.platon.network/platon/platon/1.4.4/platon # 使用新的版本 $ chmod +x platon $ sudo mv platon /usr/bin/platon # 查看版本 $ platon version Version: 1.4.4-unstable Git Commit: af1168d0b62febf53913cb1ceebaa6413d3ba9b3
-
源码编译(针对之前已成功编译过的环境,全新编译请参考官网源码安装)
# 备份二进制 $ [[ -x /usr/bin/platon ]] && sudo mv /usr/bin/platon /usr/bin/platon_`platon version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'` # 编译二进制 $ git clone https://github.com/PlatONnetwork/PlatON-Go.git --recursive $ cd PlatON-Go/ $ git fetch --all $ git checkout -b platon-1.4.4 af1168d0b62febf53913cb1ceebaa6413d3ba9b3 # 安装依赖和编译,如果出现missing go.sum entry for module,使用go mod tidy移除未使用和添加缺失的依赖 $ go mod download && make all # 使用新的版本 $ chmod +x build/bin/platon $ sudo mv build/bin/platon /usr/bin/platon # 查看版本 $ platon version Version: 1.4.4-unstable Git Commit: af1168d0b62febf53913cb1ceebaa6413d3ba9b3
3、择机重启进程
如果当前节点质押过,首先通过区块链浏览器查看节点是否已经被选为验证人(共识中)
如果已经当选,请等待节点退出验证人(共识中转为活跃中)后再进行重启操作。以下命令仅做参考,根据各自的管理方式,重启platon进程
# 查看进程号
$ ps aux |grep platon
root 13476 39.1 49.7 9174616 3925796 ? Sl Feb07 1140:19 /usr/bin/platon --identity ....
# 停止platon节点,如kill 13476,上述示例中进程号为13476,实际操作时根据实际情况取值;执行kill命令后,可再使用上述ps命令查看进程是否正确退出,若正常退出再执行后续启动命令
$ kill <进程号>
# 启动platon节点
$ nohup platon --identity platon-node --datadir ./data --port 16789 --http --http.port 6789 --http.api "platon,net,web3,admin,personal" --http.addr "127.0.0.1" --nodekey ./data/nodekey --cbft.blskey ./data/blskey --verbosity 1 --syncmode "fast" > ./data/platon.log 2>&1 &
# 重启后进入控制台检查节点版本是否生效:v1.4.4-unstable-af1168d0
$ platon attach http://localhost:6789
Welcome to the PlatON JavaScript console!
PlatONnetwork/x.x.x.x/v1.4.4-unstable-af1168d0
4、版本声明
当版本声明后,可在浏览器查看节点版本
-
未质押过的节点,跳过本步骤。
-
没定义$PLATON_MTOOLDIR的,需要根据实际部署情况补全绝对路径。
#版本声明示例 $ platon_mtool declare_version --keystore $PLATON_MTOOLDIR/keystore/staking.json --config $PLATON_MTOOLDIR/validator/validator_config.json
5、反馈
platon升级失败的,可通过以下渠道反馈。
- Telegram 验证节点群
- 邮箱 validator@platon.network
【English】
PlatON Mainnet Version 1.4.4 - Node Upgrade Operation Guide
Version Information
- ChainID: 210425
- Version: 1.4.4
- Git Commit: af1168d0b62febf53913cb1ceebaa6413d3ba9b3
Binary Downloads:
- For Ubuntu 18.04 System:
- For Ubuntu 20.04 System:
- For Ubuntu 22.04 System:
1. Installation Guide
If you have already installed the PlatON node, please skip to Point 2 for update instructions;
For new installations, please follow the official documentation strictly, and contact customer service if you need assistance.
2. Update Guide (Update first, do not restart immediately)
The following steps are exemplified for an Ubuntu 18.04 system. The update can be done in two ways: using binaries directly or compiling from source, choose one of the methods below; please follow the steps closely for upgrading, and reach out to customer support if needed.
-
Using Binaries Directly
# Backup binary $ [[ -x /usr/bin/platon ]] && sudo mv /usr/bin/platon /usr/bin/platon_`platon version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'` # Choose the appropriate version based on your node host system $ wget https://download.platon.network/platon/platon/1.4.4/platon # Use the new version $ chmod +x platon $ sudo mv platon /usr/bin/platon # Check the version $ platon version Version: 1.4.4-unstable Git Commit: af1168d0b62febf53913cb1ceebaa6413d3ba9b3
-
Compiling from Source (for environments that have successfully compiled before; for fresh compilation, refer to the official source installation guide)
# Backup binary $ [[ -x /usr/bin/platon ]] && sudo mv /usr/bin/platon /usr/bin/platon_`platon version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'` # Clone and compile the binary $ git clone https://github.com/PlatONnetwork/PlatON-Go.git --recursive $ cd PlatON-Go/ $ git fetch --all $ git checkout -b platon-1.4.4 af1168d0b62febf53913cb1ceebaa6413d3ba9b3 # Install dependencies and compile, use go mod tidy if there is a missing go.sum entry for a module $ go mod download && make all # Use the new version $ chmod +x build/bin/platon $ sudo mv build/bin/platon /usr/bin/platon # Check the version $ platon version Version: 1.4.4-unstable Git Commit: af1168d0b62febf53913cb1ceebaa6413d3ba9b3
3. Restart Process at an Appropriate Time
If the current node has staked, first check via the blockchain explorer whether the node has been selected as a validator (in consensus). If it has been elected, wait until the node exits the validator status (from consensus to active) before restarting. Below commands are for reference only; restart the platon process according to your own management method:
# View process ID
$ ps aux |grep platon
root 13476 39.1 49.7 9174616 3925796 ? Sl Feb07 1140:19 /usr/bin/platon --identity ....
# Stop the platon node, replace <process ID> with the actual process ID found above; after executing the kill command, use the ps command again to verify the process has exited properly before proceeding with the start command
$ kill <process ID>
# Start the platon node
$ nohup platon --identity platon-node --datadir ./data --port 16789 --http --http.port 6789 --http.api "platon,net,web3,admin,personal" --http.addr "127.0.0.1" --nodekey ./data/nodekey --cbft.blskey ./data/blskey --verbosity 1 --syncmode "fast" > ./data/platon.log 2>&1 &
# After restarting, enter the console to check if the node version has taken effect: v1.4.4-unstable-af1168d0
$ platon attach http://localhost:6789
Welcome to the PlatON JavaScript console!
PlatONnetwork/x.x.x.x/v1.4.4-unstable-af1168d0
4. Version Declaration
After declaring the version, the node version can be viewed in the browser.
-
Skip this step for nodes that have not staked.
-
If $PLATON_MTOOLDIR is not defined, fill in the absolute path according to the actual deployment situation.
# Example of version declaration $ platon_mtool declare_version --keystore $PLATON_MTOOLDIR/keystore/staking.json --config $PLATON_MTOOLDIR/validator/validator_config.json
5. Feedback
In case of failure during the platon upgrade, feedback can be provided through the following channels:
- Telegram Validator Group
- Email: validator@platon.network