Setting up a Shardnet Node for NEAR STAKEWARS!

Firstly you will need a server! You can use 8 cpu 16 RAM on Hetzner.

Registration form here!

Update Ubuntu and download all the needed packages, install python

Install Node JS and NPM

Install NEAR CLI

Set up the environment. Be aware that you should input these commands anytime you open a new session! Otherwise testnet environment will be used!

Install cargo and rust

Now download and build binary. Please check the commit to be exactly this since it is the only one that should be used right now!

Initialize the working directory, delete old files and download new config file and new genesis.json. Since the network was hard forked recently, there is no need to download the snapshot.

Now you will need to create a wallet https://wallet.shardnet.near.org/
WARNING! If you had a wallet previously to the hard fork, you may need to recreate it! Forget the old mnemonic and do everything from scratch.

After that, write in the CLI

See the authorisation link and copy it into the browser window where you wallet is opened. After connecting a wallet, right the wallet name (<accountId>.shardnet.near) in the CLI and confirm.

Copy your wallet json and make some changes

Change the account ID and Private Key parameter accordingly, then exit nano editor.

Create a service file (one command)

Now start the service and see logs, that everything works fine. You should see it downloading headers firstly and the blocks. Waiting for full sync.

Now let’s deploy a contract of our staking pool with 30 NEAR staked!

Change <pool id>, <accountId>, <public key>, <accountId> parameters here!

My example for this

If everything is fine, you should see yourself in near proposals command. Let’s look at the seat price in the bottom of near proposals command. And then we will need to stake. Remember to set environmentals for shardnet!

Change parametres for staking accordingly!

In the few epochs, you will be able to see yourself in the explorer and by typing

Finally, we can set the ping (every 5 minutes)

Set up cron job for every 5 minutes! You can make sure script is working in the explorer!

Now all set! Good luck!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ivan Staker

Ivan Staker

12 Followers

Professional validator, taking part in major testnets and running mainnets.