ringecosystem / ormpipe

MIT License
1 stars 1 forks source link

Ormpipe

Ormpipe is ORMP relay program for Ormp.

Usage

The first step is install ormpipe. you can use npm to install it.

npm i -g @darwinia/ormpipe-cli

Update ormpipe please run

npm update -g @darwinia/ormpipe-cli

if you like use docker you can see ormpile docker registry to get new version.

docker run -it --name=ormpipe \
  ghcr.io/darwinia-network/ormpipe:sha-277b2e6 \
  --help

Ormpipe have two roles named oracle and relayer, the oracle role do sign message and import message root (after execute multisig), the relayer role relay message.

Run

Oracle

Oracle role works is sign message and submit multisig (only mainly node submit to multisig contract).

IMPORT

  1. All signed message will submit to Darwinia submittion contract, so you should have some RING to pay fees.
  2. If you run mainly node, you should have target chain token to pay fees.
ormpipe oracle \
  --enable-pair=sepolia-pangolin \
  --enable-pair=arbitrumsepolia-pangolin

If you want to run mainly node, please add --mainly to your command.

ormpipe oracle \
  --enable-pair=sepolia-pangolin \
  --enable-pair=arbitrumsepolia-pangolin \
  --mainly

Relayer

Run realyer node you can follow this command

ormpipe relayer \
  --enable-pair=sepolia-pangolin \
  --enable-pair=arbitrumsepolia-pangolin

Advance

Pairs

Ormpipe support chains

Testnets

- pangolin sepolia arbitrumsepolia
pangolin n y y
sepolia y n y
arbitrumsepolia y y n

Mainnet

- darwinia crab ethereum arbitrum polygon
darwinia n y y y y
crab y n n n n
ethereum y n n y n
arbitrum y n y n n
polygon y n n n n

Private key

Default Ormpipe program will ask you typing your private key, because this is safety, Ormpipe also supports reading from environment variables, if you are willing to do so.

export ORMPIPE_SIGNER=0x123456

TIPS: You can set different account for different chain

export ORMPIPE_SIGNER=0x123456
export ORMPIPE_SIGNER_PANGOLIN=0x654321

Docker

If you want run Ormpipe use docker, you can follow this command

docker run -it --name=ormpipe \
  -e ORMPIPE_SIGNER=0x1234 \
  ghcr.io/darwinia-network/ormpipe:sha-277b2e6 \
    oracle \
    --enable-pair=pangolin-sepolia

Best practice is to use docker compose.

version: "3"

services:
  ormpipe-testnets-oracle:
    container_name: ormpipe-testnets-oracle
    image: ghcr.io/darwinia-network/ormpipe:sha-277b2e6
    restart: always
    environment:
      ORMPIPE_SIGNER: 0x123457
    command:
      - oracle
      - --enable-pair=sepolia-pangolin
      - --enable-pair=arbitrumsepolia-pangolin
      - --enable-pair=sepolia-arbitrumsepolia

then run docker compose up -d to start program.