Installation

To install the OneFinity Network validator node on your local machine, follow these steps. First, ensure you have configured user permissions, script settings, and keys. The Validator script, which you'll use to manage your node, supports Mainnet, Devnet, and Testnet.

Install Your Node(s)

Run the following commands:

cd ~/of-chain-scripts
./script.sh

Upon completing the previous step, a menu will appear offering several options. Choose option 1 to proceed with the installation of the node.

 1) install
 2) observing_squad
 3) upgrade
 4) upgrade_squad
 5) upgrade_proxy
 6) remove_db
 7) start
 8) stop
 9) cleanup
 10) github_pull
 11) add_nodes
 12) get_logs
 13) benchmark
 14) quit
 Please select an action:1

NOTE

Alternatively, you can trigger the installation by running this command:

~/of-chain-scripts/script.sh install
  • Indicate the number of nodes you want to run, i.e. 1

  • Indicate the name of your validator, i.e. OneVal

  • Exit without starting (we need keys first) by using 14 - quit

Prepare your keys​:

Create a new folder "VALIDATOR_KEYS" to serve as a local backup when updating:

cd ~
mkdir -p ~/VALIDATOR_KEYS

Generate a certificate file containing your Validator key by running the keygenerator:

./onefinity-utils/keygenerator

Copy the generated validatorKey.pem file to the config folder of your node(s), and repeat for each node.

cp validatorKey.pem ~/onefinify-nodes/node-0/config/

NOTE

Each node needs its unique validatorKey.pem file

To ensure your node can restart smoothly after an upgrade, transfer the validatorKey.pem file, compressed in a ZIP format, to the $HOME/VALIDATOR_KEYS/ directory. It's crucial that each node possesses a distinct validatorKey.pem file, repeat for each node:

zip node-0.zip validatorKey.pem
mv node-0.zip $HOME/VALIDATOR_KEYS/

For instructions on backing up and protecting your keys, see the Management section.

Start the node(s)​:

~/of-chain-scripts/script.sh start

Start the node visual interface​:

After your node is running, monitor its status through the TermUI interface. Go to $HOME/onefinity-utils, then launch TermUI for each node:

cd $HOME/onefinity-utils
./termui -address localhost:8080

NOTE

When setting up your environment, you will start with your first node, named node-0, which operates as a REST API and listens on port 8080 by default. Following node-0, you will configure node-1 to run on port 8081, and you'll continue this pattern for any subsequent nodes, incrementing the port number by one each time.

Update your node(s)​:

To upgrade your node, run the provided script and choose one of the available options.

  • 10 - github_pull downloads the latest version of the scripts

  • 3 - upgrade

  • 7 - start

  • 14 - quit

~/of-chain-scripts/script.sh

These are the basic steps. Please carefully read the on-screen instructions and refer to the script's README file. You can also ask questions in the OneFinity Validators chat.

Secure Your Node: Protect Your Private Keys

To ensure you maintain control over your node, it is crucial to safeguard your private keys. Without them, your ability to manage your node effectively is compromised. Additionally, if a third party gains access to your private keys, you could face a significant financial loss. Therefore, it's important to exercise caution and prioritize the security of your keys.

Creating a Safe Backup

  1. It's recommended to store a backup of your private keys in a secure location outside the server running your nodes.

  2. Locate your keys within the folder path: $HOME/onefinity-nodes/node-0/config. If you operate multiple nodes (referred to as β€œn” nodes), ensure you follow this step for each one.

  3. Implement strict access controls and encryption to enhance the security of the backup.

By taking these preventative measures, you can better protect your node and secure your investment.

Choosing a custom configuration tag or branch​

WARNING

This option should only be used for debugging or testing ahead of a pre-release tag. Use it at your own risk!

The power of the scripts set has been leveraged with a new addition: the possibility to tell the scripts a specified tag or branch (not recommended using a branch due to the fact that an unsigned commit might bring malicious code or configs)

To accomplish this, edit the variables.cfg file

cd ~/of-chain-scripts/config
nano variables.cfg
MUST BE CONFiRMED WHEN WE HAVE THE NETWORK IN TESTNET

locate the OVERRIDE_CONFIGVER option and input a value there, something like tags/T1.3.14.0. The tags/ prefix will tell the scripts to use the tag and not search a branch called T1.3.14.0. Call the upgrade command on the scripts to install the desired configuration version.

Resetting the value to "" will make the scripts to use the released version.

WARNING

The OVERRIDE_CONFIGVER is not backed up when calling github_pull operation.

Last updated