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.
Download the binary from latest release.
docker pull quay.io/darwinia-network/bridger:<VERSION>
⚠️ 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>
Notice: please use the last
nightly
toolchain. You might want to change the default toolchain usingrustup default nightly
, some bridge need wasm support, you can runrustup target add wasm32-unknown-unknown
.
git clone https://github.com/darwinia-network/bridger.git
cd bridger/
cargo build --release
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 |
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.
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