Cover photo

NOIS bots. Instruction

post image

The main criteria in running a fast drand-bot is being able to broadcast your tx as fast as possible in order to reach the proposer’s node asap before the other drand-bots.

This will allow your submission tx to be placed among the first 6 bots in the mempool of the proposer’s node. Obviously you need a good cpu and a fast connection that is very close to an rpc node. Your rpc node needs to be fast in the network and eventually needs to have fast direct peers so it can reach the proposer before the competitor drand-bot operators.

Read more here https://docs.nois.network/use-cases/for-bot-runners

Nois Randomness Dashboard Site Docs Discord Twitter

Explorers:

Sr20de Explorer Nodes.Guru NodeStake

Official Docs:

I’ll show you how to run a bot using NodeJs.

Requirements

The bot will run on a simple configuration 2/2/10. The main requirement is that your hosting must have a very fast internet, as the bot that sends the transaction first wins.

Installation

Get a nois wallet and save the mnemonic from it, as we will need it later. After that, go to Discord and request tokens from Faucet. They are needed to pay commissions.

Update:

sudo apt update && sudo apt upgrade -y

Install NodeJs and required packages:

sudo apt install -y git htop joe jq \
  && wget -O nodejs.deb https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.17.1-deb-1nodesource1_amd64.deb \
  && sudo dpkg -i nodejs.deb \
  && sudo npm install pm2 -g

Installing the bot:

git clone https://github.com/noislabs/nois-bot.git \
  && cd nois-bot \
  && npm install

Renaming env file:

cp .env.example .env

The .env — file is the bot’s settings file. Open it in Mobaxtern editor or Nano to make changes:

post image
  • Mnemonic — insert the mnemonic of your wallet

  • ENDPOINT, ENDPOINT2, ENDPOINT3 —insert RPC servers here. You can leave 1, you can enter all 3 and the bot will automatically send transactions through the fastest RPC of these three. You can enter here both RPC of your node and others.

  • **Moniker **—name of your bot, which will be displayed in https://randomness.nois.network

Save the .env file and run the bot:

pm2 start index.js && pm2 logs --lines 100

In the logs bot will show your address and group:

post image

In the Discord in the drang-bots channel, write the address and group so that the admin will add yours to the white list. Until this happens, you will appear grayed out on https://randomness.nois.network and will not be able to claim the reward.

Useful Commands:

cd $HOME/nois-bot && pm2 logs --lines 100

#show logs
pm2 logs --lines 100

#restart
pm2 restart index

#restart and show logs
pm2 restart index && pm2 logs --lines 100

#stop bot
pm2 stop index