Skip to content

Commit

Permalink
feat!: update hermes config (#1064)
Browse files Browse the repository at this point in the history
* feat!: update hermes config

* chore: upgrade to hermes 1.8.2
  • Loading branch information
rootulp authored Apr 12, 2024
1 parent a9d9821 commit 0ea0168
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions relayer/hermes/hermes_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion relayer/hermes/hermes_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0ea0168

Please sign in to comment.