Skip to content

alfredgit220/darwinia-bridger

Repository files navigation

Darwinia Bridger

CI release doc downloads license

Relayers (aka. Bridgers) in Darwinia Network are offchain worker clients which help relay the headers and messages between source chains and target chains, they work between two chains and require RPC access of two chains.

Darwinia Bridger (this repo) is an implementation of a relayer client written in Rust.

Installation

Download from GitHub releases

Download the binary from latest release.

Pull the Docker image

docker pull quay.io/darwinia-network/bridger:<VERSION>

Install using cargo

⚠️ Because of #76 we don't publish darwinia-bridger to crates.io, the darwinia-bridger currently in crates is outdated.

If you want to install use cargo, you can run this command, the first you need found the last version in latest release.

cargo install darwinia-bridger --git https://github.com/darwinia-network/bridger --tag <VERSION>

Build from source

Notice: please use the last nightly toolchain. You might want to change the default toolchain using rustup default nightly, some bridge need wasm support, you can run rustup target add wasm32-unknown-unknown.

git clone https://github.com/darwinia-network/bridger.git
cd bridger/
cargo build --release

Configuration

The currently darwinia-bridger supports these bridges, the config you can click docs link

type bridge doc
substrate-ethereum darwinia-ethereum Guide
substrate-ethereum pangolin-ropsten Guide
substrate-substrate pangolin-pangoro Guide

Usage

The latest help texts are also available in bridger --help.

$ bridger
bridger 0.4.7
Darwinia bridger

USAGE:
    bridger <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    help      Prints this message or the help of the given subcommand(s)
    kv        The bridge kv db storage operation
    server    Start bridger server
    task      Task manager

No matter what bridge you wish to start, first, you must run bridger server to start the bridger server.

$ bridger server --help
bridger-server 0.4.7
Start bridger server

USAGE:
    bridger server [OPTIONS]

FLAGS:
        --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --base-path <base-path>    The bridger config or data base path
    -h, --host <host>              Bridger service listen host [default: 127.0.0.1]
    -p, --port <port>              Bridger service listen port [default: 1098]
  • --base-path all of bridger data, like task config, database will store in here, the default path is $HOME/.bridger
  • --host --port the bridger server host and port.

You need to know

The darwinia bridger is a server/client architecture software, all bridges are running in the bridger server. This means you can run bridger on any computer you can access. you can set server bind host and port.

Server

bridger server --host 127.0.0.1 --port 2021

However, please do not open the port if it is not necessary, because it's too dangerous, everyone may connect to your bridger service

Client

bridger task --server http://127.0.0.1:2021 list

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published