Starting a Validator

Configure the Nexis Network CLI

The Nexis Network cli includes get and set configuration commands to automatically set the --url argument for cli commands. For example:

Nexis-network config set --url https://testnet.Nexisscan.io/rpc

While this section demonstrates how to connect to the Devnet cluster, the steps are similar for the other Nexis Network Clusters.

Confirm The Cluster Is Reachable

Before attaching a validator node, sanity check that the cluster is accessible to your machine by fetching the transaction count:

Nexis-network transaction-count

Confirm your Installation

Try running following command to join the gossip network and view all the other nodes in the cluster:

Nexis-gossip spy --entrypoint bootstrap.testnet.Nexisscan.io:8001
# Press ^C to exit

Enabling CUDA

If your machine has a GPU with CUDA installed (Linux-only currently), include the --cuda argument to Nexis-network-validator.

When your validator is started look for the following log message to indicate that CUDA is enabled: "[<timestamp> Nexis::validator] CUDA is enabled"

System Tuning

Linux

Automatic

The Nexis Network repo includes a daemon to adjust system settings to optimize performance (namely by increasing the OS UDP buffer limits, and scheduling PoH with realtime policy).

The daemon (Nexis-sys-tuner) is included in the Nexis Network binary release. Restart it, before restarting your validator, after each software upgrade to ensure that the latest recommended settings are applied.

To run it:

sudo Nexis-sys-tuner --user $(whoami) > sys-tuner.log 2>&1 &

Manual

If you would prefer to manage system settings on your own, you may do so with the following commands.

Increase UDP buffers

sudo bash -c "cat >/etc/sysctl.d/20-Nexis-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"
sudo sysctl -p /etc/sysctl.d/20-Nexis-udp-buffers.conf

Increased memory mapped files limit

sudo bash -c "cat >/etc/sysctl.d/20-Nexis-mmaps.conf <<EOF
# Increase memory mapped files limit
vm.max_map_count = 500000
EOF"
sudo sysctl -p /etc/sysctl.d/20-Nexis-mmaps.conf

Add

LimitNOFILE=500000

to the [Service] section of your systemd service file, if you use one, otherwise add it to /etc/systemd/system.conf.

sudo systemctl daemon-reload
sudo bash -c "cat >/etc/security/limits.d/90-Nexis-nofiles.conf <<EOF
# Increase process file descriptor count limit
* - nofile 500000
EOF"
### Close all open sessions (log out then, in again) ###

Generate identity

Create an identity keypair for your validator by running:

Nexis-network-keygen new -o ~/validator-keypair.json

The identity public key can now be viewed by running:

Nexis-network-keygen pubkey ~/validator-keypair.json

Note: The "validator-keypair.json” file is also your (ed25519) private key.

Paper Wallet identity

You can create a paper wallet for your identity file instead of writing the keypair file to disk with:

Nexis-network-keygen new --no-outfile

The corresponding identity public key can now be viewed by running:

Nexis-network-keygen pubkey ASK

and then entering your seed phrase.

See Paper Wallet Usage for more info.

Last updated

Logo

Copyright 2022 @ Exzo Network