Skip to content

Latest commit

ย 

History

History
55 lines (39 loc) ยท 1.82 KB

README.md

File metadata and controls

55 lines (39 loc) ยท 1.82 KB

๐Ÿ”ฎ Flux Oracle Validator Node

โš ๏ธ This software is still in BETA and should not be used in production yet, beware of dragons ๐Ÿ‰

Features

  • Runs requests in parallel for maximum fee earning
  • Configurable staking amount
  • Automatic pruning of data to keep the node small
  • Automatic claiming of fees and unstaking unbonded outcomes
  • Re-staking on a mallicious stake

Installation

The validator node requires you to have node.js installed. After installing you can run:

npm install

After this you need to login with your near credentials using:

npm install -g near-cli
near login

Configuration

Copy the .env.example and name it .env and change the following options:

  • NEAR_MAX_STAKE_AMOUNT to the maximum amount you want to stake per resolution window. Default is 2.5 FLX
  • NEAR_CREDENTIALS_STORE_PATH to the path where your .near-credentials are stored. Must be the full path (Usually it's located in your home directory)
  • NEAR_ACCOUNT_ID to the account id you previously logged in with (using near login)
  • NEAR_CONTRACT_ID to the current oracle contract
  • NEAR_NETWORK_ID either testnet or mainnet

Running the node

npm start

If everything went correctly you should see something like the following:

2021-04-28 10:30:37 info: ๐Ÿค– Starting oracle node v1.0.0 for NEAR..
2021-04-28 10:30:37 info: ๐Ÿ›   Staking per request 2.50 FLX
2021-04-28 10:30:37 info: ๐Ÿ›   Listening to all contracts
2021-04-28 10:30:37 info: ๐Ÿ”„ Syncing for near starting from request id 0
2021-04-28 10:30:59 info: โœ… Syncing completed for near
2021-04-28 10:30:37 info: ๐Ÿ’ธ Balance: 1440800.53 FLX, Staking: 0.00 FLX, Profit: 0.00 FLX, Jobs actively watching: 0

It can take some time for syncing to complete. Once it's finished it will start looking for jobs and execute them.