Updating the Client

Note: As of September 27th, 2021, all EWC validator and full nodes should run a London-compatible client: OpenEthereum (v3.3.0-rc.8) or Nethermind (v1.11.3)

What

Description

Purpose

Documentation to update Validator Node client in preparation for Berlin Hard Fork:

  • For nodes running OpenEthereum client(v3.2.5) or earlier, the update is to OpenEthereum (v3.3.0-rc.8)

  • For nodes running Nethermind client (v1.10.72) or earlier, the update is to Nethermind (v1.11.3)

Creator

EWF Team

The update schedule

OpenEthereum and Nethermind clients compatible with AuRa are released in a regular rhythm. The process for implementing regular updates is described below. Emergency updates (i.e. in the event of a known security vulnerability with a specific client version) will be accelerated.

All EWC client updates are tested by the EWF team to ensure compatibility with the EW Chain AuRa consensus mechanism. EWF strongly recommends validators and other node (e.g. RPC) operators refrain from updating their clients until compatibility with the current version is confirmed on this page. Once EWF has completed testing of each update, we will communicate to validators and the broader community via Slack and Telegram that it is safe to install the new version; this page will also be updated regularly. For security/stability reasons, we recommend rolling out the update in waves, first on Volta and then the production EW Chain. During an update, validators will be split into two or more groups to simplify coordination and help maintain overall network stability.

Below is an example of how this works (actual timelines may vary):

  • Group 1 (e.g., address ends in letter or 0)
    Group 2 (e.g., address ends in number > 0)
    Group 1 Update Volta on Monday or Tuesday after the 'Go' signal
    Group 1 Update EWC on Thursday or Friday after the Volta update

    Group 2 Update Volta on Thursday or Friday after the 'Go' signal
    Group 2 Update EWC on Monday or Tuesday (the week after the Volta update)

Updating the client

Good to know:

OpenEthereum Client update doesn’t change any of the following

  • Node Address

  • Node key

  • Private key

  • Secret

Before applying the upgrade, ensure the validator node instance has the following requirements -

CPU

Memory(GiB)

Network Capacity(GiB)

Storage(GB) and Type

4 (Minimum)

8 (Recommended)

8 (Minimum)

16 (Recommended)

Up to 5 (Minimum)

Up to 10 (Recommended)

Minimum 300, SSD

Manual Upgrade

As the upgrade to OpenEthereum v3.3.0-rc.8 does not involve any config changes or require db-re sync, it should be relatively simple.

1. Download and verify the new image

Download the node software (Openethereum v3.3.0-rc.8)

1 docker pull openethereum/openethereum:v3.3.0-rc.8


Verify the downloaded software to make sure no one has changed something during data transfer

1 docker image inspect openethereum/openethereum:v3.3.0-rc.8 | jq -r '.[0].Id'

Result should be:

1 sha256:669e536e78b474df965007e5260573fddfe6b6c1c5318105acdd1053dcd21324


If thats the case, you are good to go and move forward.

2. Make a backups & update image version

 

Stop the containers:

1 2 cd $HOME/docker-stack docker-compose stop

 

Make a backup of docker-compose.yml:

1 cp $HOME/docker-stack/docker-compose.yml $HOME/docker-stack/docker-compose.yml_backup

 

Make a backup of .env file:

1 cp $HOME/docker-stack/.env $HOME/docker-stack/.env_backup


Make a backup of DB [Optional]:

change the text $CHAIN_NAME toVolta or EnergyWebChain

1 cp -r chain-data/chains/$CHAIN_NAME/ ./$CHAIN_NAME_backup


Modify and save .env file (lines 3 & 9):

DO not override other existing variables!

1 vim $HOME/docker-stack/.env

new .env

new .env

1 2 3 4 5 6 7 8 9 VALIDATOR_ADDRESS=$YOUR_VALIDATOR_ADDRESS EXTERNAL_IP=$YOUR_VALIDATOR_IP_ADDRESS PARITY_VERSION=openethereum/openethereum:v3.3.0-rc.8 PARITYTELEMETRY_VERSION=1.1.0 IS_SIGNING=signing PARITY_KEY_FILE=./chain-data/keys/EnergyWebChain/UTC--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CHAINSPEC_CHKSUM= CHAINSPEC_URL=https://example.com PARITY_CHKSUM=sha256:669e536e78b474df965007e5260573fddfe6b6c1c5318105acdd1053dcd21324


Modify and save docker-compose.yml file (line no.4):

1 vim $HOME/docker-stack/docker-compose.yml

new docker-compose.yml

new docker-compose.yml

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 version: '2.0' services: parity: image: openethereum/openethereum:v3.3.0-rc.8 restart: always command: --config /parity/config/parity-signing.toml --nat extip:${EXTERNAL_IP} volumes: - ./config:/parity/config:ro - ./chain-data:/home/openethereum/.local/share/io.parity.ethereum/ - ./.secret:/parity/authority.pwd:ro ports: - 30303:30303 - 30303:30303/udp - 127.0.0.1:8545:8545 parity-telemetry: image: energyweb/parity-telemetry:1.1.0 restart: always environment: - WSURL=ws://parity:8546 - HTTPURL=http://parity:8545 - PIPENAME=/var/spool/parity.sock volumes: - /var/spool/parity.sock:/var/spool/parity.sock

 

Restart containers:

1 2 cd $HOME/docker-stack docker-compose up -d --force-recreate

 

Check whether node is running & syncing:

1 2 3 4 5 6 7 cd $HOME/docker-stack # Check openetherereum logs docker-compose logs -f --tail 100 parity # Check telemetry logs docker-compose logs -f --tail 100 parity-telemetry

 

3. Update the chainspec

Please go through: https://energyweb.atlassian.net/wiki/spaces/EWF/pages/2568257551




After some time you could also check whether node is fully synced:

  • Execute the following command on validator instance -

    • 1 curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545 -H 'Content-Type: application/json'
  • If the node is synced, the above command will return the following result

    • 1 {"jsonrpc":"2.0","result":false,"id":1}
  • If the node is yet to be synced, the above command will return the following result

    • 1 {"jsonrpc":"2.0","result":{"currentBlock":"0xXXXXXX","highestBlock":"0xXXXXXX","startingBlock":"0xXXXXXX","warpChunksAmount":null,"warpChunksProcessed":null},"id":1}

Common issues and Troubleshooting

Issue 1

Node sync process gets stuck in some blocks or the sync takes longer time in some blocks.

Resolution -

  • Stop docker containers

    • > docker-compose stop

  • Remove these 2 files -

    • > rm docker-stack/chain-data/chains/Volta/user_defaults

    • rm docker-stack/chain-data/chains/Volta/network/nodes.json

  • Recreate again the containers

    • > docker-compose up -d --force-recreate

Issue 2

Node reports transaction errors like Validator 0x.... clould not be reported (Transaction error (Gas price too low to replace, previous tx gas: None, new tx gas: Node)) on block ...

Resolution -  

  • Comment [mining] from parity-signing.toml  file

    • 1 2 3 4 5 6 7 8 9 10 11 #[mining] #force_sealing = true #usd_per_tx = "0.000000000000000001" #usd_per_eth = "1" #price_update_period = "hourly" #min_gas_price = 1 #gas_cap = "$BLOCK_GAS" #gas_floor_target = "$BLOCK_GAS" #tx_gas_limit = "$BLOCK_GAS" #extra_data = "$COMPANY_NAME" #engine_signer = "$VALIDATOR_ADDRESS"
  • Restart the containers

    • > docker-compose restart

PS:  When the node sync is completed, you need to uncomment those lines and restart again the containers.