Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hrharder
Last active January 2, 2019 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hrharder/05e1f04afa6ea40666a84b330f6ecf35 to your computer and use it in GitHub Desktop.
Save hrharder/05e1f04afa6ea40666a84b330f6ecf35 to your computer and use it in GitHub Desktop.
Joining the OrderStream network as a validator (WIP)

Paradigm OrderStream Validator/Full Node Setup

Quick write-up of the necessary steps to setup a validator node. Reach out with any questions. If you wish to join the validator set, you must coordinate with me (henry@paradigm.market) to join the genesis file on the next network restart. Full nodes can join any time, you will just need the most current genesis.json file, and a seed node address.

UPDATE (2 Jan 19): Much of the setup process described in the configuration section has been automated as of ParadigmCore version 0.5. See the updated README for current install and setup instrucitons.

Hardware

Liveness is important for validators, so I would reccommend provisioning a Linux VM on Linode, AWS, GPC, etc. For our current test-network, I am using Ubuntu VMs on linode, and couldn't be happier. You're free to use whatever host, of course.

  • Operating system: macOS/linux (I suggest Ubuntu 18.04, it's what we use)
  • CPU: 4-8 cores (4 minimum, 6 recommended)
  • RAM: 8-16 GB (8 minimum, 10-16 recomended)
  • SSD: 160 - 500 GB (~160 minimum, 250-500 recommended)

Because ParadigmCore requires access to an Ethereum node, a HDD cannot be used if you are hosting that node locally.

Software

ParadigmCore relies on other pieces of software for full validator functionality. These must be installed and configured before you can join the OrderStream network as a validator.

  • Tendermint Core: consensus engine and networking. Current testnet using v0.26.4-b771798d
  • Ethereum client: ParadigmCore requires a WebSocket web3 provider. You can use Parity, or Geth, and Infura if you must.
  • Node.JS: ParadigmCore currently only supports Node.JS as the runtime. There are many cutting-edge features of the runtime ParadigmCore leverages, so you must have node.js >v10.14 installed. You can use NVM or a package manager to get the correct version.
  • TypeScript: ParadigmCore is implemented in TypeScript, so you must have the compiler installed. Because of the use of new, non-yet-standard language features, you must have tsc v3.2.2 or greater.

NOTE: The correct version of TypeScript and Tendermint will be installed automatically when yarn install or npm i is run for the first time after cloning.

Configuration

UPDATE: See ParadigmCore README for more current instrucitons

Correct configuration of ParadigmCore is crucially important for you validator node to join the network. The primary configuration steps are listed below.

  • Tendermint config: Tendermint handles all networking and consensus logic for ParadigmCore, and you must configure it so it can connect to the rest of the network, and handle consensus logic.
    • genesis.json: the genesis file establishes the initial validator set. All validators on the network must have the same genesis file. Your node must be added to this file, and then the updated version copied to all other validators (more below).
    • persistent_peers: this is a config option that must be set in ~/.tendermint/config/config.toml and allows your node to connect to the rest of the network.
    • priv_validator.json: this file will be generated during tendermint configuration, and contains your private validator keypair. You must share the address and pub_key.value fields with the rest of the network (i.e. me) and keep the private key private
    • My plan is to automate this by ParadigmCore v0.5
  • ParadigmCore config: ParadigmCore is configured via a .env file placed in the root directory of the application (at the same level as the package.json and lockfiles).
    • a template environment file has been provided, populated with sensible defaults (the ones used by the current network) and filled with a dummy node_id, and pub/priv keypair. You should replace PRIV_KEY, PUB_KEY, and NODE_ID with the values from ~/.tendermint/config/priv_validator.json (node_id is the same as address).
    • If you wish to expose the two (current) API endpoints of ParadigmCore to the public (currently ports 4242 for stream, and 4243 for posting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment