Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: update hermes config #1064

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading