9 releases
0.1.4 | Nov 2, 2020 |
---|---|
0.1.3 | Oct 30, 2020 |
0.0.15 | Oct 28, 2020 |
0.0.1 | Sep 29, 2020 |
#16 in #relayer
22 downloads per month
130KB
3K
SLoC
Bridger
The Darwinia Bridger
Installation
Note: rustc toolchain
nightly-2020-10-05
will be installed along with this package, due to: https://github.com/paritytech/substrate/issues/7282
Install using cargo
$ cargo install darwinia-bridger
Build from source
git clone https://github.com/darwinia-network/bridger.git
cd bridger
cargo build --release
cd ./target/release/
./bridger run -v
Usage
$ 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
Run the bridger
Configuration
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
andredeem
... seed = '<account seed>' ...
-
you can also using a proxy seed to signing extrinsic for your real account. To use proxy, you need to
- Using Extrinsic to setting up the proxy using your real account. Calling
proxy.addProxy(proxy_account, ProxyType.EthereumBridge, 0)
- Changing the seed settings to the proxy account's seed.
- Make sure the proxy.real key in config.toml is set to the real account's address to enable proxy feature. (Currently must be public key hex format, Here is an tool which can help address conversion.)
... 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
andredeem
for the real account. - Using Extrinsic to setting up the proxy using your real account. Calling
Run
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.
LICENSE
GPL-3.0
Dependencies
~33–48MB
~762K SLoC