Skip to content

Commit

Permalink
add osmosis relayer playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
husonghua committed Feb 16, 2022
1 parent a67a246 commit 3370dc1
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 7 deletions.
12 changes: 10 additions & 2 deletions docs/relayers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ We run all relayers on one machine with high CPU, memory and storage. The defaul
- gRPC server: 9090 (default)
- gRPC-web server: 9091 (default)

Make sure the firewalls are open for prometheus port and p2p port. Make sure prometheus is true.

### Juno Relayer

| Network | Prometheus | P2P | RPC | ABCI | Pprof | API server | Rosetta API | gRPC server | gRPC-web server |
| -------------- | ---------- | ----- | ----- | ----- | ----- | ---------- | ----------- | ----------- | --------------- |
| Juno (default) | 26660 | 26656 | 26657 | 26658 | 6060 | 1317 | 8080 | 9090 | 9091 |
Expand All @@ -27,6 +31,10 @@ We run all relayers on one machine with high CPU, memory and storage. The defaul
| Comdex | 31660 | 31656 | 31657 | 31658 | 31060 | 31317 | 31080 | 31090 | 31091 |
| Sifchain | 32660 | 32656 | 32657 | 32658 | 32060 | 32327 | 32080 | 32090 | 32091 |

Make sure the firewalls are open for prometheus port and p2p port
### Osmosis Relayer

Make sure prometheus is true.
| Network | Prometheus | P2P | RPC | ABCI | Pprof | API server | Rosetta API | gRPC server | gRPC-web server |
| ----------------- | ---------- | ----- | ----- | ----- | ----- | ---------- | ----------- | ----------- | --------------- |
| Osmosis (default) | 26660 | 26656 | 26657 | 26658 | 6060 | 1317 | 8080 | 9090 | 9091 |
| Chihuahua | 29660 | 29656 | 29657 | 29658 | 29060 | 29317 | 29080 | 29090 | 29091 |
| Konstellation | 33660 | 33656 | 33657 | 33658 | 33060 | 33317 | 33080 | 33090 | 33091 |
5 changes: 0 additions & 5 deletions group_vars/osmosis_mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@ node_version: v6.0.1
repo: https://github.com/osmosis-labs/osmosis
genesis: 'https://github.com/osmosis-labs/networks/raw/main/osmosis-1/genesis.json'
peers: '[email protected]:29656,[email protected]:26656,[email protected]:30772,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32351,[email protected]:29656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:34656,[email protected]:26656,[email protected]:26656,[email protected]:26656'

# For auto compound script
denomination: 'uosmo'
threshold: 1000000
transaction_extra_flag: '--gas=auto --gas-adjustment=1.2 --gas-prices=0.025uosmo'
6 changes: 6 additions & 0 deletions relayer_osmosis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Move Osmosis relayer config
hosts: '{{ target }}'
gather_facts: false
roles:
- relayer_osmosis
106 changes: 106 additions & 0 deletions roles/relayer_osmosis/files/hermes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# The global section has parameters that apply globally to the relayer operation.
[global]
log_level = 'info'

# Specify the mode to be used by the relayer. [Required]
[mode]

# Specify the client mode.
[mode.clients]
enabled = false
refresh = true
misbehaviour = false

# Specify the connections mode.
[mode.connections]
enabled = false

# Specify the channels mode.
[mode.channels]
enabled = false

# Specify the packets mode.
[mode.packets]
enabled = true
clear_interval = 200
clear_on_start = true
tx_confirmation = true

# The REST section defines parameters for Hermes' built-in RESTful API.
# https://hermes.informal.systems/rest.html
[rest]
enabled = true
host = '127.0.0.1'
port = 3000

[telemetry]
enabled = true
host = '127.0.0.1'
port = 3001

#
# Chain configuration Osmosis
#

[[chains]]
id = 'osmosis-1'
rpc_addr = 'http://127.0.0.1:26657'
grpc_addr = 'http://127.0.0.1:9090'
websocket_addr = 'ws://127.0.0.1:26657/websocket'

rpc_timeout = '20s'
account_prefix = 'osmo'
key_name = 'osmosis-relayer'
address_type = { derivation = 'cosmos' }
store_prefix = 'ibc'
default_gas = 100000
max_gas = 1000000
gas_price = { price = 0.000, denom = 'uosmo' }
gas_adjustment = 0.2
max_msg_num = 30
max_tx_size = 1800000
clock_drift = '15s'
max_block_time = '10s'
trusting_period = '14days'
memo_prefix = 'Relayed by Polkachu'
trust_threshold = { numerator = '1', denominator = '3' }

[chains.packet_filter]
policy = 'allow'
list = [
['transfer', 'channel-113'], # Chihuahua
]

#
# Chain configuration Chihuahua
#

[[chains]]
id = 'chihuahua-1'
# API access to Chihuahua node with indexing
rpc_addr = 'http://127.0.0.1:29657'
grpc_addr = 'http://127.0.0.1:29090'
websocket_addr = 'ws://127.0.0.1:29657/websocket'

rpc_timeout = '20s'
account_prefix = 'chihuahua'
key_name = 'chihuahua-relayer'
address_type = { derivation = 'cosmos' }
store_prefix = 'ibc'
default_gas = 100000
max_gas = 3500000
gas_price = { price = 0.05, denom = 'uhuahua' }
gas_adjustment = 0.2
max_msg_num = 30
max_tx_size = 1800000
clock_drift = '10s'
max_block_time = '10s'
trusting_period = '14days'
memo_prefix = 'Relayed by Polkachu'
trust_threshold = { numerator = '1', denominator = '3' }

[chains.packet_filter]
policy = 'allow'
list = [
['transfer', 'channel-7'], # Osmosis
]
16 changes: 16 additions & 0 deletions roles/relayer_osmosis/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- name: Copy hermes config script
copy:
src: 'hermes.toml'
dest: '/home/{{ ansible_user }}/.hermes/config.toml'
owner: '{{ ansible_user }}'
group: '{{ ansible_user }}'
mode: '0644'
# - name: Restart Hermes
# become: true
# systemd:
# name: hermes
# state: restarted
# daemon_reload: yes
# enabled: yes
# changed_when: false

0 comments on commit 3370dc1

Please sign in to comment.