Run Relayers
How to run relayers that are rewarded for relaying bridge messages
Snowbridge Infra Suite Repository
This guide references Github repository Snowfork/snowbridge-infra-suite for example scripts and config files.
Clone this repository on your server.
Relayer Binary
Build Relayer
To build the relayer from source, follow these steps.
Clone Snowbridge repository and build the relayer
The relayer binary will be built at build/snowbridge-relay
. Copy the binary over to the snowbridge-infra-suite directory
Docker
TODO update docker release
Private Keys
You will need the follow private keys for the relayers:
Ethereum private keys for
the BEEFY relayer
the Parachain relayer (x2 keys - one for the primary governance channel and one for the secondary governance channel)
Polkadot private keys for
the Beacon relayer
the Execution relayer
Add the private key files in directory keys
in snowbridge-infra-suite
. Create the following key files:
beefy-relayer.key
parachain-0-relayer.key (primary governance)
parachain-1-relayer.key (secondary governance)
beacon-relayer.key
execution-relayer.key
These keys are used by the scripts.
BEEFY Relayer
The BEEFY relayer relays BEEFY commitments to track consensus on Polkadot.
To run the BEEFY relayer, run script /scripts/start-beefy-relayer.sh
in snowbridge-infra-suite
.
It expects:
A config file at
./config/beefy-relayer.json
Set the following values in the config file:BeefyClient
: The contract address where the BeefyClient is deployed.beefy-activation-block
: The beefy block to start syncing from.endpoint
: Both the Polkadot and Ethereum nodes to connect to.gas-limit
: The Ethereum gaslimit to limit the gas used per transaction.
An Ethereum private key file at
./keys/beefy-relayer.key
Parachain Relayer
The Parachain relayer relays messages from Polkadot to Ethereum for a certain channel. You need to run a relayer per channel that you would like to support.
To run the Parachain relayer, run script /scripts/start-parachain-relayer.sh 0
in snowbridge-infra-suite
.
It expects:
A config file at
./config/parachain-0-relayer.json
Set the following values in the config file:BeefyClient
: The contract address where the BeefyClient is deployed.Gateway
: The contract address where the Gateway contract is deployed.beefy-activation-block
: The beefy block to start syncing from.endpoint
: All the endpoints for the respective chains.channel-id:
The channel of the messages that will be relayed.gas-limit
: The Ethereum gaslimit to limit the gas used per transaction.
An Ethereum private key file at
./keys/parachain-0-relayer.key
Beacon Relayer
The Beacon relayer relays consensus updates on Ethereum to Polkadot.
To run the Beacon relayer, run script /scripts/start-beacon-relayer.sh
in snowbridge-infra-suite
.
It expects:
A config file at
./config/parachain-0-relayer.json
Set the following values in the config file:endpoint
: Both the Polkadot and Ethereum nodes to connect to.
A Polkadot private key file at
./keys/beacon-relayer.key
Execution Relayer
The Execution relayer relays messages from Ethereum to Polkadot for a certain channel. You need to run a relayer per channel that you would like to support.
To run the Beacon relayer, run script /scripts/start-execution-relayer.sh
in snowbridge-infra-suite
.
It expects:
A config file at
./config/parachain-0-relayer.json
Set the following values in the config file:Gateway
: The contract address where the Gateway contract is deployed.endpoint
: Both the Polkadot and Ethereum nodes to connect to.channel-id:
The channel of the messages that will be relayed.
A Polkadot private key file at
./keys/beacon-relayer.key
Service Files
To register the relayers as systemd services, use each service file under snowbridge-infra-suite/services
. Each service can be registered with these steps:
Last updated