Once you are confirmed as a new Kovan validator, you will need to configure your node.
-
Setup and configure your validation node
I. Prerequisites
II. Node Setup (AWS or Non-AWS)
III. Ansible Playbook Configuration
IV. Running Ansible Playbook -
Set metadata in the dApp
1.Setup and configure your Validator Node
I. Control machine prerequisites
+---------------------+ +-------------------------+
| | | |
| local host | ansible | remote host |
| (control machine) +------------------> (validator node) |
| | | |
+---------------------+ +-------------------------+
Operating system
MacOS/Linux-based.
SSH Keys
If you know what ssh keys are, skip this section.
- Check if you already have a keypair:
ls -la ~/.ssh
if you get an error that the directory does not exist or the directory is empty, follow the instructions below. If you already have key pair, you can skip the rest of this section.
- Generate new ssh key-pair
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
insert your email address and a strong password. By default, keys will be saved to ~/.ssh/
and named id_rsa
with your public key being ~/.ssh/id_rsa.pub
.
Python
Check that you have python 2 version >= 2.6.5 or python 3 version >= 3.3 installed
python --version
if not - install it with the appropriate binary from here
Ansible
- Check that you have ansible version >= 2.3 installed
ansible --version
if not - follow this guide to install ansible. For example, you can use pip
to do it:
sudo pip install ansible
Git
Check that you have git installed
git --version
if not - install it following instructions here
II. Validator Node Setup
Node setup is at your discretion - criteria are included in the following instructions.
- Create a node yourself with your favorite hosting provider (e.g. AWS/Azure/OVH/etc). Non-AWS Details
- Use our automated playbooks to create a node on AWS (requires creating an account on AWS). AWS Details
III. Ansible Playbook Configuration
- clone repository with ansible playbooks and checkout branch corresponding to Kovan:
git clone https://github.com/poanetwork/deployment-playbooks.git
cd deployment-playbooks
git checkout kovan
- prepare files with ssh keys (replace
id_rsa.pub
with your key name)
cat ~/.ssh/id_rsa.pub > files/admins.pub
cp files/admins.pub files/ssh_validator.pub
- create file with configuration settings:
cat group_vars/all.yml.network group_vars/validator.yml.example > group_vars/all.yml
- edit
group_vars/all.yml
file in your favorite text editor, e.g.nano
:
nano group_vars/all
Provide the following configuration parameters:
-
NODE_FULLNAME
- enter your organization name (this will be publicly visible) -
NODE_ADMIN_EMAIL
- enter your public email (this will be publicly visible) -
NETSTATS_SERVER
,NETSTATS_SECRET
- https://forum.poa.network/t/netstat-server-info/2442/2?u=phahulin -
MINING_KEYFILE
- insert content of your mining keystore file here, enclosed in single brackets. The result should look similar to this:
MINING_KEYFILE: '{"address":"..."}'
-
MINING_ADDRESS
- insert your mining key address, e.g.
MINING_ADDRESS: "0x..."
-
MINING_KEYPASS
- insert passphrase from keystore file
In nano
, to save file and exit, use CTRL+X and then Y
IV. Running ansible playbook
- create a file named
hosts
from the hosts.example file (again, usingnano
as an example)
cp hosts.example hosts
nano hosts
Add only the following content - other fields can be deleted / commented out. (replace 192.0.2.1 with your node’s actual ip address):
[validator]
192.0.2.1
[ubuntu]
192.0.2.1
Note: if you’re connecting to the remote host with some user other than ubuntu
, you need to provide username in the hosts
file in the following way (replace root
with correct username):
[validator]
192.0.2.1 ansible_user=root
[ubuntu]
192.0.2.1 ansible_user=root
- run ansible playbook, replace path of
--key-file
argument with your desired SSH key
ansible-playbook -i hosts validator.yml --key-file "~/.ssh/id_rsa"
The process should complete successfully.
Note: If your user on remote host requires a sudo password, please add -K
cli argument to the ansible command above and you’ll be asked to provide the password during playbook initialization.
- open https://kovan-netstat.poa.network to check your node status. It can take ~ 1/2 hour for a node to complete synchronization. During that time your node may appear as offline in the netstat list (grey or red). Please wait until it’s fully synced (green) - the block number and block hash should match the rest of the network.
2. Set Metadata
Note: This process will be available for validators after the Kovan Hard Fork is complete.
Once your node is up and running you will provide a description of your organization (metadata). To set your metadata for the first time, go to https://validators.poa.network/poa-dapps-validators/set, connect to the Kovan chain, and select your VOTING key.
Select “I’m a company” and provide the full company name and contact email address. Then click “Update metadata” and sign the transaction.
Once this is complete, open https://blockscout.com/eth/kovan and find a block generated by you (your mining key) in the last few blocks. This will confirm your details are correct and that your node is running and mining blocks.