Skip to content

Latest commit

 

History

History
104 lines (75 loc) · 2.87 KB

LAUNCH.md

File metadata and controls

104 lines (75 loc) · 2.87 KB

Launch guide

Parallel uses parachain-launch to launch our services including:

  • parallel-dapp : DAPP for money market, staking, crowdloans, cross chain transfer and more
  • stake-client : Liquid staking pallet's rewards/slashes' feeder
  • oracle-client : Loans pallet's price feeder
  • liquidation-client : Loans pallet's liquidation operator
  • polkadot : Relaychain
  • parallel : Parachain
  • cumulus : A dummy parachain

Getting Started

Install nodejs, rust, parachain-launch, yq and initialize submodules

  1. nodejs, parachain-launch
NODE_VERSION=v14.17.0
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
    && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \
    && [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" \
    && nvm install $NODE_VERSION \
    && nvm use $NODE_VERSION \
    && nvm alias default $NODE_VERSION \
    && npm install -g yarn \
    && yarn global add @open-web3/parachain-launch ts-node
  1. yq
VERSION=v4.2.0
BINARY=yq_linux_amd64
sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/bin/yq &&\
    sudo chmod +x /usr/bin/yq
  1. rust
RUST_TOOLCHAIN=nightly-2022-11-15
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
    sh -s -- -y --default-toolchain ${RUST_TOOLCHAIN} --component rust-src --target wasm32-unknown-unknown
  1. Initialize submodules
make init

Create .env file with relaychain sudo key

Suppose the relaychain sudo key is //Alice, we need to put the following content in scripts/helper/.env file

NOTE: Please contact a Parallel team member for the relaychain sudo key.

RELAY_CHAIN_SUDO_KEY="//Alice"

Launch

Then run the following command to launch all services

make launch

Port forwarding (optional)

If you are running make launch on remote server, you can forward to local. Here is the bash script to save you time:

function forward-port-to-local {
    if [ ! -z "$1" ] && [ ! -z "$2" ]; then
        ssh -N -L ${3:-$2}:localhost:${2} ${1}
    fi
}

e.g. forward ubuntu@192.168.1.11's 9944 port to local:

forward-port-to-local ubuntu@192.168.1.11 9944

Then access everything locally:

Advanced

If you need to adjust relaychain & parachain version or other parameters, you can edit config.yml file If you need to adjust services like stake-client etc, you can edit docker-compose.override.yml