Skip to content

Commit

Permalink
GITBOOK-90: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
Clara van Staden authored and gitbook-bot committed Oct 22, 2024
1 parent a997d03 commit 18a96a9
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@
* [Governance and Operational Processes](operations/governance-and-operational-processes.md)
* [General Governance Updates](operations/governance-updates.md)
* [Test Runtime Upgrades](operations/test-runtime-upgrades.md)
* [Run Relayers](operations/run-relayers.md)
110 changes: 110 additions & 0 deletions docs/operations/run-relayers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
description: Steps to set up your own Snowbridge message relayers.
---

# Run Relayers

## AWS Account

The first thing you will need is an AWS account. [Register](https://signin.aws.amazon.com/signup?request\_type=register) if you do not have an account yet.

## Clone infra Repo

Clone the infrastructure repository:

```sh
git clone https://github.com/Snowfork/snowbrige-relayers-infra.git
```

## Install Ansible & dependencies

Install Ansible and its dependencies:

```sh
brew install pipx
pipx install --include-deps ansible boto3 botocore
pipx ensurepath
```

## Create AWS Key Pair

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

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

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

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

### Lodestar, Polkadot Nodes & Chainalysis Key

Ask for API keys for `dwellir-eth-node-api-key`, `dwellir-polkadot-node-api-key` and `chainalysis-api-key` in Snowbridge Relayer Telegram group: [https://t.me/+I8Iel-Eaxcw3NjU0](https://t.me/+I8Iel-Eaxcw3NjU0)

### Ethereum Relay Key

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 [subkey](https://docs.substrate.io/reference/command-line-tools/subkey/):

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

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

### Parachain Relay Key

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

## 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 [email protected]
```

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

### Monitoring

TODO

0 comments on commit 18a96a9

Please sign in to comment.