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

for same path, channel with different client and connection possible? #1311

Open
taitruong opened this issue Oct 17, 2023 · 2 comments
Open

Comments

@taitruong
Copy link

How does client, connection and channel related to each other? Like for this path example:

paths:
    junotestnet-stargazetestnet:
        src:
            chain-id: uni-6
            client-id: 07-tendermint-629 # client CHANNEL_1_JUNO_TO_STARGAZE, target: 07-tendermint-584
            connection-id: connection-735 # connection CHANNEL_1_JUNO_TO_STARGAZE, target: connection-596
        dst:
            chain-id: elgafar-1
            client-id: 07-tendermint-584 # client CHANNEL_1_STARGAZE_TO_JUNO, target: 07-tendermint-629
            connection-id: connection-596 # connection CHANNEL_1_STARGAZE_TO_JUNO, target: connection-735
        src-channel-filter:
            rule: allowlist
            channel-list:
                - channel-721 # channel CHANNEL_1_JUNO_TO_STARGAZE, target: channel-589
                - channel-726 # channel INTERCHAIN_WHITELIST_ADDRESSES_CHANNEL_1_JUNO_TO_STARGAZE, target: channel-594

What happens if I create a new channel with a new client and connection? So I'd have 2 channels in config.yaml. Seems like in config for each path only ONE client-id and connection-id can be configured.

Guess relayer would still relay both channels, but for what are client-id and connect-id used then? Was looking into this doc, but can't find much info about this: https://github.com/cosmos/relayer/blob/main/docs/create-path-across-chain.md

@agouin
Copy link
Member

agouin commented Oct 17, 2023

In rly, a path embodies a single pair of clients, connections, and then the channels (one to many) on top of that connection pair. To relay channel(s) on a different pair of clients/connections, you should configure a separate path.

However, it is usually best practice to use the canonical pair of clients and connections between chains for all channels. rly will give a warning when creating new clients if a client already exists.

@taitruong
Copy link
Author

In rly, a path embodies a single pair of clients, connections, and then the channels (one to many) on top of that connection pair. To relay channel(s) on a different pair of clients/connections, you should configure a separate path.

However, it is usually best practice to use the canonical pair of clients and connections between chains for all channels. rly will give a warning when creating new clients if a client already exists.

As far as I understand a client refers to 2 chains. Like chain A and B. So if a connection and channel is created - here also it refers to chain A and B.
It is possible to use existing connection and create another channel (even for different ports/contracts).

Afaik, clients are updated e.g. on each relay. So the more connections there are, the likely hood of clients staying active is even higher with channels using same connections, right? Isn't this a good practice?

So in case of rly I have to setup an extra path for this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants