✔

[Testnet] Run Validator Node from prebuilt binary

1. Requirements

The most common way for a beginner to run a validator is on a cloud server running Linux. For this guide, we will be using Ubuntu 18.04, but the instructions should be similar for other platforms.
The transaction weights in Glitch were benchmarked on standard hardware. It is recommended that validators run at least the standard hardware in order to ensure they are able to process all blocks in time. The following are not minimum requirements but if you decide to run with less than this beware that you might have a performance issue.
Standard Hardware​​
  • CPU - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
  • Storage - A NVMe solid state drive. Should be reasonably sized to deal with blockchain growth. Starting around 80GB - 160GB will be okay for the first six months of Glitch but will need to be re-evaluated every six months.
  • Memory - 64GB.
The specs posted above are by no means the minimum specs that you could use when running a validator, however, you should be aware that if you are using less you may need to toggle some extra optimizations in order to be equal to other validators that are running the standard.

2. Download binary file

3. Synchronize Chain Data​​

Note: By default, Validator nodes are in archive mode. If you've already synced the chain not in archive mode, you must first remove the database with ./glitch-node purge-chain and then ensure that you run Glitch with the --pruning=archive option.
You may run a validator node in non-archive mode by adding the following flags: --unsafe-pruning --pruning <NUM OF BLOCKS>, a reasonable value being 1000. Note that an archive node and non-archive node's databases are not compatible with each other, and to switch you will need to purge the chain data.
You can begin syncing your node by running the following command:
1./glitch-node --pruning=archive
The --pruning=archive flag is implied by the --validator flag, so it is only required explicitly if you start your node without one of these two options. If you do not set your pruning to the archive node, even when not running in validator mode, you will need to re-sync your database when you switch.
Depending on the size of the chain when you do this, this step may take anywhere from a few minutes to a few hours.
If you are interested in determining how long you have to go, your server logs (printed to STDOUT from the glitch process) will tell you the latest block your node has processed and verified. You can then compare that to the current highest block via Explorer.
Once your node is fully synced, stop the process by pressing Ctrl-C. At your terminal prompt, you will now start running the node.
1./glitch-node --validator --name "validator name"
You can give your validator any name you like, but note that others will be able to see it, and it will be included in the list of all servers using the same telemetry server. Since numerous people are using telemetry, choosing something likely to be unique is recommended.

4. Generate Session keys and bond GLCH

  • Generate session key.
1curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys"}' http://localhost:9933/
  • Staking account. Use Substrate Portal.
  • Go to “Network/ Staking/Account action”, and choose Validator.
  • Bond some amount and click Next.
  • Add session Key and commission.
  • And wait for 1 era. If you pass all conditions, your node will become a validator in the next era.