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

Question: rly tx link with custom client trusting periods for each client #1357

Closed
ashishchandr70 opened this issue Dec 6, 2023 · 4 comments
Assignees

Comments

@ashishchandr70
Copy link

Hi,

When creating the client/connection/channel in one go, I use rly tx link .... Now, this command does support the --client-tp flag so I use it like so:

rly tx link sagaxl --client-tp 403200s --override --src-port transfer --dst-port transfer --order unordered --version ics20-1

This does create the client and the connection and channel but the trusting_period for both clients is set to the same value, which is not often the case as different chains can require different trusting_period values based on their chain's unbonding_period

This is one of the client's config after the above command completes successfully:

# rly q client axelar 07-tendermint-768 --log-format json|jq .
{
  "client_state": {
    "@type": "/ibc.lightclients.tendermint.v1.ClientState",
    "chain_id": "ssc-testnet-1",
    "trust_level": {
      "numerator": "1",
      "denominator": "3"
    },
    "trusting_period": "403200s",
    "unbonding_period": "1814400s",
    "max_clock_drift": "600s",
    "frozen_height": {
      "revision_number": "0",
      "revision_height": "0"
    }
...<snipped>...

Most chains require that you set the trusting_period to 2/3 of the unbonding_period.

Am I using the command incorrectly or should there be an option to set this for chain_1 and chain_2 separately in the rly tx link command?

I know I can do this separately by rly tx client for each chain separately but if we have rly tx link, it should not be too much work to introduce a flag for both chains separately.

Thank you

@boojamya
Copy link
Contributor

boojamya commented Dec 6, 2023

Hi @ashishchandr70,

If you don't use the --client-tp flag, the relayer will create the trusting period based of each client separately (85% of the unbonding time).

So sounds like this is the answer you're looking for... just don't use that flag.

If you do use the flag, rly tx link will create the same specified trusting period for each client.

If you want separate custom trusting periods per client, you're correct, you'll need to run rly tx client separately for each chain.

@ashishchandr70
Copy link
Author

Thanks @boojamya. The issue with the 85% of unbonding time is that most of the chains we are integrating with (Axelar, Osmosis) require the trusting_period to be 2/3 of Unbonding Period, and this unbonding_period is also not the same (at least in our testnet, our chain has an unbonding period of 21d whereas Axelar has a much lower number). This is of course just using rly tx link without the --client-tp flag.

I was hoping that this request can be considered for a future PR i.e. adding a separate --client-tp flag for each chain. For now, I can use rly tx client but then I lose the brevity of a rly tx link. If this is not something worthwhile, I will close this issue.

@boojamya
Copy link
Contributor

boojamya commented Dec 7, 2023

Agree, this would be a great addition.
Also easy to implement.

@boojamya
Copy link
Contributor

Closed via: #1365

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