Run a validator

The Nym validator was built in the Quickstart. If you haven’t yet built Nym and want to run the code, go there first.

Nym validators do two jobs:

  1. collaborate with each other to maintain a blockchain, using Tendermint. This contains information about what mixnodes exist, their current levels of stake, etc.
  2. hand out Coconut credentials to clients

We are moving from our old validators (in Go) to our new Rust codebase. The new Rust validators have little functionality at present. But you can still run them in order to get familiar with node operations.

To start a Nym validator once you’ve built the platform code, do the following.

Download the latest Tendermint release onto your server. Rename it tendermint for simplicity.

Copy the nym-validator binary from the target/release directory up to your server.

./nym-validator init --id my-validator
./nym-validator run --id my-validator

A successful start looks like this:

      _ __  _   _ _ __ ___
     | '_ \| | | | '_ \ _ \
     | | | | |_| | | | | | |
     |_| |_|\__, |_| |_| |_|
            |___/

             (validator - version 0.7.0)

    
Starting validator my-validator...
Validator startup complete.
* starting REST API on http://localhost:3000
* starting Tendermint abci

Then start Tendermint, which handles the blockchain:

./tendermint init
./tendermint node

When you run tendermint node, a Tendermint node will start up and connect via TCP socket to the Nym validator. You will see additional messages when this happens:

 2020-05-05T17:30:42.143 INFO  abci::server > Got connection! TcpStream { addr: V4(127.0.0.1:26658), peer: V4(127.0.0.1:44870), fd: 100 }
 2020-05-05T17:30:42.143 INFO  abci::server > Got connection! TcpStream { addr: V4(127.0.0.1:26658), peer: V4(127.0.0.1:44872), fd: 101 }
 2020-05-05T17:30:42.144 INFO  abci::server > Got connection! TcpStream { addr: V4(127.0.0.1:26658), peer: V4(127.0.0.1:44874), fd: 102 }

That’s all there is to it for a simple one-node validator setup.

You will need to cooperate with other validator node operators to join the testnet. This requires some manual setup. Please visit us in the channel nymtech.friends#general on KeyBase to talk about getting set up as a validator.