POA Forum

On-chain randomness activation on SOKOL

Hello @poa-validators

Parity recently published a new Parity Ethereum release v2.7.2 which contains some of the new AuRa features we added throughout the last year. One of the features is on-chain randomness. We added this in PR #10946.

We would like to test the randomness on Sokol first, so we need to activate it by updating spec.json and Parity to v2.7.2 on validator nodes.

This feature assumes that each validator will automatically create a transaction to the RandomAuRa contract (to generate a random number) from their mining key once per 20 blocks. The transaction won’t consume any gas as it will be executed with a zero gas price.

As a result, POA users will get an ability to use a random seed for their needs (please read here how it works).

The corresponding change in spec.json was made in https://github.com/poanetwork/poa-chain-spec/pull/137/files

The randomness activation in Sokol is going to be at block 13391641 (Thursday, 20-Feb-2020 ~08:00 am UTC).

For that, we need to update both Parity (to v2.7.2) and spec.json. Please follow the steps below:

  1. SSH login to your Sokol node.
  2. Stop Parity service
sudo systemctl stop poa-parity
  1. Switch to home directory (NOTE: if you’re updating a bootnode, the path is /home/bootnode)
cd /home/validator

output should be

  1. Check your node.toml - it should contain force_sealing = true line:
grep force_sealing node.toml

output should be

force_sealing = true
  1. Remove older backups
sudo rm -rf backups-version
  1. Create a new backup
sudo mkdir backups-version
sudo touch backups-version/BEFORE-2.7.2
BKPFLDR="backups-version/$(date '+%Y%m%dT%H%M%S' -u)"
sudo mkdir -p "$BKPFLDR"
sudo mv parity spec.json "$BKPFLDR"
  1. Switch to validator user (NOTE: if you’re updating a bootnode, username should be bootnode)
sudo -i -u validator
  1. Download new parity binary
curl -LO 'https://releases.parity.io/ethereum/v2.7.2/x86_64-unknown-linux-gnu/parity'
  1. Check binary integrity
echo 'fe992f0c9b229a4406e82b9ff6d388f4acb4d6ce2782cb79b7bc379e7965ae34 parity' | sha256sum -c

output should be

parity: OK
  1. Set permission to execute the binary
chmod +x parity
  1. Download new spec file
curl -LO 'https://raw.githubusercontent.com/poanetwork/poa-chain-spec/sokol/spec.json'
  1. Check that new spec contains an activation block set to 13391641
grep 13391641 spec.json

output should be

          "13391641": "0x8f2b78169B0970F11a762e56659Db52B59CBCf1B"
  1. Login back to sudo-enabled user
  1. Restart services
sudo systemctl start poa-parity && sleep 10 && sudo systemctl restart poa-netstats
  1. Check that your node is “green” in netstats https://sokol-netstat.poa.network (this may take a couple of minutes)
  2. Wait to see if your node produces new blocks https://blockscout.com/poa/sokol

Jim O Sokol Validator node updated and verified.

1 Like

:white_check_mark: Igor Barinov
:white_check_mark: Stephen Arsenault
:white_check_mark: Adam Kagy
:white_check_mark: Xiaobo (Peter) Chen
:white_check_mark: Ian Ferrell
:white_check_mark: Siarhei Barylau
:white_check_mark: Alex Emelyanov
:white_check_mark: Jim O’Regan
:white_check_mark: John H. LeGassic
:white_check_mark: Kiryl Ihnatsyeu
:white_check_mark: Sviataslau (Henry) Vishneuski
:white_check_mark: Irvin Cardenas
:white_check_mark: Michael Milirud
:white_check_mark: Oxana Kunets

:black_square_button: John Storey
:black_square_button: Kristina Yevseyeva

@oxanakunets @irvinxyz @johndangerstorey @kristina @Micwebnet please update your Sokol nodes :pray:t3:

Updated validator Sokol node to 2.7.2.