-
Notifications
You must be signed in to change notification settings - Fork 332
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
ADR for channel and connection handshake commands #637
Comments
More details on this, it will be allowed in the future (v0.3) but it would do something else:
(*) this means progressing connection handshakes, channel (open or close) handshakes, and relaying recv packets, acknowledgment and timeouts. On start the relayer will re-create any missed events by scanning the chain states. |
This sounds very nice & comprehensive. But I'm wondering if it's motivated by an actual use-case than would benefit. This command would be more advanced than necessary given the requirements from #628. In particular the last part (finalizing the conn open handshake) seems to cover a corner-case that are valuable for devs and testing, but not sure if a user would bother understanding the semantics of partially-open connections to run the handshake to completion. WDYT? |
The handshake completion was mentioned by @brapse in the last IBC meeting. The reuse of existing client and connections (when not specified) was mentioned a few times and Go relayer does that. I think it makes sense. But we can start with partial functionality (e.g. not implement the |
Thank you, I just wanted to make sure they are both useful to someone and a priority, as I haven't seen these requirements articulated before. |
Here's what I would propose w.r.t connection lifecycle: Command: Semantics: Find or create the connectionMore specifically, there are multiple cases to consider. This could be a rough procedure:
The precondition for reach point 6 below is that there should be two clients with relatively fresh headers.
General:
|
Summarizing below a discussion with @adizere here. For next release:
We will write a small ADR with a few more details on this and review. |
Crate
relayer, relayer-cli
Summary
Proposal for the relayer CLIs (
tx raw
excluded)The proposal is summarized in ADR 006.
Problem Definition
Currently the relayer CLIs do not cover user needs and offer a poor UX. See for example #628.
Proposal
I propose the following new/ changed CLIs:
Follow the Go relayer commands for channel and connection handshakes (?):
hermes channel handshake..
should be renamed tohermes tx channel ..
hermes tx connection...
Add options to commands so they can establish new connections and channels, finalize any unfinished handshakes, reuse clients, connection, etc:
hermes tx connection <src-chain> [<dst-chain>] [--src-client <client-id>] [--dst-client <client-id>] [--src-connection <connection-id>]
Examples:
hermex tx connection ibc-0 ibc-1
- creates new clients and establishes a new connection between the two chainsconfig.toml
and reuse those clients? And create new clients only if some to use are not found. I believe the Go relayer does this.hermex tx connection ibc-0 ibc-1 --src-client client-0 --dst-client client-1
- establishes a new connection using the specified clients. Note that only one client may be specified, the other is created (with the same question as above)hermex tx connection ibc-0 --src-connection connection-0
- finalizes the handshake forconnection-0
hermes tx channel <src-chain> [<dst-chain>] [--src-connection <connection-id>] [--src-port <port-id>] [--dst-port <port-id>] [--src-channel <channel-id>]
Examples:
hermex tx channel ibc-0 ibc-1 --src-port transfer --dst-port transfer
- establishes a new connection (with new clients) and a new channel between the two ports (we have this today)hermex tx channel ibc-0 --src-connection connection-0 --src-port transfer --dst-port transfer
- establishes a new channel usingconnection-1
, between the two ports.connection-0
must exist, if not in open state it will finalize the connection handshake before establishing the new channelhermex tx channel ibc-0 --src-port transfer--src-channel channel-0
- finalizes the handshake forchannel-0
I propose we change
hermes start ...
command:hermes start <src-chain> [<dst-chain>] [--src-port <port-id>] [--dst-port <port-id>] [--src-channel <channel-id>]
hermes start ibc-0 ibc-1
- don't allow this anymore, the equivalent would be the one belowconnection.paths
sections and uses the ports specified in the first onehermes start ibc-0 ibc-1 --src-port transfer --dst-port transfer
- creates new clients, connection, channel between the two chains and portshermes start ibc-0 --src-port transfer --src-channel channel-0
- finalizes any pending handshakes (forchannel-0
and maybe the connection that the channel uses) and starts the event listening loopThere is a recurrent question above: when an identifier for a required client or connection is not specified should a command look for an existing client or connection or create new ones? Should we add a
--reuse-if-exist
type flag to allow both behaviors?For Admin Use
The text was updated successfully, but these errors were encountered: