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.


@Micwebnet @pchen23 please check your nodes on Sokol: they often skip blocks (the reason may be in full disk space, RAM, or CPU).

1 Like

Hi POA validators,

Periodically we monitor blocks production. We recently noticed that some validators sometimes skip blocks on Sokol:

Ian Ferrell @ftl_C-Ian
Stephen Arsenault @hashguide
Michael Milirud @Micwebnet
Xiaobo Chen @pchen23

We need to analize your node logs to try to find a possible reason of skipping blocks.

Please, provide your node logs on the Validators Support page: https://forum.poa.network/t/skipping-blocks-on-sokol/3306

The logs are available in the following file: /home/validator/logs/parity.log

1 Like

Here is my parity.log

I cut out all the rest of the bs but only the parts with errors.

1 Like

@hashguide Thank you for the logs! Could you please add the following line to the [misc] section of your node.toml file:

logging = "engine=trace,miner=trace"

And then restart the node with

sudo systemctl stop poa-parity && sleep 10 && sudo systemctl start poa-parity && sleep 10 && sudo systemctl restart poa-netstats

This will turn on advanced logs which we will be able to analyze a bit later.

The current logs you attached are helpful, but unfortunately not enough as they have a short format and don’t provide detailed information for each block.

1 Like

Ok will take care of this and upload the new ones asap

1 Like

@hashguide a friendly ping

@hashguide Currently, I don’t see skipped blocks for your node anymore (https://blockscout.com/poa/sokol/address/0x23468dB7f4b8Ff4924B0709aB7Ae0971B3Bc8d28/validations). Seems node reloading helped. But please don’t switch your logs back to a short format. We will wait for your node to skip blocks again and at that moment the logs will be helpful.

1 Like

I don’t see any errors in this log files, but here’s the link anyways.

Will keep my eye on it for the next few days.


1 Like

@ftl_C-Ian We noted your node is not skipping blocks at the moment. Could you please clarify, did you do any actions like node restarting or server reconfiguring during the last week?

Yes, unfortunately that server got knocked offline by my provider. Once I noticed I was able to start it back up.