-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathconfigmap.yaml
271 lines (271 loc) · 15.2 KB
/
configmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
{{- $keys := .Files.Get "configs/keys.json" | fromJson }}
{{- range $relayer := .Values.relayers }}
{{- if eq $relayer.type "hermes" }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $relayer = include "devnet.fullrelayer" (dict "name" $relayer.name "file" $defaultFile "context" $) | fromJson }}
{{ $tag := include "image.tag" $relayer.image }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ $relayer.fullname }}"
data:
config.toml: |-
# The global section has parameters that apply globally to the relayer operation.
[global]
# Specify the verbosity for the relayer logging output. Default: 'info'
# Valid options are 'error', 'warn', 'info', 'debug', 'trace'.
log_level = {{ $relayer.config.global.log_level | squote }}
# Specify the mode to be used by the relayer. [Required]
[mode]
# Specify the client mode.
[mode.clients]
# Whether or not to enable the client workers. [Required]
enabled = {{ $relayer.config.mode.clients.enabled }}
# Whether or not to enable periodic refresh of clients. [Default: true]
# This feature only applies to clients that underlie an open channel.
# For Tendermint clients, the frequency at which Hermes refreshes them is 2/3 of their
# trusting period (e.g., refresh every ~9 days if the trusting period is 14 days).
# Note: Even if this is disabled, clients will be refreshed automatically if
# there is activity on a connection or channel they are involved with.
refresh = {{ $relayer.config.mode.clients.refresh }}
# Whether or not to enable misbehaviour detection for clients. [Default: false]
misbehaviour = {{ $relayer.config.mode.clients.misbehaviour }}
# Specify the connections mode.
[mode.connections]
# Whether or not to enable the connection workers for handshake completion. [Required]
enabled = {{ $relayer.config.mode.connections.enabled }}
# Specify the channels mode.
[mode.channels]
# Whether or not to enable the channel workers for handshake completion. [Required]
enabled = {{ $relayer.config.mode.channels.enabled }}
# Specify the packets mode.
[mode.packets]
# Whether or not to enable the packet workers. [Required]
enabled = {{ $relayer.config.mode.packets.enabled }}
# Parametrize the periodic packet clearing feature.
# Interval (in number of blocks) at which pending packets
# should be periodically cleared. A value of '0' will disable
# periodic packet clearing. [Default: 100]
clear_interval = {{ $relayer.config.mode.packets.clear_interval }}
# Whether or not to clear packets on start. [Default: false]
clear_on_start = {{ $relayer.config.mode.packets.clear_on_start }}
# Toggle the transaction confirmation mechanism.
# The tx confirmation mechanism periodically queries the `/tx_search` RPC
# endpoint to check that previously-submitted transactions
# (to any chain in this config file) have been successfully delivered.
# If they have not been, and `clear_interval = 0`, then those packets are
# queued up for re-submission.
# Experimental feature. Affects telemetry if set to false.
# [Default: true]
tx_confirmation = {{ $relayer.config.mode.packets.tx_confirmation }}
# Auto register the counterparty payee on a destination chain to
# the relayer's address on the source chain. This can be used
# for simple configuration of the relayer to receive fees for
# relaying RecvPacket on fee-enabled channels.
# For more complex configuration, turn this off and use the CLI
# to manually register the payee addresses.
# [Default: false]
auto_register_counterparty_payee = false
# The REST section defines parameters for Hermes' built-in RESTful API.
# https://hermes.informal.systems/rest.html
[rest]
# Whether or not to enable the REST service. Default: false
enabled = {{ $relayer.config.rest.enabled }}
# Specify the IPv4/6 host over which the built-in HTTP server will serve the RESTful
# API requests. Default: 127.0.0.1
host = {{ $relayer.config.rest.host | squote }}
# Specify the port over which the built-in HTTP server will serve the restful API
# requests. Default: 3000
port = {{ $relayer.config.rest.port }}
# The telemetry section defines parameters for Hermes' built-in telemetry capabilities.
# https://hermes.informal.systems/telemetry.html
[telemetry]
# Whether or not to enable the telemetry service. Default: false
enabled = {{ $relayer.config.telemetry.enabled }}
# Specify the IPv4/6 host over which the built-in HTTP server will serve the metrics
# gathered by the telemetry service. Default: 127.0.0.1
host = {{ $relayer.config.telemetry.host | squote }}
# Specify the port over which the built-in HTTP server will serve the metrics gathered
# by the telemetry service. Default: 3001
port = {{ $relayer.config.telemetry.port }}
{{- range $i, $chain := $relayer.chains }}
{{ $fullchain := include "devnet.fullchain" (dict "name" $chain "file" $defaultFile "context" $) | fromJson }}
{{/*Read chain specific config from `relayer.config.chains` into chainConfig*/}}
{{ $chainConfig := dict }}
{{- range $config := $relayer.config.chains }}
{{- if eq $config.id $chain }}
{{- $chainConfig = $config }}
{{- end }}
{{- end }}
[[chains]]
id = "{{ $chain }}"
type = "CosmosSdk"
key_name = "{{ $chain }}"
{{- if $fullchain.ics.enabled }}
ccv_consumer_chain = true
{{- end }}
rpc_addr = "http://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:26657"
grpc_addr = "http://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:9090"
{{- if eq $relayer.config.event_source.mode "pull" }}
event_source = { mode = 'pull', interval = '{{get $relayer.config.event_source "interval" | default "500ms"}}' }
{{- else }}
event_source = { mode = 'push', url = "ws://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:26657/websocket", batch_delay = '{{get $relayer.config.event_source "batch_delay" | default "500ms"}}' }
{{- end }}
# Experimental: Whether or not the full node is trusted.
trusted_node = false
account_prefix = "{{ $chainConfig.account_prefix | default $fullchain.prefix }}"
default_gas = {{ $chainConfig.default_gas | default 500000000 }}
max_gas = {{ $chainConfig.max_gas | default 1000000000 }}
rpc_timeout = "{{ $chainConfig.rpc_timeout | default "10s" }}"
store_prefix = "{{ $chainConfig.store_prefix | default "ibc" }}"
gas_multiplier = {{ $chainConfig.gas_multiplier | default 2 }}
max_msg_num = {{ $chainConfig.max_msg_num | default 30 }}
max_tx_size = {{ $chainConfig.max_tx_size | default 2097152 }}
clock_drift = "{{ $chainConfig.clock_drift | default "5s" }}"
max_block_time = "{{ $chainConfig.max_block_time | default "30s" }}"
trusting_period = "{{ $chainConfig.trusting_period | default "75s" }}"
trust_threshold = { numerator = "{{ ($chainConfig.trust_threshold | default dict).numerator | default "2" }}", denominator = "{{ ($chainConfig.trust_threshold | default dict).denominator | default "3" }}" }
{{- if eq $fullchain.type "evmos" }}
address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } }
gas_price = { price = 2500000, denom = "{{ $fullchain.denom }}" }
{{- else if eq $fullchain.type "injective" }}
address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } }
gas_price = { price = 2500000, denom = "{{ $fullchain.denom }}" }
{{- else }}
address_type = { derivation = 'cosmos' }
gas_price = { price = 0.25, denom = "{{ $fullchain.denom }}" }
{{- end }}
{{- end }}
# config-cli.toml is an additional config which is used for performing
# cli based opperations, such as create-channel etc. This is supposed to be used
# for one time actions
config-cli.toml: |-
# The global section has parameters that apply globally to the relayer operation.
[global]
# Specify the verbosity for the relayer logging output. Default: 'info'
# Valid options are 'error', 'warn', 'info', 'debug', 'trace'.
log_level = {{ $relayer.config.global.log_level | squote }}
# Specify the mode to be used by the relayer. [Required]
[mode]
# Specify the client mode.
[mode.clients]
# Whether or not to enable the client workers. [Required]
enabled = {{ $relayer.config.mode.clients.enabled }}
# Whether or not to enable periodic refresh of clients. [Default: true]
# This feature only applies to clients that underlie an open channel.
# For Tendermint clients, the frequency at which Hermes refreshes them is 2/3 of their
# trusting period (e.g., refresh every ~9 days if the trusting period is 14 days).
# Note: Even if this is disabled, clients will be refreshed automatically if
# there is activity on a connection or channel they are involved with.
refresh = {{ $relayer.config.mode.clients.refresh }}
# Whether or not to enable misbehaviour detection for clients. [Default: false]
misbehaviour = {{ $relayer.config.mode.clients.misbehaviour }}
# Specify the connections mode.
[mode.connections]
# Whether or not to enable the connection workers for handshake completion. [Required]
enabled = {{ $relayer.config.mode.connections.enabled }}
# Specify the channels mode.
[mode.channels]
# Whether or not to enable the channel workers for handshake completion. [Required]
enabled = {{ $relayer.config.mode.channels.enabled }}
# Specify the packets mode.
[mode.packets]
# Whether or not to enable the packet workers. [Required]
enabled = {{ $relayer.config.mode.packets.enabled }}
# Parametrize the periodic packet clearing feature.
# Interval (in number of blocks) at which pending packets
# should be periodically cleared. A value of '0' will disable
# periodic packet clearing. [Default: 100]
clear_interval = {{ $relayer.config.mode.packets.clear_interval }}
# Whether or not to clear packets on start. [Default: false]
clear_on_start = {{ $relayer.config.mode.packets.clear_on_start }}
# Toggle the transaction confirmation mechanism.
# The tx confirmation mechanism periodically queries the `/tx_search` RPC
# endpoint to check that previously-submitted transactions
# (to any chain in this config file) have been successfully delivered.
# If they have not been, and `clear_interval = 0`, then those packets are
# queued up for re-submission.
# Experimental feature. Affects telemetry if set to false.
# [Default: true]
tx_confirmation = {{ $relayer.config.mode.packets.tx_confirmation }}
# Auto register the counterparty payee on a destination chain to
# the relayer's address on the source chain. This can be used
# for simple configuration of the relayer to receive fees for
# relaying RecvPacket on fee-enabled channels.
# For more complex configuration, turn this off and use the CLI
# to manually register the payee addresses.
# [Default: false]
auto_register_counterparty_payee = false
# The REST section defines parameters for Hermes' built-in RESTful API.
# https://hermes.informal.systems/rest.html
[rest]
# Whether or not to enable the REST service. Default: false
enabled = {{ $relayer.config.rest.enabled }}
# Specify the IPv4/6 host over which the built-in HTTP server will serve the RESTful
# API requests. Default: 127.0.0.1
host = {{ $relayer.config.rest.host | squote }}
# Specify the port over which the built-in HTTP server will serve the restful API
# requests. Default: 3000
port = {{ $relayer.config.rest.port }}
# The telemetry section defines parameters for Hermes' built-in telemetry capabilities.
# https://hermes.informal.systems/telemetry.html
[telemetry]
# Whether or not to enable the telemetry service. Default: false
enabled = {{ $relayer.config.telemetry.enabled }}
# Specify the IPv4/6 host over which the built-in HTTP server will serve the metrics
# gathered by the telemetry service. Default: 127.0.0.1
host = {{ $relayer.config.telemetry.host | squote }}
# Specify the port over which the built-in HTTP server will serve the metrics gathered
# by the telemetry service. Default: 3001
port = {{ $relayer.config.telemetry.port }}
{{- range $i, $chain := $relayer.chains }}
{{ $fullchain := include "devnet.fullchain" (dict "name" $chain "file" $defaultFile "context" $) | fromJson }}
{{/*Read chain specific config from `relayer.config.chains` into chainConfig*/}}
{{ $chainConfig := dict }}
{{- range $config := $relayer.config.chains }}
{{- if eq $config.id $chain }}
{{- $chainConfig = $config }}
{{- end }}
{{- end }}
[[chains]]
id = "{{ $chain }}"
key_name = "{{ $chain }}-cli"
{{- if $fullchain.ics.enabled }}
ccv_consumer_chain = true
{{- end }}
rpc_addr = "http://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:26657"
grpc_addr = "http://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:9090"
{{- if eq $relayer.config.event_source.mode "pull" }}
event_source = { mode = 'pull', interval = '{{get $relayer.config.event_source "interval" | default "500ms"}}' }
{{- else }}
event_source = { mode = 'push', url = "ws://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:26657/websocket", batch_delay = '{{get $relayer.config.event_source "batch_delay" | default "500ms"}}' }
{{- end }}
# Experimental: Whether or not the full node is trusted.
trusted_node = false
account_prefix = "{{ $chainConfig.account_prefix | default $fullchain.prefix }}"
default_gas = {{ $chainConfig.default_gas | default 500000000 }}
max_gas = {{ $chainConfig.max_gas | default 1000000000 }}
rpc_timeout = "{{ $chainConfig.rpc_timeout | default "10s" }}"
store_prefix = "{{ $chainConfig.store_prefix | default "ibc" }}"
gas_multiplier = {{ $chainConfig.gas_multiplier | default 2 }}
max_msg_num = {{ $chainConfig.max_msg_num | default 30 }}
max_tx_size = {{ $chainConfig.max_tx_size | default 2097152 }}
clock_drift = "{{ $chainConfig.clock_drift | default "5s" }}"
max_block_time = "{{ $chainConfig.max_block_time | default "30s" }}"
trusting_period = "{{ $chainConfig.trusting_period | default "75s" }}"
trust_threshold = { numerator = "{{ ($chainConfig.trust_threshold | default dict).numerator | default "2" }}", denominator = "{{ ($chainConfig.trust_threshold | default dict).denominator | default "3" }}" }
{{- if eq $fullchain.type "evmos" }}
address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } }
gas_price = { price = 2500000, denom = "{{ $fullchain.denom }}" }
{{- else if eq $fullchain.type "injective" }}
address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } }
gas_price = { price = 2500000, denom = "{{ $fullchain.denom }}" }
{{- else }}
address_type = { derivation = 'cosmos' }
gas_price = { price = 0.25, denom = "{{ $fullchain.denom }}" }
{{- end }}
{{- end }}
---
{{- end }}
{{- end }}