Coder Social home page Coder Social logo

bridger's Introduction

Bridger

bridger crate doc downloads LICENSE

The Darwinia Bridger

Installation

Install from github releases

Download binary from latest release.

[ Deprecated due to #76 ]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

Note: rustc toolchain nightly-2020-10-06 will be installed along with this package, due to: paritytech/substrate#7282

rustup default nightly-2020-10-06

Usage

$ bridger
darwinia-bridger 0.1.12

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 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

    • 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 and redeem for the real account.

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

bridger's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.