[Upgrade] PlatON DevNet2-v1.4.1 Version Upgrade Manual

PlatON DevNet2-v1.4.1 Version Upgrade Manual

To further enhance the flexibility and adaptability of the PlatON network, optimize node performance, PlatON released the 1.4.1 upgrade version on the devnet2. Through sufficient testing and verification on the PlatON devnet2, it prepares for the release of PlatON mainnet version 1.5.0.

Version Features

  • Synchronize and update to Ethereum v1.10.3 version;
  • Code pre-adaptation of EIP-2718 and EIP-2930, preparing to enable and support EIP-1559 for the next version;
  • Support enabling (default) new snapshot mechanism. Snapshot access overhead for state during block execution is O(1);
  • Added a way to delete old state from the database, you can specify that PlatON rebuild state data from stored snapshots;
  • Simplify upgrade judgment logic, build in PlatON historical upgrade block heights into the code;
  • For the test network, add logic to read genesis.json again at startup and update db chainconfig;
  • To further open support for cross-chain interoperability, remove strict validation of the bech32 address hrp;
  • Monitor disk space and automatically close node processes.

Impact Description

This is a minor version upgrade, and old version clients can continue to run without upgrading.After upgrading to the new client, the default enablement of state snapshots will construct snapshots during initial startup, which will consume more disk and memory resources.

DevNet2 Upgrade Instructions

Upgrading the devnet to 1.4.1 requires the following operations:

  1. Download the new genesis.json file.

Download Link,https://download.platon.network/platon/devnet2/platon/1.4.1/genesis.json (Note: Do not change the name of the genesis file genesis.json).

  1. Shut down the node.

  2. Find the node’s data directory, and replace the old version of the genesis.json file with the genesis.json file downloaded in the first step.

PlatON specifies the node’s data directory through the --datadir parameter of the startup command. The genesis file of the development network is stored under platon in the node’s data directory. If --datadir is specified in the startup parameters, such as:

 nohup ./platon --identity abc --datadir ./data --port 16890 --http.port 6791 --http.api "platon,net,web3,admin,personal" --http  --verbosity 4 --http.addr 127.0.0.1     --syncmode "full"   --db.nogc   &

You can see that --datadir is set to ./data, then you need to replace the genesis.json file downloaded in step 1 to under the directory ./data/platon.

If --datadir is not specified in the startup parameters, you can view the default datadir directory location through the platon -h command.

➜  platon -h
NAME:
   platon - the platon-go command line interface

...
PLATON OPTIONS:
  --config value                      TOML configuration file
  --datadir value                     Data directory for the databases and keystore (default: "/home/clearly/.platon")

As shown above, you can see that the default directory of --datadir is /home/clearly/.platon, then replace the genesis.json file downloaded in step 1 to under the directory /home/clearly/.platon/platon.

  1. Replace the node with version 1.4.1 and restart.