Skip to content

Commit

Permalink
feature: chain config from relayer.config for hermes (#404)
Browse files Browse the repository at this point in the history
* add initial code to extract chain config from config directive

* update configmap for hermes

* create rc3 release
  • Loading branch information
Anmol1696 authored Jan 9, 2024
1 parent 6252526 commit 46972f7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/devnet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.48-rc2
version: 0.1.48-rc3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
31 changes: 19 additions & 12 deletions charts/devnet/templates/relayers/hermes/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ data:
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 }}"
Expand All @@ -101,18 +108,18 @@ data:
{{- else }}
websocket_addr = "ws://{{ $fullchain.hostname }}-genesis.{{ $.Release.Namespace }}.svc.cluster.local:26657/websocket"
{{- end }}
account_prefix = "{{ $fullchain.prefix }}"
default_gas = 500000000
max_gas = 1000000000
rpc_timeout = "10s"
store_prefix = "ibc"
gas_multiplier = 2
max_msg_num = 30
max_tx_size = 2097152
clock_drift = "5s"
max_block_time = "30s"
trusting_period = "75s"
trust_threshold = { numerator = '1', denominator = '3' }
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 1 }}", 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 }}" }
Expand Down

0 comments on commit 46972f7

Please sign in to comment.