-
Notifications
You must be signed in to change notification settings - Fork 5
Spinning up a Block Producer Node on Ubuntu
This document will guide you through spinning up a Block Producer Node on the UOS testnet.
As this is a testnet, here's a couple of things you need to know beforehand:
- The UOS developers are currently registering Block Producers manually. You will need to contact the UOS developers on Telegram with your preferred account name and public keys.
- Your account name generated when signing up at https://u.community/ won't work for the UOS Block Producer registration. You will need to come up with a different one and provide it to us.
For this guide, we are using a fresh Ubuntu 16.04 (xenial) running in Singapore.
Supported operating systems:
- Mac OS
- Ubuntu
- Debian
- Fedora
RAM:
- 8 GB
- Install Boost C++ libraries
- Time sync the system
- Clone the UOS repository
- Update submodules
- Build the UOS software. Note that this will run for over an hour, so plan accordingly.
- Install the node from the UOS software
- Generate three key pairs using the UOS software
- Contact the UOS developers with your preferred account name and public keys
- Create and modify
config.ini
- Download a pre-created
genesis.json
file - Start your node
Install libboost-all-dev
:
apt -y install libboost-all-dev
Sync the time to where your node is actually located. Check DigitalOcean: How To Set Up Time Synchronization on Ubuntu 16.04.
Since we are running this node in Singapore, we are issuing the following command:
sudo timedatectl set-timezone Asia/Singapore
Create a working directory for the UOS software:
mkdir uosdata
Change the directory to /uosdata/
:
cd uosdata
Clone the UOS repository:
git clone https://github.com/UOSnetwork/uos
Update the submodules:
git submodule update --init --recursive
Build the UOS software with the following command:
./eosio_build.sh -s UOS
Note that this will run for over an hour, so plan accordingly.
Install the node from the UOS software:
sudo ./eosio_install.sh
Verify the version of the node:
nodeos --version
It will give you something similar to:
v.1.4.3
You will need to generate three key pairs that you will use to manage your account:
- Owner key pair: Use this key pair to manage the ownership of your account; use the owner key to recover the active or producer permissions if they get compromised.
- Active key pair: Use this key pair to transfer funds and vote.
- Producer key pair: Use this key pair to manage your Block Producer account.
Generate the key pairs:
cleos create key --to-console
The command will output a key pair once on each run. Run it three times to generate three key pairs.
Label each key pair as Owner, Active, Producer. Labeling here just means putting a note next to each of the key pairs — in a file or on a paper or anything else; it's up to you.
Keep the keys safe. You may want to encrypt them and store securely.
Think up an account name that you would like to register as a Block Producer.
The account name has the following conventions:
- Must start with a letter
- Must be 12 characters
- Can only contain the characters lowercase a-z and 1-5
For example, 123example345
meets the convention requirements.
Prepare the information that you will need to provide to the UOS developers:
- Your preferred account name
- Your Owner public key
- Your Active public key
Contact the UOS general group in Telegram at https://t.me/uos_network_en.
PM the group Admin for the UOS Block Producers Telegram group.
Once you join the UOS Block Producers Telegram group, provide your account name, owner and active public keys. The developers will register you as a Standby Block Producer.
-
Start the node once to create a default
config.ini
file:nodeos --data-dir ~/uosdata/uos/data/ --config-dir ~/uosdata/uos/data
The
config.ini
file will be created in the~/uosdata/uos/data/
directory. -
Open
config.ini
for editing and add the following lines:agent-name = "PRODUCER_NAME" producer-name = PRODUCER_NAME signature-provider = PUBLIC_KEY=KEY:PRIVATE_KEY p2p-peer-address = node-1.uos.network:9876 p2p-peer-address = node-2.uos.network:9876 p2p-peer-address = node-3.uos.network:9876 p2p-peer-address = node-4.uos.network:9876 p2p-peer-address = node-5.uos.network:9876
where
- PRODUCER_NAME — Your account name that you provided to the UOS developers earlier
- PUBLIC_KEY — Your public key from the Producer key pair that you generated earlier
- PRIVATE_KEY — Your private key from the Producer key pair that you generated earlier
-
Save the file.
Note that the default config.ini
file has the agent-name = "EOS Test Agent"
parameter uncommented, so you will need to comment it (#) or replace with the agent-name
, producer-name
and signature-provider
parameters as specified above. If you don't do this, you will get an error when starting your node.
Download the pre-created genesis.json
file from the UOS repository to your ~/uosdata/uos/data/
directory:
wget https://raw.githubusercontent.com/UOSnetwork/uos.docs/master/testnetv1/genesis.json
Start your Standby Block Producer node:
nodeos --data-dir ~/uosdata/uos/data/ --genesis-json ~/uosdata/uos/data/genesis.json --config-dir ~/uosdata/uos/data "$@" > ~/uosdata/uos/data/stdout.txt 2> ~/uosdata/uos/data/stderr.txt &
Check that the node is running:
tail -f ~/uosdata/uos/data/stderr.txt
This should give you a running list of blocks and Block Producers.
Finally, you must register your node on the chain as a block producer. To register, issue the following command:
cleos system regproducer <producer name> <producer public key> <producer website> <three digit ISO location code>
Your account is now registered as a producer on the testnet.
Checking if the node is running:
ps -elf | grep nodeos
Checking the produced blocks:
tail -f ~/uosdata/uos/data/stderr.txt
Gracefully stopping the node:
pkill nodeos
Deleting all blocks to restart the node fresh:
nodeos --data-dir ~/uosdata/uos/data/ --genesis-json ~/uosdata/uos/data/genesis.json --config-dir ~/uosdata/uos/data "$@" > ~/uosdata/uos/data/stdout.txt 2> ~/uosdata/uos/data/stderr.txt &
You might want to do this if you started your node prematurely without properly following the instructions.
BPs are expected to perform regular maintenance. Prior to initiating maintenance, you must unregister your producing instance, you can use the following command:
cleos system unregprod <producer name>
Feel free to talk to the developers in the chat.
EOSIO Wiki: https://developers.eos.io/
Tools and scripts to monitor EOSIO BP: