BRISE Chain Relayer

BRISE Relayer Guides

Prepare Fund

  1. Make sure that you have enough BRISE in your account. You can get from faucetarrow-up-right

If you haven't created your account yet, please follow these guides to create one first.

  • 100 BRISE for relayer register

  • More than 50 BRISE for transaction fee

Tip

Currently the brise-chain-relayer code is not fully prepared. Some features like db persistence, alert, prometheus monitor are still under development. So please don’t modify the configuration about db_config, alert_config, instrumentation_config, admin_config

Steps to Install BRISE Relayer

1.Build from source code

Make sure that you have installed Go 1.13+arrow-up-right and have added GOPATH to PATH environment variable

git clonehttps://github.com/Bitgert/brise-chain-relayer
# Enter the folder bsc was cloned into
cd nc-relayer
# Comile and install bsc
make build

or you can download the pre-build binaries from release pagearrow-up-right

Get Example Config File

Get example config from this url: https://github.com/Bitgert/brise-chain-relayer/blob/master/config/config.jsonarrow-up-right

Editconfig.json and fill your BRISE private key to bsc_config.private_key, example private key: AFD8C5D83F148065176268A9D1EE375A10CEE1E74D15985D4CC63E467EC34DA5

  • Brise Chain Configuration:

    • mnemonic: Paste the recovery phrase here. Since nc-relayer will automaticly submit double-sign evidence, if it's committed, the reward will be sent to this address

  • Brise Chain Configuration: *

Start Relayer

You can start Locally

Output:

Or, dynamic Sync Cross Chain Protocol Configuration from https://github.com/Bitgert/brise-chain-relayer-configarrow-up-right

Verify Status

You could call RelayerHub Contractarrow-up-right to verify that your relayer is registered. Go to read contractarrow-up-right and call isRelayer function. If it returns true, then your relayer is working properly.

Relayer Rewards

  1. You can witness the distribution of relayer rewards in the log of system contract: https://brisescan.com/address/0x0000000000000000000000000000000000001005#eventsarrow-up-right. According to the design of Relayer Incentivearrow-up-right, the rewards will be distributed every 1000 data packages. The total accumulated rewards can be read from contractarrow-up-right the value of _collectedRewardForHeaderRelayer and _collectedRewardForTransferRelayer.

  2. Query your relayer's status

The total accumulated relayed count can be read from contractarrow-up-right the value of _transferRelayersSubmitCount

Stop Relayer

To get your locked 100 BRISE back, you need to call RelayerHub Contractarrow-up-right to unregister your relayer. The fee is 0.1 BRISE

Last updated