Running a Nodle Chain Node

Running a Nodle Chain Node
  • Last updated on February 14, 2020  by @Eliott T
  • Public Version


Requirements


  • Have a secured server
  • Have some technical experience
  • Make sure you have docker available

Recipe


Using Polkadot{.JS} with the Nodle Testnet

You can go to https://polkadot.js.org/apps to access an interface to the network, however you need to point the interface to our public node or one of yours. To do so you can:
  1. Got to Settings
  1. Select custom endpoint
  1. Type in the text field wss://testnet.nodleprotocol.io
  1. Click Save

Starting the node

  1. Login to the Github Package Registry: docker login docker.pkg.github.com --username YOUR_GITHUB_USERNAME.
  1. Create the data directory: mkdir nodle && sudo chown -R 1000:1000 nodle.
  1. Start your node with docker run --restart always --name nodle-node -v $(pwd)/nodle:/data -p 30333:30333 -d docker.pkg.github.com/nodlecode/chain/nodle-chain.

  • If you only want to run a node you can stop here, your node will synchronize itself and become available, you can expose the port 9944 to connect to your node through https://polkadot.js.org/apps.

Generating validator account

So far the recommended way to manage your account keys is by using the polkadot{.js} browser extension, you can install it from https://github.com/polkadot-js/extension.

Once the extension is installed you can create a new account by following its instructions, be sure to backup your keys.

  • Later it will be possible to do this with a Ledger Hardware Wallet.

Registrating your server on the chain

A validator node needs a bunch of keys to operate:
Name
Description
Node Key
Used to protect communications between nodes, need to be saved and reused only for bootnodes.
Babe Key
Used for consensus purposes (verifying and authoring blocks).
GrandPa Key
Used for consensus purposes (verifying and authoring blocks).
Im Online Key
Used for consensus purposes (to know which validator is online and eventually punish it if it becomes offline).
Authority Discovery Key
Used for consensus purposes (to note the block author and reward it).

Fortunately the keys don’t need to be different, we highlighted with the same color the keys that can be grouped together because they used the same algorithm.

We are going to generate two keypairs (be sure to save them), the Node Key is generated by the node on startup and we won’t cover how to customize it here. To do so, you will need to install a tool called subkey: cargo install --force --git https://github.com/paritytech/substrate subkey.

→ We generate the GrandPa Key