From 3370dc1c8fce84b34e7dec79d10b7623b77fdb7c Mon Sep 17 00:00:00 2001 From: Songhua Hu Date: Wed, 16 Feb 2022 14:44:59 -0800 Subject: [PATCH] add osmosis relayer playbook --- docs/relayers.md | 12 ++- group_vars/osmosis_mainnet.yml | 5 -- relayer_osmosis.yml | 6 ++ roles/relayer_osmosis/files/hermes.toml | 106 ++++++++++++++++++++++++ roles/relayer_osmosis/tasks/main.yml | 16 ++++ 5 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 relayer_osmosis.yml create mode 100644 roles/relayer_osmosis/files/hermes.toml create mode 100644 roles/relayer_osmosis/tasks/main.yml diff --git a/docs/relayers.md b/docs/relayers.md index b49e8a46..ed89b690 100644 --- a/docs/relayers.md +++ b/docs/relayers.md @@ -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 | @@ -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 | diff --git a/group_vars/osmosis_mainnet.yml b/group_vars/osmosis_mainnet.yml index 3c82d00a..68d74200 100644 --- a/group_vars/osmosis_mainnet.yml +++ b/group_vars/osmosis_mainnet.yml @@ -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: '24b778409a1132a9fb6445ac184ae1af4f48982b@3.66.211.32:29656,e542d0ad7b48f555b58c2e5f498b50795ea2814d@209.151.155.113:26656,1d7258ffb7fc88ec7155f43146c7a85159834072@34.215.234.11:30772,ccab34fd32277870183c57606b41c16c6a985238@142.44.212.67:26656,55eea69c21b46000c1594d8b4a448563b075d9e3@34.107.19.235:26656,ce683222ec2e05c52cd6c05e77361f2991634d84@95.216.80.82:26656,75a0e6b11cfd7527d3103c4d5c0a4550d75a744c@18.184.164.161:26656,8f538eaf07ab02a8d4d2e5dbf165bffa4b2f5982@3.68.158.112:26656,e3543d311db6ba912ede2a43698225228aca4c37@116.203.77.250:26656,b5de5643eb6eb54c6be905d7b2f919e1bfee1777@195.201.161.56:26656,7f1abfa677eff970926728e71f213b22c9e7c32e@45.79.201.141:26656,5a7d50b78393652383fc81e5f914cc9b38e6fb5d@167.71.167.106:26656,d9dbd30f7e9ae99dc05645f48f4637c2f4a14645@172.65.199.39:26656,5d49690d276618f1e22ed8c1d5b19fe5ed69e784@148.72.165.77:26656,0235caea65a8b279b46b79600d702427b322d791@63.32.91.9:26656,3c740565eb15a185c107971a3780f52b3dd7c61a@54.177.131.90:32351,d90e6f6c5825bf0259a7b98f318f94fa6f25178c@18.193.129.158:29656,be89866255219b441b1d2bcf90cd7d7dd90d7e4d@3.249.154.86:26656,86dd585aa15afedfa7a27fab0ff48dffa1a333a3@51.158.107.31:26656,7a7c7d118c277242fbd3e8efcda216dd2793d882@195.201.56.108:26656,ffd72a2c9672d6c7d29d6f94afea95ac338ba6dc@176.34.75.138:26656,0d20c72662bbf768518d948925ca195bd8467457@135.125.104.217:34656,3c3b955ef8316bb8785acde7a8ee4bc5480a68a5@110.42.139.232:26656,b7f2ffa619cbfce0d6a40c1a09a74cf45d86f4bb@52.9.118.174:26656,26d24fcc90ba79ab20a9919e228621eefa5258ba@3.143.37.54:26656' - -# For auto compound script -denomination: 'uosmo' -threshold: 1000000 -transaction_extra_flag: '--gas=auto --gas-adjustment=1.2 --gas-prices=0.025uosmo' diff --git a/relayer_osmosis.yml b/relayer_osmosis.yml new file mode 100644 index 00000000..6de6e71e --- /dev/null +++ b/relayer_osmosis.yml @@ -0,0 +1,6 @@ +--- +- name: Move Osmosis relayer config + hosts: '{{ target }}' + gather_facts: false + roles: + - relayer_osmosis diff --git a/roles/relayer_osmosis/files/hermes.toml b/roles/relayer_osmosis/files/hermes.toml new file mode 100644 index 00000000..8c6d0265 --- /dev/null +++ b/roles/relayer_osmosis/files/hermes.toml @@ -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 +] diff --git a/roles/relayer_osmosis/tasks/main.yml b/roles/relayer_osmosis/tasks/main.yml new file mode 100644 index 00000000..4bb34a49 --- /dev/null +++ b/roles/relayer_osmosis/tasks/main.yml @@ -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