Skip to content

Pupmos/ansible-ts-relayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pupmos/ansible-ts-relayer

An Ansible playbook for ts-relayer.

Prerequisites

Ideally ansible should be installed via pip, the package installer for python.

Assumptions

This README assumes that you've already installed debian or ubuntu onto the target environment/s.

Setup

  1. Install the required git submodule dependencies:
git submodule update --init
  1. Install the ansible community.general collection:
ansible-galaxy collection install community.general
  1. Rename the hosts.example file in inventory/ to hosts:
cp inventory/hosts.example inventory/hosts
  1. Edit the inventory/hosts and add the IP addresses of your relayer node/s.

ts-relayer

Setup

To setup a new relayer node:

DD_API_KEY=<dd_api_key> \
PROVIDER=<provider> \
TARGET=<target> \
make setup

where:

Param Description Required
<dd_api_key> The DataDog API key. false
<provider> The provider being used (mevspace or ovhcloud). true
<target> The IP address of the host to run the playbook against (all hosts will be configured if not provided). false

e.g.:

DD_API_KEY=0gD04PXCnLk0CYNHdamJ7lylKs5uMZkJ \
PROVIDER=ovhcloud \
TARGET=1.2.3.4 \
make setup

This will provision the host in question with all the necessary packages. To then launch a relayer, see the steps below.

Launch

To launch a relayer to relay packets between two chains:

REGISTRY_URL=<registry_url> \
SRC=<src_chain_id> \
DEST=<dest_chain_id> \
SRC_CONNECTION=<src_connection> \
DEST_CONNECTION=<dest_connection> \
MNEMONIC='<mnemonic>' \
TARGET=<target> \
make launch

where:

Param Description Required
<registry_url> The URL of the ts-relayer registry config. true
<src_chain_id> The source chain Id (e.g.: cosmoshub-4). true
<src_connection> The source connection Id (e.g.: connection-0). true
<dest_connection> The destination connection Id (e.g.: connection-1). true
<mnemonic> The mnemonic phrase of the wallet to use to fund the relaying. true
<target> The IP address of the host to run the playbook against (all hosts will be configured if not provided). false

e.g.:

REGISTRY_URL=https://some.url/to/cosmoshub-4.yml \
SRC=cosmoshub-4 \
DEST=juno-1 \
SRC_CONNECTION=connection-0 \
DEST_CONNECTION=connection-1 \
MNEMONIC='some words that make up my mnemonic' \
TARGET=1.2.3.4 \
make launch

This assumes that an existing connection between chains has been established.

About

An Ansible playbook for ts-relayer.

Resources

Stars

Watchers

Forks