logo

[Tutorial] Become a Validator node in OAK Network Testnet

Chris Li

Chris Li

· 3 min read
Thumbnail
Image

Hi OAK community members,

We are proud to present the OAK Testnet to the developer community. Please note that at this stage the Testnet Validator application is only open to developers for testing purposes, and we will open up the validator staking after the launch of the mainnet.

In order to enhance the product’s user experience and to improve on-chain security, OAK team launched the first Bug Bounty program with potential payouts of $2,500. Check out the program here.

1. Setup OAK Testnet Validator Node

1.1 Environment

Make sure a Docker engine is correctly installed on your server.

1.2 Run the flowing code to Start Node

docker pull oaknetwork/oak_testnet:latest & docker run -d --name <container_name> oaknetwork/oak_testnet:latest --name <node_name>

Example:

docker pull oaknetwork/oak_testnet:latest & docker run -d --name node001 oaknetwork/oak_testnet:latest --name david

1.3 Check Node Operating Log

docker logs -f --tail=200 <container_name>

Example:

docker logs -f --tail=200 node001
Image
Syncing, target=#287414 (1 peers), best: #2164 (0x2e46…fe34), finalized #2048 (0x9d90…8a48), ⬇ 142.9kiB/s ⬆ 1.9kiB/s

The above message indicates that on-chain election is complete.

2. Become a Validator

2.1 Run the Node

Create a new Docker container with the latest image oaknetwork/oak_testnet:latest. Note that the ~/oak-testnet/data path in the below command is the path in your persistent storage for node data, which will not be deleted when the Docker container is removed.

docker run -d --name <container_name> -v ~/oak-testnet/data:/app/data -p 30333:30333 oaknetwork/oak_testnet:latest --name <validator_name> --validator

2.2 Get Rotate Keys

Retrieve a RotateKey from the node via cURL:

docker exec -it <container_name> curl -H "Content-Type: application/json" -d'{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[ ]}' http://localhost:9933

Save the Rotate keys, for example:

0xd63605b333d1a706bddfa0c79e930fbcb3db786d59181289b19d698e4c8f7b5ca2b5e55a59fa94bf0a147a4aa697c9ff90ed075923bf17d7c80ca1daccb2c31e10cb1cc74a53f5ce5fb048ac12e2d0c8d74eed658ba85dc6788e67077b5e871ad8dbf6d47a1233dd40d3b17ce6c130c274a3f83779105416c8e3e1c929f62618

2.3 Become a Validator

Click the link:

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.testnet.oak.tech#/staking/actions

Click the Validator button:

Set up Validator 1/2

Image

Fill in the information:

Stash Account/Controller Account

The Stash account is meant to stay in cold storage, while the Controller account makes day-to-day transactions like setting session keys or deciding which validators to nominate. The Stash account still needs to make some transactions, though, like bonding extra funds or designating a new Controller.

Place Funds at Stake

To become a Validator you need to lock away the minimum threshold stake. This is done using a bonding transaction which places an amount of OAK tokens into the staking system. Please note that you will need to leave a minimum amount as transaction fees.

Choose the Destination Account

Here you can specify the account where you wish to receive staking rewards.

Click Next to complete the form

Set up Validator 2/2

Image

Fill in Rotate Keys

Fill in the Rotate Ket generated earlier.

Setup Commission Rate

For example, 20% to validator and 80% to be assigned by the nominator.

Allows New Nominations

Choose if the validator allows new nominations.

With the submission, you’ll see your account in the stashes list.​​

Image

Meanwhile, your account will show up in the waiting list.

Image

After an era, your account should show up in the Validator list.

In OAK Testnet an era is one hour.

We accept limited validators, the first 6 nodes will be the validator.

ImageImage

Congratulations, you are all set as a validator in OAK Testnet. If you encounter people and problems during this process, please contact the developers of OAK Network in Discord Server.

Stay tuned for further information about the OAK Network here on Medium, Twitter and LinkedIn, as well as in our Discord Server!

Please check out our engineering and growth job openings, contact partner@oak.tech for partnerships, or contact@oak.tech for any general inquiries.

Chris Li

About Chris Li

Chris Li is the founder and CEO of Ava Protocol. Prior to establishing Ava Protocol, Chris gained valuable experience as a Messaging Protocol Engineer at Microsoft and as a successful serial entrepreneur. He is also a long-term EVM smart contract developer, Web3 Foundation grant recipient, and Polkadot core contributor.