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

Hermes Chain Configuration Unclear #1272

Closed
5 tasks
Tracked by #1350 ...
alexanderbez opened this issue Aug 10, 2021 · 7 comments · Fixed by #1443
Closed
5 tasks
Tracked by #1350 ...

Hermes Chain Configuration Unclear #1272

alexanderbez opened this issue Aug 10, 2021 · 7 comments · Fixed by #1443
Assignees
Labels
A: question Admin: further information is requested I: documentation Internal: improvements or additions to documentation
Milestone

Comments

@alexanderbez
Copy link

alexanderbez commented Aug 10, 2021

Crate

ibc-relayer(-cli)

Summary

Please close this issue if a duplicate.

Relayers are still a relatively new thing in the Cosmos/IBC landscape and there aren't many operators that run them or know how to run and configure them effectively.

The current configuration, specifically the [[chain]], doesn't really document what chains the values correspond to.

Specifically, I imagine a relayer will listen for events/txs from a source chain and relay them to a destination chain and this relayer will typically exist on the same host of the destination chain. It's not clear, for example, if the id is the source chain in this context or the chain being relayed (txs sent) to (I assume the destination chain). The same applies for the gRPC, websocket, and RPC endpoints. I think the rest of the configurations are pretty self-explanatory (they're for the destination chain).

Proposal

Document in the configuration if the relevant values correspond to the source or destination chain.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Author

alexanderbez commented Aug 10, 2021

Based on the example config, https://hermes.informal.systems/config.html#example-configuration-file, it seems Hermes expects an operator to run a full-node for both chains, typically on the same host? If so, feel free to close this issue :)

@adizere adizere added I: documentation Internal: improvements or additions to documentation A: question Admin: further information is requested labels Aug 12, 2021
@adizere adizere added this to the 08.2021 milestone Aug 12, 2021
@adizere adizere self-assigned this Aug 12, 2021
@adizere
Copy link
Member

adizere commented Aug 12, 2021

Hi Alexandr,
Thanks for opening this issue, I realize our documentation is not very clear in the points you raised! I'll try to clarify here, and please follow-up if I'm missing anything.

Based on the example config, https://hermes.informal.systems/config.html#example-configuration-file, it seems Hermes expects an operator to run a full-node for both chains, typically on the same host? If so, feel free to close this issue :)

Hermes does expect connectivity to all endpoints (namely, rpc, grpc, and ws) for all chains specified in config.toml. But it depends what functionality do you want to use Hermes for concretely. Suppose you configure two chains cosmoshub-4 and osmosis-1 in config.toml, but all you ever use Hermes is to

hermes query clients cosmoshub-4

Then at runtime Hermes will not try to establish connection to any of the endpoints configured for chain osmosis-1.

typically on the same host?

Not necessarily on the same host.

The current configuration, specifically the [[chain]], doesn't really document what chains the values correspond to.

Each [[chain]] section has a an id tag, which specifies the chain identifier for that whole section.

Specifically, I imagine a relayer will listen for events/txs from a source chain and relay them to a destination chain and this relayer will typically exist on the same host of the destination chain.

If you run hermes start, then Hermes will relay by default on all channels available between all the configured chains. In this way, every configured chain will act as a source (in the sense that Hermes listens for events) and as a destination (to relay packets that others chains have sent). To restrict relaying on specific channels, or uni-directionally, you can use packet_filter policies.

@alexanderbez
Copy link
Author

Thanks for the excellent explanation @adizere!

Quick clarification,

In this way, every configured chain will act as a source (in the sense that Hermes listens for events) and as a destination (to relay packets that others chains have sent). To restrict relaying on specific channels, or uni-directionally, you can use packet_filter policies.

  • Every chain will act as source of events, but what does it do with those events? I imagine it constructs messages to sign and relay to other chains, right? So it'll need configuration for the destination chain(s) as well?
  • Every chain will acts as a destination, but it only for txs that the relayer signs and constructs from another source chain, right?

@adizere
Copy link
Member

adizere commented Aug 13, 2021

  • Every chain will act as source of events, but what does it do with those events? I imagine it constructs messages to sign and relay to other chains, right? So it'll need configuration for the destination chain(s) as well?
  • Every chain will acts as a destination, but it only for txs that the relayer signs and constructs from another source chain, right?

That's correct. If there are only two chains configured, then only packets between those two can Hermes relay, i.e., the two chains will serve as a source for each other, and likewise as a destination for each other's relevant events. Hermes will ignore all events that pertain to chains which are unknown (unspecified in config.toml).

@adizere
Copy link
Member

adizere commented Aug 13, 2021

Glad to help!

Is there a specific use-case you might have in mind that you'd like Hermes to cover (e.g., uni-directional relaying)? Also, I leave it up to you to close this issue if we managed to clarify it.

@alexanderbez
Copy link
Author

This clarifies it for me. Thank you so much.

@romac romac closed this as completed Aug 17, 2021
@romac
Copy link
Member

romac commented Aug 17, 2021

Let's actually re-open this until we clarify the points above directly in the configuration/guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: question Admin: further information is requested I: documentation Internal: improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants