Starting a U°OS Calculator Node
Table of contents
This document will guide you through starting a Calculator Node on the U°OS testnet.
A Calculator Node calculates the Importance scores for every account on the U°OS blockchain.
The calculation is done continuously in 600 block cycles. The node follows the Block Producer voting pattern — the top 21 Calculator Nodes publish hashes of their calculation results to the U°OS blockchain.
UOS token emission is issued and distributed based on the Calculator Node results.
Supported operating systems:
- Ubuntu
- Debian
- Fedora
RAM:
- 8 GB
Note that if you are running a Block Producer node, you will need a separate machine and a separate account to run the Calculator Node.
- Install build libraries
- Time sync the system
- Create new user for UOS
- 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 two key pairs using the UOS software
- Contact the UOS developers with your preferred account name and public keys
- Create and modify
config.ini
- Download blocks.log
- Download snapshot file
- Start your node
- Create a wallet and import both your Active and Owner private keys
- Register as a Calculator Node
1. Install build libraries
Install libboost-all-dev
build-essential
and llvm-4.0-dev
:
sudo apt -y install libboost-all-dev build-essential llvm-4.0-dev
2. Time sync the system
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
3. Create new user for UOS
adduser uos
and switch to this user
su - uos
4. Clone the UOS repository
Clone the UOS repository:
git clone https://github.com/UOSnetwork/uos
5. Update the submodules
Update the submodules:
cd ~/uos
git submodule update --init --recursive
6. Build the UOS software
Build the UOS software with the following command:
./scripts/eosio_build.sh -y
Note that this will run for over an hour, so plan accordingly.
7. Install the node
Install the node from the UOS software:
./scripts/eosio_install.sh
Add installed eosio binaries to the PATH variable:
echo 'PATH="/home/uos/eosio/1.8/bin:$PATH"' >> ~/.profile
You need to relogin as uos user.
Verify the version of the node:
nodeos --version
It will give you something similar to:
v1.8.4-1-g11eeb9b85
8. Generate two key pairs
You will need to generate two 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 permissions if they get compromised.
- Active key pair: Use this key pair to transfer funds and vote.
Generate the key pairs:
cleos create key --to-console
The command will output a key pair once on each run. Run it two times to generate two key pairs.
Label each key pair as Owner and Active. 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.
9. Contact the U°OS developers
Think up an account name that you would like to register as a Calculator Node.
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 U°OS developers:
- Your preferred account name
- Your Owner public key
- Your Active public key
Contact the U°OS general group in Telegram at https://t.me/uos_network_en.
PM the group Admin for the U°OS Block Producers and Calculator Nodes Telegram group.
Once you join the Telegram group, provide your account name, owner and active public keys. The developers will register you as a Standby Block Calculator Node.
10. Create and modify config.ini
-
Start the node once to create a default
config.ini
file:nodeos
The
config.ini
file will be created in the~/.local/share/eosio/nodeos/config/
directory. -
Open
config.ini
for editing and add the following lines:calculator-name = "CALCULATOR_NODE_NAME" calculator-public-key = "PUBLIC_KEY" calculator-private-key = "PRIVATE_KEY" p2p-peer-address = mainnet-node-1.uos.network:9876 p2p-peer-address = mainnet-node-2.uos.network:9876 p2p-peer-address = mainnet-node-3.uos.network:9876 p2p-peer-address = mainnet-node-4.uos.network:9876 p2p-peer-address = mainnet-node-5.uos.network:9876 plugin = eosio::chain_api_plugin plugin = eosio::history_api_plugin plugin = eosio::uos_rates
where
- CALCULATOR_NODE_NAME — Your account name that you provided to the U°OS developers earlier
- PUBLIC_KEY — Your public key from the Active key pair that you generated earlier
- PRIVATE_KEY — Your private key from the Active key pair that you generated earlier
- You might need to change p2p peers, just ask for the current peers in the dev chat
-
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 calculator-name
, calculator-public-key
and calculator-private-key
parameters as specified above. If you don't do this, you will get an error when starting your node.
Save or copy config.ini to you home directory:
cp ~/.local/share/eosio/nodeos/config/config.ini config.ini
11. Download blocks.log
Download latest blocks.log from S3:
wget https://s3.eu-central-1.amazonaws.com/snapshot.uos.network/blocks.log
Move blocks.log
file:
mv blocks.log ~/.local/share/eosio/nodeos/data/blocks
12. Download snapshot file
Download latest snapshot from S3:
wget https://s3.eu-central-1.amazonaws.com/snapshot.uos.network/snapshot_latest.bin
13. Start your node
Start your Standby Calculator Node:
nodeos --snapshot ~/snapshot_latest.bin -c ~/config.ini "$@" >> ~/output.log 2>&1 &
Check that the node is running:
tail -f ~/output.log
This should give you a running list of blocks and Block Producers.
14. Create a wallet and import the Active private key
Create a wallet that you will use to stake UOS and receive UOS emission:
cleos wallet create -n NAME --to-console
where
NAME
— Any name for your wallet--to-console
— The wallet password will be printed to console. You can also specify--file
instead of--to-console
if you would like the password to be saved to a file instead.
Save the wallet password and keep it secure.
Make sure the wallet is unlocked:
cleos wallet list
This will print all your wallet names. The unlocked wallets will have an asterisk next to the name *
.
For example, the wallet ledgerblocks
is unlocked in this output:
Wallets:
[
"default",
"ledgerblocks *",
"test"
]
If your wallet is locked, you can unlock it with the following command:
cleos wallet unlock -n NAME
where NAME
is the name of your wallet.
Import your Active private key into the unlocked wallet:
cleos wallet import -n NAME --private-key PRIVATE_KEY
Lock your wallet:
cleos wallet lock -n NAME
Now you have a locked wallet with your Active private key.
13. Register as a Calculator Node
Run the following command:
cleos -u https://api.uos.network:7889 push action eosio regcalc '["ACCOUNT", "ACCOUNT_INFO", "LOCATION_ID"]' -p ACCOUNT
where
-p
— Permission level to authorize the action.ACCOUNT_NAME
— This is your Calculator Node account name.ACCOUNT_INFO
— Additional information for your account identification in the Calculator Node list; usually your website or a U°Community link.LOCATION_ID
— Get your country ISO 3166 Numeric Code from https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
The command might print a warning:
warning: transaction executed locally, but may not be confirmed by the network yet
This is a standard warning saying that it may take a second to register on the network.
You can now check your account name on the GOVERNANCE page of U°Community.
You should now be a Standby Calculator Node on the U°OS blockchain.
Checking if the node is running:
ps -elf | grep nodeos
Gracefully stopping the node:
pkill nodeos
Deleting all blocks to restart the node fresh:
nodeos --delete-all-blocks -c ~/config.ini "$@" >> ~/output.log 2>&1 &
You might want to do this if you started your node prematurely without properly following the instructions.
A full running U°OS node for API calls:
https://api.uos.network:7889
A full running U°OS history node for API calls:
https://history.uos.network:7889
Get any account information, including balances and voting:
cleos -u https://api.uos.network:7889 get account NAME
Feel free to talk to the developers in the chat.
Updated almost 5 years ago