Skip to content

buidly/onefinity-testnet-validators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Onefinity First Validator Setup Guide

Overview

This repository contains the necessary tools and instructions to deploy Onefinity validator and observer nodes, as well as adding new validator nodes after genesis. The binary files are already compiled and ready to use. Please follow the instructions below to set up and manage your Onefinity validator or observer node.


Contents


Supported Operating Systems

The setup and configuration steps outlined in this documentation have been tested on Ubuntu 22.04 LTS and above. While other Linux distributions may work, they are not officially supported or tested.


Download Binaries

Before installing or configuring anything else, you must download the precompiled binaries:

./download.sh

Go

We also need an instance of already prepared go due to some shared libraries

Remove old go and install the new one

sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go-onefinity.tar.gz

export PATH=$PATH:/usr/local/go/bin

Check if go is installed

go version

Verify missing libraries on node binary

ldd ./node

you might see those 2 lines

libvmexeccapi.so => not found libwasmer_linux_amd64.so => not found

Find path of

buidly/[email protected]/wasmer2/libvmexeccapi.so
buidly/[email protected]/wasmer/libwasmer_linux_amd64.so

Copy (or Symlink) Libraries to a Standard Path

find /usr/local/go -name "libvmexeccapi.so" 2>/dev/null
find /usr/local/go -name "libwasmer_linux_amd64.so" 2>/dev/null

sudo cp /usr/local/go/path/to/libvmexeccapi.so /usr/local/lib/
sudo cp /usr/local/go/path/to/libwasmer_linux_amd64.so /usr/local/lib/

(Adjust the paths accordingly.)

Update the linker cache:

sudo ldconfig

Run

ldd ./node

Onefinity Validator Setup

Each validator node should have the following files and folders:

  • validatorKey.pem (or allValidatorsKey.pem if a multisig node): The validator key used to deploy the node.
  • config folder: Contains the configuration files required to run the node.

Onefinity Validator/Observer Node Start

Follow the commands below to start a Onefinity validator node with the configuration from the config folder. Make sure you use the correct validator key or multisig key (allValidatorsKey.pem).

Single Key Validator

./node \
  --profile-mode \
  --log-save \
  --log-level "*:DEBUG" \
  --log-logger-name \
  --log-correlation \
  --use-health-service \
  --rest-api-interface "localhost:9501" \
  --working-directory "~/working-dir/validator" \
  --config-external "./config/external_validator.toml" \
  --config "./config/config_validator.toml" \
  --validator-key-pem-file "./config/validatorKey.pem"

Multi-Key Validator

./node \
  --profile-mode \
  --log-save \
  --log-level "*:DEBUG" \
  --log-logger-name \
  --log-correlation \
  --use-health-service \
  --rest-api-interface "localhost:9501" \
  --sk-index 1 \
  --working-directory "~/working-dir/validator" \
  --config-external "./config/external_validator.toml" \
  --config "./config/config_validator.toml" \
  --all-validator-keys-pem-file ./config/allValidatorsKey.pem

Observer

./node --port 21501 --profile-mode --log-save --log-level *:INFO --log-logger-name --log-correlation --use-health-service --rest-api-interface localhost:8080 --working-directory ~/working-dir --config-external ./config/external_observer.toml --config ./config/config_observer.toml

Install mxpy

To interact with the blockchain and make transactions, you need to install mxpy. You can find more detailed installation instructions and additional setup steps for mxpy here.

Configure mxpy Address HRP

mxpy config set default_address_hrp one


For the validator pem to interact with the mxpy we need to create a json with the path having the following structure

{
  "validators": [
    {
      "pemFile": "validatorKey.pem"
    }
  ]
}

How to Add a New Validator Node After Genesis

mxpy validator stake \
  --pem=walletKey.pem \
  --value="2500000000000000000000" \
  --validators-file=validator.json \
  --proxy="https://gateway.validators.onefinity.network" \
  --gas-limit 25000000 \
  --recall-nonce \
  --send

How to unstake a Validator Node After Genesis

mxpy validator unstake \
  --pem=walletKey.pem \
  --nodes-public-keys address \
  --proxy="https://gateway.validators.onefinity.network" \
  --gas-limit 25000000 \
  --recall-nonce \
  --send

How to unjail a Validator

mxpy validator unjail \
  --pem=config/walletKey.pem \
  --value="2500000000000000000" \
  --nodes-public-keys address \ 
  --proxy="https://gateway.validators.onefinity.network" \
  --gas-limit 25000000 \
  --recall-nonce \
  --send

Chain links

https://api.validators.onefinity.network https://gateway.validators.onefinity.network https://rpc.validators.onefinity.network https://index.validators.onefinity.network https://explorer.validators.onefinity.network https://ercwallet.validators.onefinity.network https://litewallet.validators.onefinity.network

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages