[Upgrade] Alaya Network 0.16.3 ( Version. Opportunity)Upgrade Announcement &Operation Manual

PlatON Network
5 min readFeb 15, 2022

--

Announcement

Opportunity (0.16.3) version has released. Supported by the core development team, it is an optimized version for the problem PlatON-issue-1885 1 in response to recent feedbacks from validators on graph-node support.

New Feature

  • Add PlatON-issue-1885 1 to support graphql interface at the bottom layer
  • Merge Ethereum’s optimization of command line parameters 20935 and node’s refactoring 21105
  • Add instruction support for convertType on abigen

Statement

Optimization 20935 involves changes to the startup command. Though the new version is compatible with the old command line parameters, we suggest you use the new flags. Please use alaya --help to check or refer to the development manual.

This version is a minor version upgrade. Each node can choose to upgrade according to its own situation. If you have any question or feedback

Operation Manual

Version Info
ChainID: 201018
Version: 0.16.3
Git Commit: 3cc9c754fb9d56afd5200edb7d6e8d4a0e8a7dc3
Binary Document:
https://download.alaya.network/alaya/platon/0.16.3/alaya

1. Upgrade Instruction

​ ​ If you are using the 0.16.1 or 0.16.2 version, please jump to Step 3 for the upgrade.

  • Version 0.16.1 Info
$ alaya version Version: 0.16.1-unstable Git Commit: 76b3b19b70d6c9a7f0dcc3119471613e3c84dc24
  • Version 0.16.2 Info
$ alaya version Version: 0.16.2-unstable Git Commit: 430aecb60a61a10613835f4f014f0ecb5a72af5c

2. Upgrade Notice

​ The following notices are for the upgrade from 0.16.0 to 0.16.3.

2.1 About CPU, RAM, and Disk


​ During the upgrade, part of the historical data will be migrated to the Freezer database. This will take up more CPU utility, which will return to normal upon completed data migration. When your device is rebooted after the upgrade, in rare cases, you may experience increased RAM use, which will also normalize once the data is migrated. The upgrade will also occupy more storage by about 11GB. For more details, please refer to Github releases.

  • RAM upgrade
    During the upgrade and rebooting process, there is a small chance that validators using 8GB RAMs will suffer OOM due to the increased RAM use. To avoid the potential OOM, we recommend creating a swap partition or upgrading to 16GB RAM (if possible).
  • Add a swap partition
wget https://download.alaya.network/alaya/scripts/alaya_swap.sh chmod +x alaya_swap.sh ./alaya_swap.sh
  • Notice:
  1. The ‘alaya_swap.sh’ script provided in the document will carry out the following process: Where there is no swap partition, the script will create an 8GB swap partition; where the swap partition is smaller than 7GB, the script will expand it to 8GB; where the swap partition is larger than 7GB, the script will remain inactive.
  2. Validators who carried out the upgrade without expanding their RAM could experience OOM, which will result in connection failures. For such users, the activation process will resume once their device is rebooted.
  • Disk expansion
    The upgrade will take up 11GB additional disk space; where the storage is insufficient, we recommend expanding the disk capacity.

2.2 Incompatibility

​ After the present validator upgrade, you can no longer use the 0.16.0 version and the upgraded data for activation. Validators are advised to download the node data of the latest version (0.16.3) we provided and have the data stored on their validator PC before the upgrade. In case of failed activation after the upgrade, you will need to use the 0.16.3 version and the data of the latest version for activation.

  • The fast model backup data is 24GB big, at the block height of 38983009. In case of failed activation, the backup data should be used to replace the data/platon directory.
wget https://download.alaya.network/alaya/nodedata/0.16.3-fast-data.tar.gz tar -xf 0.16.3-fast-data.tar.gz

3. 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/alaya ]] && sudo mv /usr/bin/alaya /usr/bin/alaya_`alaya version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'`

Download the latest binary document

$ wget https://download.alaya.network/alaya/platon/0.16.3/alaya

Use the latest version of alaya

chmod +x alayachmod+xalaya sudo mv alaya /usr/bin/alaya

Check the version

$ alaya version
Version: 0.16.3-unstable
Git Commit: 3cc9c754fb9d56afd5200edb7d6e8d4a0e8a7dc3

- **Source code compiling** The following is for previously complied environments. For new compiling, please refer to our [official website] (https://devdocs.alaya.network/alaya-devdocs/zh-CN/Install_Alaya/)
```bash
# Make a binary backup
$ [[ -x /usr/bin/alaya ]] && sudo mv /usr/bin/alaya /usr/bin/alaya_`alaya version | grep '^Version:' | awk -F "[ ,:,-]" '{print $3}'`
# Compile the binary document
$ git clone https://github.com/AlayaNetwork/Alaya-Go.git --recursive
$ cd Alaya-Go
$ git fetch --all
$ git checkout -b alaya-0.16.3 3cc9c754fb9d56afd5200edb7d6e8d4a0e8a7dc3
# 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 latest version of alaya
$ chmod +x build/bin/alaya
$ sudo mv build/bin/alaya /usr/bin/alaya
# Check the version
$ alaya version
Version: 0.16.3-unstable
Git Commit: 3cc9c754fb9d56afd5200edb7d6e8d4a0e8a7dc3

4. When to Reboot the Alaya Process

​ If the present node has staked before, please check whether it has been selected as a validator (Verifying) on the [Alaya Blockchain Explorer] (https://scan.alaya.network/node).
If so, please reboot the alaya process after the node exits from the validator model (switch from Verifying to Active)

You can deactivate/activate the node following your own management process, and the command below is for reference only. Validators should first check the process ID and then deactivate the alaya node. Next, the alaya process should be rebooted using the following command.

# Check the process ID
$ ps aux |grep alaya
root 3476 39.1 49.7 9174616 3925796 ? Sl Feb07 1140:19 /usr/bin/alaya --identity ....
# Deactivate the alaya node. For instance, in the example above (kill 3476), the process ID is 3476, and the ID will differ in real operation. Upon execution of the kill command, you can then check whether the process is properly ended using the ps command above. The subsequent activation command should be executed only in the event of a normal exit.$ kill <process ID>
# Activate the alaya node
$ nohup alaya --identity alaya-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 &
# Enter the Alaya JavaScript console to check whether the node is using the latest version: v0.16.3-unstable-3cc9c754-20220126
$ alaya attach http://localhost:6789
Welcome to the Alaya JavaScript console!
instance: AlayaNetwork/alaya/v0.16.3-unstable-3cc9c754-20220126/linux-amd64/go1.16.8

5. Version Statement

​ You could check the validator version on the Alaya Blockchain Explorer after the version statement is released.

alaya_mtool declare_version --keystore $ALAYA_MTOOLDIR/keystore/staking.json --config $ALAYA_MTOOLDIR/validator/validator_config.json
  • Validators who never staked before should skip this procedure.
  • Where $ALAYA_MTOOLDIR is not defined, the absolute path should be completed according to the actual deployment.

6. Feedback

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

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

--

--

PlatON Network
PlatON Network

Written by PlatON Network

PlatON — An Infrastructure for Privacy-Preserving Computation and Distributed Economies.

No responses yet