[Manual] PlatON Mainnet Node Upgrade Instruction-v1.3.1

Version Info

ChainID: 210425

Version: 1.3.1

Git Commit: be7ed4cdc4e620565947806bee9ee114797745e7

Binary Document: https://download.platon.network/platon/platon/1.3.1/platon

1. Installation Instruction

​ If you have already installed the PlatON node, please go to Step 2 for the upgrade.

​ If not, please install the node according to Official Document; feel free to contact our customer service if you need any help.

2. Upgrade Instructions (upgrade without rebooting)

​ The following instructions are based on the Ubuntu18.04 system. You could complete the upgrade directly through the binary document or source code compiling. Please carry out the upgrade in strict accordance with the following procedures. If you need any help, feel free to reach out to us through our customer service.

  • Directly activate the binary document

    # Make a binary backup
    $ [[ -x /usr/bin/platon ]] && sudo mv /usr/bin/platon /usr/bin/platon_`platon version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'`
    # Download the latest binary document
    $ wget https://download.platon.network/platon/platon/1.3.1/platon
    # Use the new version
    $ chmod +x platon
    $ sudo mv platon /usr/bin/platon
    # Check the version
    $ platon version
    Version: 1.3.1-unstable
    Git Commit: be7ed4cdc4e620565947806bee9ee114797745e7
    
  • Source code compiling (The following is intended for previously complied environments. For new compiling, please refer to Source Installation PlatON)

    # Make a binary backup
    $ [[ -x /usr/bin/platon ]] && sudo mv /usr/bin/platon /usr/bin/platon_`platon version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'`
    # Compile the binary document
    $ git clone https://github.com/PlatONnetwork/PlatON-Go.git --recursive
    $ cd PlatON-Go/
    $ git fetch --all
    $ git checkout -b platon-1.3.1  be7ed4cdc4e620565947806bee9ee114797745e7
    # Install the dependency library and compiler. In case of missing go.sum entry for module, please use go mod tidy to remove unused dependencies and add the missing ones.
    $ 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.3.1-unstable
    Git Commit: be7ed4cdc4e620565947806bee9ee114797745e7
    

3. When to Reboot the PlatON Process

​ If the present node has staked before, please check whether it has been selected as a validator (Verifying) on the Blockchain Explorer. If so, please reboot your node after the node exits from the validator model (switch from Verifying to Active)

​ The command below is for reference only. You should reboot the platon process according to your own management approach.

# Check the process ID
$ ps aux |grep platon
root   13476 39.1 49.7 9174616 3925796 ?     Sl   Feb07 1140:19 /usr/bin/platon  --identity ....

# Terminate the platon node (e.g. kill 13476). In the above example, the process ID is 13476; you should replace the ID with your ID during actual operation; Once the kill command is executed, use the above ps command to check whether the process was correctly terminated before executing the following command.
$ kill <process ID>

# Activate platon node
$ nohup platon --identity platon-node --datadir ./data --port 16789  --rpcport 6789 --rpcapi "db,platon,net,web3,admin,personal" --rpc --nodekey ./data/nodekey --cbft.blskey ./data/blskey --verbosity 1 --rpcaddr 127.0.0.1 --syncmode "fast" > ./data/platon.log 2>&1 &

# After rebooting, enter the console to check if the node has been upgraded to the new version: v1.3.1-unstable-be7ed4cd-20221130
$ platon attach http://localhost:6789
Welcome to the PlatON JavaScript console!

PlatONnetwork/x.x.x.x/v1.3.1-unstable-be7ed4cd-20221130/linux-amd64/go1.18.7

4. Version declaration

After the version is declared, you can view the node version in the explorer

  • If you never staked before, please skip this procedure.

  • Where $PLATON_MTOOLDIR is not defined, the absolute path should be completed according to the actual deployment.

    #Version declaration (example)
    $ platon_mtool declare_version --keystore $PLATON_MTOOLDIR/keystore/staking.json --config $PLATON_MTOOLDIR/validator/validator_config.json
    

5. Feedback

If your platon upgrade failed, please provide us feedback through the following channels.

  1. WeChat: Colinan
  2. WeChat validator group
  3. Email: validator@platon.network