✔️[Mainnet] Run Validator Node from prebuilt binary

Apply to become a mainnet validator before proceeding with the steps below.

Learn the benefits and risks of validating by viewing the Mainnet Validator Program.

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 20.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 to ensure they can 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 - 32GB to 64GB RAM

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 to be equal to other validators running the standard.

2. Download and extract binary file

  • Windows (future release, not yet available)

  • MacOS (future release, not yet available)

a) Once downloaded, verify the md5 hash to double check you are using the right binary:

md5sum ./glitch-node.xz

And you should see the following hash in the command line: 354be9a571180342920382db048f932c

If you see a different hash above, do not progress with the next steps below

b) create a folder, ‘glitch’, by typing: mkdir glitch

c) Copy the binary to the folder just created above and go there by typing:

mv glitch-node.xz glitch

cd glitch

c) extract and unzip the binary file you’ve downloaded above by typing the command: xz -v -d glitch-node.xz

d) give execution privileges to the binary file:

chmod +x ./glitch-node

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:

1nohup ./glitch-node --pruning=archive --chain mainnet &

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 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.

1nohup ./glitch-node --validator --name "validator name" --chain mainnet &

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. Create your account to hold GLCH native tokens

  1. Access the UI: Substrate Portal

  2. Go to Accounts/Accounts

  3. Click on Add Account

  4. Save in a safe place the mnemonic words (BACK IT UP very SECURELY)

  5. Check the ‘I have saved my mnemonic seed safely’

  6. Click Next

  7. Enter name: whatever-you-want to uniquely identify this account, password: any password you like. We suggest it contains at least a number, a symbol, and upper/lower case letters and at least 12 characters long

  8. Click Next

  9. Click Save

The account you’ve just created is now available in your browser's local storage, protected by the password you’ve set in step 7.

You should see a .json file downloaded to your local machine; this also contains your account details (encrypted with the password you’ve chosen in step 7.) PLEASE BACK IT UP. IMPORTANT: If you ever lose access to the .json file above, you can always recover your account using the mnemonic phrase you should have backed up in step 4. If you forget the password you’ve set in step 7 and have the mnemonic words available, you can re-create your account, so this won’t be an issue. If you ever lose/forget both the password and the mnemonic phrase, then THERE IS NO WAY for you to recover your account and all the funds stored there. So it is very important for you to save the mnemonic phrase and have it securely stored and available.

5. Receive GLCH native tokens on MAINNET

  1. You will need at least 88,888 GLCH native tokens (plus network fees) to be able to stake and become a validator node (~90,000 GLCH)

  2. If you applied to become one of the validators and were accepted, you can share the MAINNET account address you’ve created in step 4. to exchange your ERC-20 GLCH tokens for GLCH native tokens (you will need 88,890 GLCH native tokens to cover the network fees)

  3. Once you’ve shared your MAINNET account with the Glitch team and they confirm they’ve sent you the GLCH native tokens, you are ready to proceed with step 6. below

6. Generate Session keys and bond GLCH

  • Generate session key for your local node

1curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys"}' http://localhost:9933/

  • Go to “Network/ Staking/Account action”, choose +Validator (since you are adding a validator)

  • Select as both stash and controller account the same account, which you’ve created in step 4.

  • Bond any amount you want (required minimum is GLCH 88,888.00) and click Next.

  • Add session Key and click ‘Bond & Validate’

  • And wait for 1 era (approx. one day). If you pass all conditions, your node will become a validator next era.

Last updated