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

Version Info

ChainID: 210425

Version: 1.4.0

Git Commit: e11fe5c58e455c1cb637025d2fb167a54af4faf6

Binary Document: https://download.platon.network/platon/platon/1.4.0/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.4.0/platon
    # Use the new version
    $ chmod +x platon
    $ sudo mv platon /usr/bin/platon
    # Check the version
    $ platon version
    Version: 1.4.0-unstable
    Git Commit: e11fe5c58e455c1cb637025d2fb167a54af4faf6
    
  • 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.4.0  e11fe5c58e455c1cb637025d2fb167a54af4faf6
    # 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 versio
    $ chmod +x build/bin/platon
    $ sudo mv build/bin/platon /usr/bin/platon
    # Check the version
    $ platon version
    Version: 1.4.0-unstable
    Git Commit: e11fe5c58e455c1cb637025d2fb167a54af4faf6
    

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.4.0-unstable-e11fe5c5-20230317

$ platon attach http://localhost:6789
Welcome to the PlatON JavaScript console!

instance: PlatONnetwork/x.x.x.x/v1.4.0-unstable-e11fe5c5-20230317/linux-amd64/go1.18.10

4. Proposal Processing

  • If you have staked before, please check whether the current node is under one of the following states through the Blockchain Explorer:
    • Producing
    • Verifying
    • Active

If the current node is under one of the above three states, please refer to the following command to engage in voting. The proposal id is as follows:

< 0x9c97912c786db2e312886356e81ba79e8fb9bff43200d934d28e239f76928a54 >

# Upgrade proposal voting command (example)

$ platon_mtool vote_versionproposal --proposalid 0x9c97912c786db2e312886356e81ba79e8fb9bff43200d934d28e239f76928a54  --keystore $PLATON_MTOOLDIR/keystore/staking.json --config $PLATON_MTOOLDIR/validator/validator_config.json

If the state of a node is “Candidate”, then version declaration is required (refer to the following command).

# Version declaration (example)
$ platon_mtool declare_version --keystore $PLATON_MTOOLDIR/keystore/staking.json --config $PLATON_MTOOLDIR/validator/validator_config.json
  • 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.

5. Feedback

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

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