Exzo Network Node Validator Setup Guide

Exzo Network
11 min readAug 7, 2023

--

In this tutorial, you’ll learn how to set up a node validator for the Exzo Network, a decentralized, scalable, and secure blockchain. We will guide you through the process of installing the Exzo Network Tool Suite, setting up the necessary dependencies, configuring and building the source code, and establishing a connection to the Exzo cluster.

You will also learn how to join the gossip network to view active nodes, system tuning to increase performance, and create your identity on the Exzo network. This guide assumes you have some familiarity with command-line interfaces and basic knowledge of blockchain concepts.

Following these steps will provide you with the tools and knowledge to contribute to the Exzo network as a validator, playing a vital role in maintaining and securing the network.

Requirements for proper setup

1. Node.js

2. Rust

3. Git

4. WinRar or 7zip (Windows only)

Prerequisite's guides:

Be sure to install all the necessary prerequisites for an easy to follow tutorial. Mac devices come with an uncompress tool called Archive Utility App so when you right click a compressed folder just click “open with” and select the green folder icon named Archive Utility.

Install Node.js on Mac using the terminal:

Step 1. Mac: Hit F4 on your keyboard then type terminal in the search bar and click it to open it.

If you don’t have Homebrew installed I recommend installing it using this command below:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then install wget using this command:

brew install wget

Step 2. Install Node.js

Install Node.js on Mac

brew install node

Install Node.js on Windows

Follow this guide: https://www.geeksforgeeks.org/installation-of-node-js-on-windows/

Step 3. Install Git

Mac Installation:

Mac computers should have Git installed already. You can check to see if Git is installed by running the command below.

git version

git version

Output:

git version 2.32.1 (Apple Git-133)

Windows Installation:

For Windows computers you can visit this tutorial link below or follow our guide.

Step 1. Visit https://gitforwindows.org/

Then click the blue Download button highlighted in the image below.

Exzo Node Validator Setup Tutorial

Step 1. Install the Exzo Network Tool Suite

Here, you’re setting up your environment for working with the Exzo network. You’re creating a new directory on your Desktop, called Node-Validator, and inside this directory, you’re cloning the Exzo network’s GitHub repository.

Open your terminal

Mac: Hit F4 then search for terminal

Windows: Windows key + R

Navigates to the Desktop directory

cd Desktop
mkdir Node-Validator

Navigates to the Node Validator folder you just created

cd Node-Validator

Clone the GitHub repository

Git clone https://github.com/ExzoNetwork/Exzo-Network-Blockchain.git

Step 2. Install the dependencies needed

Rust is the programming language that Exzo is built in, so you need to install Rust and its related tools onto your machine. These commands install Rust, set the necessary environment variables, add the Rust formatting component (which is required for compiling some parts of the Exzo codebase), and update your Rust installation to the latest version.

curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup component add rustfmt
rustup update

Step 3. Building the source code and moving into proper directory

This step involves compiling the Exzo network’s code and moving into the directory that contains the compiled code. This directory is where you’ll run the Exzo network’s tools from.

cd Exzo-Network-Blockchain
cargo build - release
cd target/release

see a list of commands you can use

exzo help

Step 4. Setting up the CONFIGURATION and checking it

You’re setting your local Exzo configuration to connect to the Exzo network’s testnet. You’re also verifying that the configuration has been set up correctly.

Connect CLI with Exzo Testnetusing Exzo config set command

./exzo config set --url https://rpc-test-1.exzo.network/rpc --config /Users/screadore/.config/exzo/cli/config.yml

Checking the configuration of the cluster

./exzo config get

Output

Config File: /Users/screadore/.config/exzo/cli/config.yml
RPC URL: https://rpc-test-1.exzo.network/rpc
WebSocket URL: wss://rpc-test-1.exzo.network/rpc (computed)
Keypair Path: my-exzo-network-ledger
Commitment: confirmed

Step 5. Check if the cluster is connected and reachable

Here, you’re checking that your local setup can successfully connect to the Exzo network’s testnet. You’re checking the transaction count and the version of the cluster to verify the connection.

Confirm the cluster Is reachable and checks your software/cluster version by running the commands below.

exzo transaction-count
exzo cluster-version

Step 6. Join the gossip network to view a list of active nodes

This step allows your local setup to join the Exzo network’s gossip network. The gossip network is used to spread information throughout the Exzo network, such as information about transactions and blocks.

exzo-gossip spy --entrypoint bootnode-test.exzo.network:8001

The output below is displayed when you join the gossip network and try to view all the other nodes in the cluster.

Output of exzo-gossip spy — entrypoint

Step 7. System tuning

You’re increasing the size of your system’s UDP buffers. This might help your local setup handle more network traffic and thus perform better when interacting with the Exzo network.

UDP, or User Datagram Protocol, is a protocol used for low-latency, loss-tolerating connections between applications on the internet. Unlike TCP, it doesn’t provide guaranteed delivery of data, but it’s faster because it has fewer checks and balances.

The buffers are used to temporarily store packets of data as they are being sent or received. When an application sends or receives data over a network, it is usually split up into smaller chunks known as packets. These packets are stored in buffers until they are transmitted over the network or processed by the application.

[exzo@node ~]$ sudo bash -c "cat >/etc/sysctl.d/20-exzo-udp-buffers.conf <<EOF
> # Increase UDP buffer size
> net.core.rmem_default = 134217728
> net.core.rmem_max = 134217728
> net.core.wmem_default = 134217728
> net.core.wmem_max = 134217728
> EOF"
[exzo@node ~]$ sudo sysctl -p /etc/sysctl.d/20-exzo-udp-buffers.conf
[sudo] password for exzonode:
net.core.rmem_default = 134217728
net.core.rmem_max = 134217728
net.core.wmem_default = 134217728
net.core.wmem_max = 134217728

Step 8. Create your identity/wallet

In this step, you’re generating a new key pair for your Exzo identity. This key pair will be used to identify your validator on the network. It’s essential to save the seed phrase in a secure place as you will need it to recover your key pair in case you lose it.

exzo-keygen new -o ~/validator-keypair.json

Output should look like this:

Wrote new keypair to /Users/screadore/new-validator-keypair.json
=========================================================================
pubkey: 6DfdT2345soktJnLAaN8ea8p5z8tixA2tVirs3cBSwNM
=========================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
tide cancel actress pave focus trial fantasy huge glow hour marble hurdle
=========================================================================

Copy and paste your pubkey somewhere easily accessible to make it easier in later steps.

Note: You will have to save both seeds, for your identity and

vote account, in the case you lose your seeds you will lose

control over the account, please be careful.

Check the identity of you account

exzo-keygen pubkey ~/new-validator-keypair.json

Output should be similar to this:

6DfdT2345soktJnLAaN8ea8p5z8tixA2tVirs3cBSwNM

Step 9. Configure the new keypair you just generated to the CLUSTER

After creating your identity, you need to configure your local Exzo setup to use this new identity. The exzo config set --keypair command is used to tell the Exzo command-line interface (CLI) to use your new keypair for future interactions with the network.

exzo config set --keypair ~/new-validator-keypair.json

Output should be similar to this

screadore@Stefans-iMac release % exzo config set --keypair ~/new-validator-keypair.json
Config File: /Users/screadore/.config/velas/cli/config.yml
RPC URL: https://rpc-test-1.exzo.network/rpc
WebSocket URL: wss://rpc-test-1.exzo.network/rpc (computed)
Keypair Path: /Users/screadore/new-validator-keypair.json
Commitment: confirmed

Step 10. Create your vote account

Here, you are generating a new key pair for your vote account using the Exzo key generation tool. The output of this command is a JSON file containing your new key pair. It also displays a seed phrase which you can use to recover this key pair.

exzo-keygen new -o ~/my-vote-account-keypair.json

Output:

Wrote new keypair to /Users/screadore/my-vote-account-keypair.json
==========================================================================
pubkey: CMmCQwU6vuyJxoJtW9JhCWWrcyCpg4uVTv4JxWNvfNoX
==========================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
broom winner govern pluck phone wrist dumb genuine mistake type love upset
==========================================================================

Step 11. Now that we have created our identity and vote account, it is time to link them to be able to

This step highlights the importance of having funds in the identity account. These funds are used to associate the identity and vote accounts in the network and to pay for transaction fees when your node participates in the network. You can display your public address using the command provided.

Identify ourselves in the network and synchronize our node.

To do this we will need some XZO native funds in the identity account aka the first wallet we created in Step 7.

This serves two functions:

1) Relate the identity account and the vote account in the next step (Create Vote account in the network).

2) Pay the commissions of the transactions in which the node participates.

You should have your public address noted down somewhere to access it easily, but if not you can run this command to display it:

exzo-keygen pubkey ~/new-validator-keypair.json

Step 12. Airdrop yourself some XZO tokens

Here, you’re using the Exzo command line tool to send (“airdrop”) a specific amount of XZO tokens to your account. The tokens are used to fund transactions and operations within the Exzo network.

./exzo airdrop 10001 REPLACE_THIS_WITH_YOUR_WALLET_ADDRESS -u https://rpc-test-1.exzo.network/rpc --faucet-host https://faucet.exzo.network

Example:

./exzo airdrop 10001 6DfdT2345soktJnLAaN8ea8p5z8tixA2tVirs3cBSwNM -u https://rpc-test-1.exzo.network/rpc --faucet-host https://faucet.exzo.network

Output

Signature: 2bN6mXgsQhuyJWCWAy6w21fx3J9KsdftZiC7ERZ7Cwyk6ghAsKZC9sRz1MMN311y2HmU4G7BWHnLWqFTKANbqT2n
10001 XZO

Step 13. Check your wallet balance

You can use this command to confirm that the airdrop from the previous step was successful by checking the balance of your Exzo account.

./exzo balance 6DfdT2345soktJnLAaN8ea8p5z8tixA2tVirs3cBSwNM

Step 14. Create your withdrawer account keypair

A new keypair is created for the account that will be used to withdraw funds. This step is similar to Step 9, but for a different account.

exzo-keygen new -o ~/withdrawer-keypair.json

Output should look like this:

Wrote new keypair to /Users/screadore/withdrawer-keypair.json
======================================================================
pubkey: yveKKCRYorZXNfHAK4VcDXV3jzbXGLKaUTmWwHr9u6t
======================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
fall wide scrap pair trim aspect lake vacant ecology invest hunt argue
======================================================================

Step 15. Now that we have XZO in the identity account we can now create the vote account

After ensuring that there are sufficient XZO in the identity account, you’re creating a vote account in the network. This vote account is linked to your identity and withdrawer accounts.

exzo create-vote-account ~/my-vote-account-keypair.json ~/validator-keypair.json yveKKCRYorZXNfHAK4VcDXV3jzbXGLKaUTmWwHr9u6t --commission 1

Output

Signature: 3Ec294R7uq8h3nRyQkBmDtzjLyLBSFNFS3KJnjFdZFXmtZC7ccXs1uof38uWZ9kdLpJ9SGUhcBkLzcp67CFjspir

Note: If you are using an identity stored in a paper wallet instead of a Keypair system file on your

computer, replace ~/validator-keypair.json for ASK which will suggest you enter your seed corresponding to the identity account.

Keypair files are stored on your computer and therefore can be exposed in case your security is compromised, only send a sufficient amount of XZO

Native to pay commissions for a period of time, 1–3 months, an amount of 100–300 XZO should be sufficient for a considerable period of time.”

Step 16. Send tokens to your vote account

This step involves transferring XZO tokens from the identity account to the vote account. This is a necessary step to fund the operations of the vote account in the Exzo network.

exzo transfer --from ~/new-validator-keypair.json CMmCQwU6vuyJxoJtW9JhCWWrcyCpg4uVTv4JxWNvfNoX 0.5 --url https://rpc-test-1.exzo.network/rpc --fee-payer ~/new-validator-keypair.json

Step 17. Connect your validator

This step involves running the Exzo validator node with the proper parameters. These parameters include information about your identity and vote accounts, as well as network parameters such as the RPC port and entrypoint. There are different options available depending on whether or not your system is equipped with a compatible GPU and CUDA.

The command that allows executing the node is “exzo-validator” if you write it in the console you will be

able to see all the possible arguments and options when executing your node.

  • If your computer does not have a GPU or is not compatible with CUDA, you should not add — cuda in the command line.
  • By default, the ledger will grow until there is no more space left on the hard drive, adding the arg — limit-ledger-size we will limit the file to a maximum of 500 GB.
  • You can control the range of ports that the node will use to connect, by default it is recommended to open port range 8000–10000.
  • Make sure your system clock is synchronized.

On Mac run the following commands:

  1. Create the configuration file:
cat > newsyslog.exzo.conf <<EOF
~/exzo-validator.log 644 7 * $D0 J
EOF

This configuration file will keep 7 archived log files (~/exzo-validator.log.0, ~/exzo-validator.log.1, ..., ~/exzo-validator.log.6). The $D0 J options tell newsyslog to compress (J) the log files and to rotate them every day ($D0).

2. Move the configuration file to the correct directory. This will require superuser permissions:

sudo mv newsyslog.exzo.conf /your-path-to-this-file/newsyslog.d/

3. There is no need to restart a service in this case. macOS will automatically pick up the new configuration file.

Note: Please be sure to double check your configuration and adjust the paths or rotation parameters as needed for your specific use case.

Use this command with a system without a compatible GPU or CUDA

screen exzo-validator --identity ~/new-validator-keypair.json --vote-account ~/my-vote-account-keypair.json --ledger /home/exzonode/ledger/ --rpc-port 8899 --dynamic-port-range 8000–8010 --entrypoint bootnode-test.exzo.network:8001 --limit-ledger-size --expected-shred-version 17211 --max-genesis-archive-unpacked-size 707374182 --log -

Use this command with a system with a compatible GPU or CUDA

screen exzo-validator --cuda --identity ~/new-validator-keypair.json --vote-account ~/my-vote-account-keypair.json --ledger /home/exzonode/ledger/ --rpc-port 8899 --dynamic-port-range 8000–8010 --entrypoint bootnode-test.exzo.network:8001 --limit-ledger-size --expected-shred-version 17211 --max-genesis-archive-unpacked-size 707374182 --log -

If the two commands above dont work try the one below. Also note that the path for “../../../../Desktop/exzovalidatornode/ledger/”

is to an empty file you need to create on your Desktop and you can rename the main folder whatever you prefer.

exzo-validator --identity ~/new-validator-keypair.json --vote-account ~/my-vote-account-keypair.json --ledger ../../../../Desktop/exzovalidatornode/ledger/ --rpc-port 8899 --dynamic-port-range 8000–8020 --entrypoint bootnode-test.exzo.network:8001 --limit-ledger-size --expected-shred-version 17211 --max-genesis-archive-unpacked-size 707374182 --log -

Optional configurations

1) “ — limit-ledger-size <size>” You can limit the size of the ledger to a

maximum of 100 GB by replacing <size> for 50,000,000, you can assign another value as long as it is higher.

2) “ — identity ASK” and/or “ — vote-account ASK” If you are using paper wallets instead of keypairs on

the system, you need to change the path to the corresponding file by the “ASK” argument.

Step 17. Check your node

Finally, you’re using the Exzo gossip tool to verify that your node is running properly. If all goes well, you should see your node in the list of active nodes in the Exzo network.

exzo-gossip spy - entrypoint bootnode-test.exzo.network:8001

You can also see the process on your server by running the command:

htop

If you need additional support please join our developer chat or message us on Twitter or Telegram.

Website: https://exzo.network

Documentation: https://docs.exzo.network

Developer Chat: https://t.me/Exzo_Network/515484

Twitter: https://twitter.com/exzo_network

GitHub: https://github.com/ExzoNetwork

--

--

Exzo Network

A Safe, Scalable, and Upgradeable Web3 Infrastructure featuring full EVM compatibility & Real-Time Transactions. Website: https://exzo.network