How to set up and run Random Beacon node. Step by step guide for beginners

Dmytro Sokoliuk
7 min readAug 31, 2020

(09.18.2020 Updated)

If you already set up a ECDSA node — you can start from Step 4 this guide — “Create Infura account”

You can find instructions for ECDSA node HERE (push)
Sure, you can run both ECDSA and Random Beacon nodes in a 1 server, but probably better if 1 node use 1 server because of capacity reasons.

Required specifications:

* CPU: 2 vCore, RAM: 4096 MB
* Any SSH client. I am use PuTTY
* Google Chrome with installed metamsk

This guide was created for a beginners to set up your first node. Be sure — you can do this even without any technical skills. Please do not hurry up and be sure that you are doing everything like in this guide.

Step 1: Create Ethereum wallet

Please follow https://myetherwallet.com
Push “Create new wallet”

Than choose “By Keystore File”

Create your unique password (save it in strong place and do not share it with no one). Be sure that you see message “good”. It means you choose strong password:

Than push “Next”. Scroll down and push “Download Keystore file”

Save it in strong place

Ok! You are good! Now need import your keystore file to Metamask. To do this open Metamask extension (find it in google extensions if you still not have, but be sure that it is official). Than push “Import Account”

Select JSON File. Choose file that you download before and fill the passport that you created earler. Push “Import”

Here we go! Wallet added

Now you need to choose Ropsten Ethereum network (1)
Here you can see your Ethereum adress

Than follow the faucet link to get free test Ethereum. I am use this service: https://teth.bitaps.com/. Here you can ask 1 ETH every minute. But there is couple other services where you can request at the same time. Like this one: https://faucet.ropsten.be/

Good. Let’s move to the:

Step 2. Get test KEEP

Follow the link, change the value after equals to your eth url: https://us-central1-keep-test-f3e0.cloudfunctions.net/keep-faucet-ropsten?account=YOUR_WALLET _ADRESS

You should see the message:

If you see it — means you are good! You succsessfully received test KEEP! Easy, right?

Now we moved the next important (as any other) step.

Step 3. Delegate KEEP tokens

Follow the link: https://dashboard.test.keep.network/tokens

In “Tokens” section you should see available 300K KEEP tokens (see 1 on image).
Choose “Grant ID”, than write 300000. Be sure that you connected with Metamask adress where you get KEEP tokens in prev. step (2).

Than fill you adress in this 3 sections and push “DELEGATE STAKE”:

Write “DELEGATE” word and push “DELEGATE”:

Wait till transaction complete. If i successful you will see in right side “STAKED TOKENS”. Than follow “Applications” section, choose first “Random Beacon” and authorized contract:

Than authorized both contracts in“Applications” — “tBTC” section:

Add at least 20 testnet Ropsten Eth to bonding and confirm with metamask:

Done!

Step 4. Create Infura account

(New account for every single node) Follow the link: https://infura.io/register and register.
Login. Create the project and create name (any, for example “Beacon_node”)
After authorization choose your project “Setting” and change the network to Ropsten. Copy and save your Project ID. It will need you soon for a file congig.

Step 5. VPS setting

I advise using a virtual machine because it is more stable. Here is the link https://www.digitalocean.com/?refcode=30f95a922610&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=CopyPaste to register and get free 100$ to choose a machine . Using this service you can run even a few machines.

Register via the link and Deploy new server by clicking this button:

Choose Cloud computer:

Than choose any location you wish:

Server type: Ubuntu 18.04 x64:

Server size: 80 GB SSD, 2 CPU 4096MB Memory 3000GB Bandwidth will be enough.

Than push “Deploy now” and your virtual machine is ready to run your Random Beacon node!

Connect to VPS using SSH and final steps

Connect to your VPS using PuTTY or any other SSH client. How to do this? Download client, than open it. Be sure that you have such settings like on image below. but change IP adress using adress from your Vultr machine:

Host name — root@your_vultr_IP (№1 on image below)
Connection type — SSH
Port — 22
Close window on exit: Only on clean exit
Push “Open”

Than you should see this:

Copy password (№2 on image up) and paste it in client. If you using PuTTY — right mouse button is paste. Than push enter. You will not see password in client because it should be filled blindly. If you see this, you are successfully connected:

Now time to set up Random Beacon node

Fill the next commands. Every new raw — new command and wait till it will be completed. Push enter after every command.

Open ports:

sudo ufw allow 22/tcp
sudo ufw allow 3919/tcp
yes | sudo ufw enable

Install Docker:

sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io curl -y
sudo systemctl start docker
sudo systemctl enable docker

Create a folder structure:

mkdir -p $HOME/keep-client/config
mkdir -p $HOME/keep-client/keystore
mkdir -p $HOME/keep-client/persistence

Create variables (change message “Your…” to your Infura ID and your ETH adress):

export SERVER_IP=$(curl ifconfig.me)
export INFURA_PROJECT_ID="PASTE_YOUR_INFURA_ID"
export ETH_WALLET="YOUR_WALLET_ADRESS"

Next message is a one command:

cat <<EOF >>$HOME/keep-client/config/config.toml
# Ethereum host connection info.
[ethereum]
URL = "wss://ropsten.infura.io/ws/v3/$INFURA_PROJECT_ID"
URLRPC = "https://ropsten.infura.io/v3/$INFURA_PROJECT_ID"# Keep operator Ethereum account.
[ethereum.account]
Address = "$ETH_WALLET"
KeyFile = "/mnt/keystore/keep_wallet.json"# Keep contract addresses configuration.
[ethereum.ContractAddresses]
KeepRandomBeaconOperator = "0xC8337a94a50d16191513dEF4D1e61A6886BF410f"
TokenStaking = "0x234d2182B29c6a64ce3ab6940037b5C8FdAB608e"
KeepRandomBeaconService = "0x6c04499B595efdc28CdbEd3f9ed2E83d7dCCC717"# Keep network configuration.
[LibP2P]
Peers = ["/dns4/bootstrap-1.core.keep.test.boar.network/tcp/3001/ipfs/16Uiu2HAkuTUKNh6HkfvWBEkftZbqZHPHi3Kak5ZUygAxvsdQ2UgG",
"/dns4/bootstrap-2.core.keep.test.boar.network/tcp/3001/ipfs/16Uiu2HAmQirGruZBvtbLHr5SDebsYGcq6Djw7ijF3gnkqsdQs3wK",
"/dns4/bootstrap-3.test.keep.network/tcp/3919/ipfs/16Uiu2HAm8KJX32kr3eYUhDuzwTucSfAfspnjnXNf9veVhB12t6Vf",
"/dns4/bootstrap-2.test.keep.network/tcp/3919/ipfs/16Uiu2HAmNNuCp45z5bgB8KiTHv1vHTNAVbBgxxtTFGAndageo9Dp"]
Port = 3919
# Override the node's default addresses announced in the network
AnnouncedAddresses = ["/ip4/$SERVER_IP/tcp/3919"]# Storage is encrypted
[Storage]
DataDir = "/mnt/persistence"
EOF

The next command:

nano $HOME/keep-client/keystore/keep_wallet.json

After this command you see a new window. Fill there all text from your KEEP_wallet.json file:

Than push ctrl + o, enter, ctrl+x

Next command, change text “here_your_wallet_password” to your Ethereum password which you created in a 1 step:

export KEEP_CLIENT_ETHEREUM_PASSWORD="YOUR_ETH_PASSWORD"

The next text is a one command:

sudo docker run -dit \
--restart always \
--volume $HOME/keep-client:/mnt \
--env KEEP_ETHEREUM_PASSWORD=$KEEP_CLIENT_ETHEREUM_PASSWORD \
--env LOG_LEVEL=debug \
--name keep-client \
-p 3919:3919 \
keepnetwork/keep-client:v1.3.0-rc.4 --config /mnt/config/config.toml start

Than last command:

sudo docker logs -f keep-client

If you see something like this, you are very cool:

But if something wrong, the shortest way for you will be next:

Delete your Vultr machine, create new. Than start setting again but do not hurry up, be very attentive.

If you have a trouble, you always can ask in:

KEEP #tBTC official discord: https://discord.com/invite/wYezN7v
KEEP network website: https://keep.network/
tBTC website: https://tbtc.network/

--

--