Skip to main content
Version: mainnet (v0.75)

Set up non validator node

The main reason to run a non validator node is to support a data node. We strongly discourage you from running a data node with a validator node.

A non validator node is similar to a validator node except it does not take part in the consensus process and does not require staking or wallets. It will receive all the same blockchain events as the validator nodes and will process them in the same way but it does not affect how the network runs.

OS and software

For production use, we recommend using the Linux binary on Ubuntu as this is the platform used by nodes on Fairground, the Vega testnet, and is the most widely tested so far.

See the infrastructure requirements page for a full list of what you need to run various parts of the Vega toolchain.

There are 2 ways to start up a non validator node:

  • Replay the full chain from the start
  • Use a snapshot from the existing network to jumpstart the node at a point closer to the current block height

Replay the full chain if you want all history. Use a snapshot if you want to start running quickly and don't need the history.

Start node from block 0

  1. Download version 0.71.4 of the Vega executable. You can find it on its release page in the Vega GitHub repo ↗. Unzip this file and make sure it is in your command line path.

If you prefer to build the code yourself, the instructions can be found inside the code repo at BUILDING ↗.

  1. Check it is working by trying:
user@veganode:~/vega/bin$ vega version
Vega CLI v0.71.4 (8e5767b20902097c79e8c846cf37f2b5d01dbff8)

  1. Initialise the node
vega init --home=$YOUR_VEGA_HOME_PATH --tendermint-home=$YOUR_TENDERMINT_HOME_PATH full

This creates a set of configuration files which you then need to alter for your specific instance.

  1. Edit the file $YOUR_TENDERMINT_HOME_PATH/config/config.toml. Find the RPC address located in the configuration point [rpc]->laddr
  2. Use this value to update the address in the file $YOUR_VEGA_HOME_PATH/config/node/config.toml
 [Blockchain.Tendermint]
RPCAddr = <RPC address>

Request peers

  1. Build a list of Tendermint peers by reaching out to existing node operators as they can provide the data, on the Vega Discord for example. You'll need to format the peers data as a comma separated list.

  2. Open the config file $YOUR_TENDERMINT_HOME_PATH/config/config.toml and update the value persistent_peers with the list created above.

  3. Change the following fields, if needed:

  [p2p]
max_packet_msg_payload_size=16384
[Mempool Configuration Option]
broadcast = true
  1. Then start the node with the following command:
vega start --home=$YOUR_VEGA_HOME_PATH --tendermint-home=$YOUR_TENDERMINT_HOME_PATH --network-url=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/genesis.json

Start a node using a remote snapshot

  1. Connect to the running network and see which snapshots are available using the snapshots endpoint https://api.vega.community/api/v2/snapshots. Record the latest blockHash, the blockHeight and the coreVersion for that blockHeight.

  2. From the Vega GitHub repo ↗, download the version of Vega that matches the coreVersion. Unzip the executable and make sure it is in the command path.

  3. Test it works

user@veganode:~/vega/bin$ vega version
Vega CLI v0.71.6 (7a23f5e2f0fb4981c8318253142e2e23e3aa4f7c)
  1. Initialize the node
vega init --home=$YOUR_VEGA_HOME_PATH --tendermint-home=$YOUR_TENDERMINT_HOME_PATH full

This creates a set of configuration files which you then need to alter for your specific instance.

  1. Edit the file $YOUR_TENDERMINT_HOME_PATH/config/config.toml and find the RPC address located in the configuration point [rpc]->laddr

  2. Use this value to update the address in the file $VEGA_PATH/config/node/config.toml

  [Blockchain.Tendermint]
RPCAddr = <RPC address>

Request peers

  1. Build a list of Tendermint peers by reaching out to existing node operators as they can provide the data, on the Vega Discord for example. You'll need to format the peers data as a comma separated list.

  2. Open the config file $TENDERMINT_PATH/config/config.toml and update the value [p2p] -> persistent_peers with the list created above

  3. Set the following values:

  [p2p]
max_packet_msg_payload_size=16384
pex = true
seeds = "b0db58f5651c85385f588bd5238b42bedbe57073@13.125.55.240:26656,abe207dae9367995526812d42207aeab73fd6418@18.158.4.175:26656,198ecd046ebb9da0fc5a3270ee9a1aeef57a76ff@144.76.105.240:26656,211e435c2162aedb6d687409d5d7f67399d198a9@65.21.60.252:26656,c5b11e1d819115c4f3974d14f76269e802f3417b@34.88.191.54:26656,61051c21f083ee30c835a34a0c17c5d1ceef3c62@51.178.75.45:26656,b0db58f5651c85385f588bd5238b42bedbe57073@18.192.52.234:26656,36a2ca7bb6a50427be2181c8ebb7f62ac62ebaf5@m2.vega.community:26656,9903c02a0ff881dc369fc7daccb22c1f9680d2dd@api0.vega.community:26656,9903c02a0ff881dc369fc7daccb22c1f9680d2dd@api0.vega.community:26656,32d7380b195c088c0605c5d24bcf15ff1dade05f@api1.vega.community:26656,4f26ec99d3cf6f0e9e973c0a5f3da87d89ec6677@api2.vega.community:26656,eafacd11af53cd9fb2a14eada53485779cbee4ab@api3.vega.community:26656"
[mempool]
broadcast = true
[statesync]
enable = true
trust_height = blockHeight from step 1
trust_hash = Blockhash from step 1
rpc_servers = "m3.vega.community:26657,api1.vega.community:26657"
  1. Start the node with the following command:
vega start --home=$YOUR_VEGA_HOME_PATH --tendermint-home=$YOUR_TENDERMINT_HOME_PATH --network-url=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/genesis.json

Upgrade your node using Visor

We strongly recommend using the tool Visor to start up the Vega node as it will transparently take care of upgrading the node as new versions of the software are required. Learn more about it on the Visor page.

During the replay process, the node will require newer versions of the software at the same block height that the nodes were upgraded previously. As an example: If the chain was upgraded from version 0.12.3 to 0.12.4 at block 123456, everyone running this network would need to have version 0.12.3 when they process block 123456 and then have version 0.12.4 when they process block 123457.

  1. Download the latest version of Visor from the Vega releases page ↗. Unzip it and make sure it is in your command path.

  2. Test it with the command:

user@veganode:~/vega/bin$ visor version
Vega Visor CLI v0.72.10 (26afd41a2fe4cb20f3fffeae0d4cfe523fc35614)
  1. Initialise Visor
visor init --home=$YOUR_VISOR_HOME_PATH
  1. Edit the $YOUR_VISOR_HOME_PATH/config.toml file to tune the startup parameters
...
...

[autoInstall]
enabled = true
[autoInstall.asset]
name = "vega-linux-amd64.zip"
binaryName = "vega"
  1. Edit the $YOUR_VISOR_HOME_PATH/genesis/run-config.toml file to customize for your setup:
name = "genesis"

[vega]
[vega.binary]
path = "vega"
args = ["start",
"--home=$VEGA_PATH",
"--tendermint-home=$YOUR_TENDERMINT_HOME_PATH",
"--network-url=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/genesis.json"]
[vega.rpc]
socketPath = "/tmp/vega.sock"
httpPath = "/rpc"

See the Visor config documentation ↗ for more details on what you can configure and why.

  1. Copy the vega binary
cp $PATH_TO_DOWNLOADED_VEGA_BINARY $YOUR_VISOR_HOMEPATH/genesis/vega
  1. Link the genesis directory to the current - tell visor which folder to use
ln -s $YOUR_VISOR_HOMEPATH/genesis $YOUR_VISOR_HOMEPATH/current
  1. Start the node by running the command
visor --home=$YOUR_VISOR_HOME_PATH run