From 0ea01688c9faef61099a85a20067e66410c82ce8 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Fri, 12 Apr 2024 14:18:27 -0400 Subject: [PATCH] feat!: update hermes config (#1064) * feat!: update hermes config * chore: upgrade to hermes 1.8.2 --- relayer/hermes/hermes_config.go | 20 +++++++++++++++----- relayer/hermes/hermes_relayer.go | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/relayer/hermes/hermes_config.go b/relayer/hermes/hermes_config.go index 92e6af3c1..61574f401 100644 --- a/relayer/hermes/hermes_config.go +++ b/relayer/hermes/hermes_config.go @@ -19,10 +19,14 @@ func NewConfig(chainConfigs ...ChainConfig) Config { } chains = append(chains, Chain{ - ID: chainCfg.ChainID, - RPCAddr: hermesCfg.rpcAddr, - GrpcAddr: fmt.Sprintf("http://%s", hermesCfg.grpcAddr), - WebsocketAddr: strings.ReplaceAll(fmt.Sprintf("%s/websocket", hermesCfg.rpcAddr), "http", "ws"), + ID: chainCfg.ChainID, + RPCAddr: hermesCfg.rpcAddr, + GrpcAddr: fmt.Sprintf("http://%s", hermesCfg.grpcAddr), + EventSource: EventSource{ + Mode: "push", + Url: strings.ReplaceAll(fmt.Sprintf("%s/websocket", hermesCfg.rpcAddr), "http", "ws"), + BatchDelay: "200ms", + }, RPCTimeout: "10s", AccountPrefix: chainCfg.Bech32Prefix, KeyName: hermesCfg.keyName, @@ -150,11 +154,17 @@ type TrustThreshold struct { Denominator string `toml:"denominator"` } +type EventSource struct { + Mode string `toml:"mode"` + Url string `toml:"url"` + BatchDelay string `toml:"batch_delay"` +} + type Chain struct { ID string `toml:"id"` RPCAddr string `toml:"rpc_addr"` GrpcAddr string `toml:"grpc_addr"` - WebsocketAddr string `toml:"websocket_addr"` + EventSource EventSource `toml:"event_source"` RPCTimeout string `toml:"rpc_timeout"` AccountPrefix string `toml:"account_prefix"` KeyName string `toml:"key_name"` diff --git a/relayer/hermes/hermes_relayer.go b/relayer/hermes/hermes_relayer.go index d44338dbb..d99e45745 100644 --- a/relayer/hermes/hermes_relayer.go +++ b/relayer/hermes/hermes_relayer.go @@ -18,7 +18,7 @@ import ( const ( hermes = "hermes" defaultContainerImage = "ghcr.io/informalsystems/hermes" - DefaultContainerVersion = "1.4.0" + DefaultContainerVersion = "1.8.2" hermesDefaultUidGid = "1000:1000" hermesHome = "/home/hermes"