Who are Keepers? In the system of DeCus, Keepers are responsible for the custody of underlying crypto assets. All keepers are organized under the overlapping group assignments in a 100% decentralized way. Anyone who wants to become a Keeper need to deposit collaterals and run a Keeper node. In this article, we’ll give a step-by-step instructions on how to get a Keeper node running on the Ethereum testnet.
What we give?
This guide assumes you don’t have any prior technical knowledge — not of using cryptocurrency, running a network node, or fiddling with your computer’s command line.
Therefore, this guide is full of explanations about the tools you’re using, and other handy info that will get you through the process easier and faster.
What you need?
To create a keeper node you require：
- Time and patience
The whole process takes over half an hour, and may be interrupted by some faulty operations, but we still recommend trying to get it done all in one go.
- A pair of keys for one Bitcoin wallet
A Bitcoin wallet is a digital wallet storing the encryption material giving access to a Bitcoin public address and enabling transactions. A bitcoin wallet contains a collection of key pairs, each consisting of a private key and a public key. The private key (k) is a number, usually picked at random. From the private key, we use elliptic curve multiplication, a one-way cryptographic function, to generate a public key (K). From the public key (K), we use a one-way cryptographic hash function to generate a bitcoin address (A).
If you ready have one, please skip to item (3)
(1)Visit this link: https://www.bitaddress.org/?testnet=true.
(2)Move the mouse randomly to generate a key pair.
(3)Save the pair of keys to a cloud file or notepad for later use.
*In order to simplify the process, the above steps show an easy and direct way to get a pair of keys for one Bitcoin wallet which will be used to run a Keeper Node on the testnet. When it’s time for you to run the Node on the mainnet, please use a real Bitcoin wallet which can export the private key.
- An Ethereum wallet and test ETH to pay the gas fee
Just like your real-world wallet can hold different currency notes like US Dollars, Japanese Yen, an Ethereum Wallet can hold different currencies on the Ethereum blockchain-like ETH, and ERC20 tokens, etc. MetaMask is a popular and established browser extension which functions as an Ethereum wallet.
If you ready have one, please skip to item (2)
(1)Create a wallet with MetaMask, and claim test ETH. Here’s the guidance:
(2)Open the MetaMask , and click ‘Account Details’.
(3)Click ‘Export Private Key’, and save it to a cloud file or notepad for later use.
*Currently, Binance Smart Chain(BSC) Test Net is used in this test instead of Ethereum Test Net. If you are not familiar with how to add BSC Test Net and claim test BNB, please check this guide.
- An Infura project ID
What’s Infura? Running a node on the Ethereum network is not so easy. It requires a fair bit of technical knowledge and computing gear to get it going. Infura is a set of tools that lets us quickly setup a project on the blockchain without needing to handle everything ourselves.
If you’ve ready got an Infura ID, please directly go the server part.
(1)Visit Infura from this link: https://infura.io/register , and create a new account under the ‘free tier’.
(2)After you’ve created and verified your account, Infura will bounce you onto a ‘Let’s Get Started’ page. Click ‘Get started and create your first project to access the Ethereum network!’
(3)Enter a name and click ‘CREATE’. Infura will show you a page called ‘Project Details’. Under the ‘Keys’ heading, you’ll see a string of letters and numbers called your ‘PROJECT ID’.
(4)Copy your PROJECT ID, and save it to a cloud file or notepad for later use.
- A server
In the dark old days, getting your own server up and running was a pain. Now, there’s plenty of online services out there that let us easily do it in the cloud. The cloud is just a computer in someone else’s massive, sterile data center.
The service we’ll use today is called Digital Ocean. If you are familiar with the set up process, please directly purchase a server with 1CPU core and 2GB RAM. If you have no idea of how to carry it out, please take this official tutorial as a reference: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ubuntu-20-04-server-on-a-digitalocean-droplet
After the successful purchase, remember to save the IP address and password of the cloud server for later use.
All the preparations are done! Let’s get this going!
There are 3 steps in total.
Step 1: Add Keeper
1.Visit this link: https://app.decus.io/keeper
2.Switch to the Kovan Test Network, and connect your wallet
3.Click “Add Keeper”, and confirm transaction three times on your MetaMask
4.This step is successfully done when the website page shows as the following picture.
Step 2: Log in to your server
1.Launch the command line
On MacOS: Launch Terminal by going to Applications > Utilities > Terminal.
On Windows: Launch the Command Line / CMD by pressing the Windows / Start button, typing in ‘CMD’, and opening ‘Command Line’, or ‘cmd.exe’, whatever your computer shows.
2.Type the following command line, and hit enter.
ssh root@‘Your IP Address’
‘Your IP Address’ should be replaced with the address provided by Digital Ocean.
3.The terminal will prompt for a password. Input the password of the server and hit enter.
4.If the password needs to be confirmed, please input it again and hit Enter.
5.The connection is successful when the following command lines are shown on the Terminal.
Step 3: Deploy the Node
1.Type the following command line, and hit enter.
vi . /pwd
2.Switch to the writable state (this step is not required for Windows systems) by typing the following command line.
3.The switch is successful when ‘INSERT’ shows on the Terminal.
4.Set the password and save it to a cloud file or notepad for later use.
5.Click “ESC”, type the following command line, and hit Enter.
Install the firewall
- If the cloud server is an Ubuntu system, please type the following command lines to install the firewall(You can directly do a copy and paste.)
sudo ufw allow 22/tcp
sudo ufw allow 3919/tcp
yes | sudo ufw enable
- If the cloud server is a Centos system, please type the following command lines to install the firewall.(You can directly do a copy and paste.)
sudo yum install firewalld
sudo systemctl enable firewalld
firewall-cmd — state
sudo firewall-cmd — permanent — add-port=22/tcp
sudo firewall-cmd — permanent — add-port=3919/tcp
sudo systemctl restart firewalld
Install Docker and check the version
1.Type the following command lines.
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
2.Type the following command line, and hit enter. Docker is successfully installed when “Docker Version XX.XX.X” shows on the Terminal.
sudo docker — version
Deploy the node
1.Type the following command line, and hit enter.
docker run -it -e PASSWORD=$(cat ./pwd) -v keeper-user:/app/user lolv/keeper-client init
2.Input the Infura project ID, the private key of ETH address and BTC address, along with your frequently-used email to receive the notifications.
3.Type the following command line, and hit enter.
docker run -d --restart always -e PASSWORD=$(cat ./pwd) -v keeper-user:/app/user --name keeper-client lolv/keeper-client
4.Type the following command line, and hit enter. If the node runs successfully, the keeper-client will show on the Terminal.
5.Type the following command line, and hit enter to check the logs.The Infura ID, Keeper ID, Chain ID, etc. will show if there is a successful deployment.
docker logs keeper-client -f
6.Visit the following address https://coordinator.decus.io/keepers , and check the Keeper status.
Step 4: Claim Rewards
After successfully running a Keeper Node, your BSC address will receive the Ctoken. You need to stake the Ctoken to claim your DCS rewards.
1.Visit this link: https://app.decus.io/keeper/stake . You can check the balance of Ctoken.
*If the balance is 0, please refresh the page.
2.Click “Approve”, and confirm the transaction in MetaMask
3.Click “Stake”, enter the amount of Ctoken you want to deposit, and click “Stake”. Then confirm the transaction in MetaMask.
4.After successfully staking the Ctoken, you will see the DCS rewards that can be claimed. Click “Claim” to get your rewards.
Once finished, you need to add DCS tokens in MetaMask to see the balance.
The contract address of DCS: