Snowbridge
  • Introduction
  • Concepts
  • Architecture
    • Overview
    • Components
    • Channels
    • Verification
      • Ethereum
      • Polkadot
        • Operational Costs
    • Governance
    • Upgrades
    • Relayers
  • Applications
    • Token Transfers
  • Security
    • Exploit Reporting
    • Audits
  • Other
    • Quick Start Guide
    • Processes for keeping track of dependency changes
    • Bridges Workshop
  • Rococo Testnet
    • Rococo-Sepolia Token Transfers
  • Operations
    • Infrastructure
    • Contributing to Snowbridge
    • Governance and Operational Processes
    • General Governance Updates
    • Test Runtime Upgrades
    • Run Relayers
Powered by GitBook
On this page
  • 1. Setup
  • 1.1 AWS account
  • 1.2 Clone infra repo
  • 1.3 Install Ansible & dependencies
  • 1.4 Create AWS key pair
  • 1.5 Set AWS env variables
  • 1.6 Create EC2 instance
  • 1.7 Add secrets
  • 1.8 Fund relayer accounts
  • 1.9 Set relayer number
  • 1.10 Install Relayers
  • 1.11 Increment Relayer count
  • 1.12 Monitoring
  • 2. Upgrade
  1. Operations

Run Relayers

Steps to set up your own Snowbridge message relayers.

PreviousTest Runtime Upgrades

Last updated 6 months ago

1. Setup

1.1 AWS account

The first thing you will need is an AWS account. if you do not have an account yet.

1.2 Clone infra repo

Clone the :

git clone https://github.com/Snowfork/snowbridge-relayers-infra.git

1.3 Install Ansible & dependencies

Install Ansible and its dependencies:

brew install pipx
pipx install --include-deps ansible boto3 botocore
pipx ensurepath
ansible-galaxy collection install amazon.aws

1.4 Create AWS key pair

On the AWS console, under the EC2 section, create an ED25519 key pair called snowbridge-relayers-key.

1.5 Set AWS env variables

In the snowbridge-relayers-infra directory, create a .envrc file with the following values:

export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export AWS_ACCOUNT_ID=
export AWS_DEFAULT_REGION=eu-central-1

Add your AWS access key ID, secret access key and account ID.

1.6 Create EC2 instance

Run command from inside the snowbridge-relayers-infra directory:

ansible-playbook -i inventory/message-relayers/aws_ec2.yml infra.yml

It will create an EC2 instance to run the relayers on.

1.7 Add secrets

Add the following plaintext secrets to AWS secrets manager:

snowbridge/dwellir-eth-node-api-key
snowbridge/dwellir-polkadot-node-api-key
snowbridge/chainalysis-api-key
snowbridge/asset-hub-ethereum-relay
snowbridge/asset-hub-parachain-relay

1.7.1 Lodestar, Polkadot Nodes & Chainalysis key

1.7.2 Ethereum relay key

./target/release/subkey inspect "cat cow milk..."

Use the secret seed hash as the snowbridge/asset-hub-ethereum-relay secret.

1.7.3 Parachain relayer key

The asset-hub-parachain-relay is a private key for a funded account on Ethereum.

1.8 Fund relayer accounts

The Ethereum and Polkadot BridgeHub account should be funded with $10 each, at least.

1.9 Set relayer number

1.10 Install Relayers

Once you have added all the secrets, you can deploy your relayers:

ssh-agent bash
ssh-add /path/to/snowbridge-relayers-key.pem
ansible-playbook -i inventory/message-relayers/aws_ec2.yml relayers.yml

Once it has completed, ssh into your instance.

ssh -i message-relayers-key.pem ubuntu@xxx.eu-central-1.compute.amazonaws.com

Check that you see no relayer errors for each relayer:

sudo journalctl -fu snowbridge-asset-hub-ethereum-relay --since today
sudo journalctl -fu snowbridge-asset-hub-parachain-relay --since today

1.11 Increment Relayer count

1.12 Monitoring

TODO

2. Upgrade

To upgrade the relayer, run the following commands:

git pull
ssh-agent bash
ssh-add /path/to/snowbridge-relayers-key.pem
ansible-playbook -i inventory/message-relayers/aws_ec2.yml relayers.yml --start-at "Upload binary"

Ask for API keys for dwellir-eth-node-api-key, dwellir-polkadot-node-api-key and chainalysis-api-key in Snowbridge Relayer Telegram group: (keys will be DM'ed to you).

The asset-hub-ethereum-relay is a private key for an prefunded account on Polkadot BridgeHub. To retrieve the private key from an account on Polkadot with seedphrase "cat cow milk...", use :

Once you have set up all of the above, ask for a relayer ID and relayer count in Snowbridge Relayer Telegram group: . Add the key and ID in your .envrc file. .

Once the relayer has started up successfully, all relaying parties should increment their their relayer config. This action will be prompted in the TG group.

https://t.me/+I8Iel-Eaxcw3NjU0
subkey
https://t.me/+I8Iel-Eaxcw3NjU0
Example .envrc file
relayer count config and redeploy
Register
infrastructure repository
Setup
Upgrade
Example of how to add an AWS secret.