Crates.io | darwinia-bridger |
lib.rs | darwinia-bridger |
version | 0.1.4 |
source | src |
created_at | 2020-09-29 15:24:13.766227 |
updated_at | 2020-11-02 06:12:08.738968 |
description | Darwinia bridger |
homepage | https://github.com/darwinia-network/bridger |
repository | https://github.com/darwinia-network/bridger |
max_upload_size | |
id | 294146 |
size | 190,875 |
The Darwinia Bridger
Note: rustc toolchain
nightly-2020-10-05
will be installed along with this package, due to: https://github.com/paritytech/substrate/issues/7282
$ cargo install darwinia-bridger
git clone https://github.com/darwinia-network/bridger.git
cd bridger
cargo build --release
cd ./target/release/
./bridger run -v
$ bridger
darwinia-bridger 0.1.4
USAGE:
bridger <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
affirm Affirm one block
affirmations List affirmations from chain
confirm Set Confirmed block with sudo privilege
guard Run `guard` service standalone
help Prints this message or the help of the given subcommand(s)
keys Show sudo and technical committee members' public key
run Run the bridger, this will start `ethereum`, `relay`, `redeem` and `guard` services
Bridger
depends on a configuration file, the default is ~/.bridger/config.toml
.
You don't need to manually create this file, it will be automatically generated by running any subcommand, such as the bridger run
, bridger keys
.
When you first run subcommand like bridger run
, it will generate an config.toml
in ~/.bridger
, you may need to config it to the right settings.
Here is an sample for bridgers which want to work on ropsten-crab bridge. You can also read the more docs about the settings in the sample.
If you running for mainet, here is the mainet sample for reference.
You will need to prepare several services before using bridger:
Darwinia node websocket json-rpc endpoint
Ethereum json-rpc endpoint, e.g. Infura
Darwinia Shadow http restful endpoint, for more details: https://github.com/darwinia-network/shadow
Account Seed for signing extrinsics. You can use this account for affirm
and redeem
...
seed = '<account seed>'
...
you can also using a proxy seed to signing extrinsic for your real account. To use proxy, you need to
proxy.addProxy(proxy_account, ProxyType.EthereumBridge, 0)
...
seed = '<proxy account seed>'
...
[proxy]
real = '<real account public key>'
If you are a member of the technical committee, This is the recommended. The proxy account can do affirm
, guard
and redeem
for the real account.
bridger run
will run the bridger fully. You can also using bridger run -v
to enter verbose model which can help print more trace logs.
bridger guard
will run the guard service standalone.
GPL-3.0