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

Client create parameters are ignored #1921

Closed
3 of 7 tasks
adizere opened this issue Feb 25, 2022 · 1 comment · Fixed by #2004
Closed
3 of 7 tasks

Client create parameters are ignored #1921

adizere opened this issue Feb 25, 2022 · 1 comment · Fixed by #2004
Assignees
Labels
A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI I: configuration Internal: related to Hermes configuration I: logic Internal: related to the relaying logic O: usability Objective: cause to improve the user experience (UX) and ease using the product
Milestone

Comments

@adizere
Copy link
Member

adizere commented Feb 25, 2022

Summary of Bug

When creating a client with hermes create client SRC DST we can pass three parameters:

  1. -d, --clock-drift <CLOCK_DRIFT>
    • Override the default clock drift specified in the configuration
  2. -p, --trusting-period <TRUSTING_PERIOD>
    • Override the trusting period specified in the config
  3. -t, --trust-threshold <TRUST_THRESHOLD>
    • Override the trust threshold specified in the configuration

It seems that these parameters are just ignored by Hermes.

Version

I think this was added recently (#836), but I reproduced on current master

hermes 0.12.0+ffb2c522

ffb2c52

Steps to Reproduce

We know the following: In config.toml we set for chain ibc-1:

  • trusting_period = '1days'
  • clock_drift = '500s' as the basis for computing the clock drift
  • trust_threshold = { numerator = '1', denominator = '3' }

These are the default we would expect to be able to overwrite whenever we create a client for source chain ibc-1.

For trusting period parameter -p

Steps:

  1. Create a client for source chain ibc-1 and destination ibc-0 overwritting the trusting period
  2. hermes create client ibc-0 ibc-1 -p 3days
Running `target/debug/hermes create client ibc-0 ibc-1 -p 3days`
2022-02-25T14:18:39.335177Z  INFO ThreadId(21) send_tx{id=ibc-0}: refresh: retrieved account sequence=21 number=1
Success: CreateClient(
...
            client_id: ClientId(
                "07-tendermint-3",
  1. Query the newly-created client: hermes query client state ibc-0 07-tendermint-3 | grep trusting
trusting_period: 86400s,

It is still using the default 1day instead of 3days.

For trust threshold -t

  1. hermes create client ibc-0 ibc-1 -t 2/3
"07-tendermint-4",
  1. hermes query client state ibc-0 07-tendermint-3 | grep -A3 trust_level
trust_level: TrustThreshold {
            numerator: 1,
            denominator: 3,
        },

For max clock drift -d

  1. hermes create client ibc-0 ibc-1 -d 1s
  2. hermes query client state ibc-0 07-tendermint-5 | grep -A3 drift
max_clock_drift: 511s,

Acceptance Criteria

  • All three create client options are correctly applied in the CLI
  • Integration test capturing the three custom options

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere adizere added A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI I: logic Internal: related to the relaying logic client O: usability Objective: cause to improve the user experience (UX) and ease using the product I: configuration Internal: related to Hermes configuration labels Feb 25, 2022
@adizere adizere added this to the v0.13.0 milestone Feb 25, 2022
@mzabaluev
Copy link
Contributor

The problem is that the implementation of build_client_state for CosmosSdkChain ignores the configuration parameters for the destination chain, except clock_drift. Also, perhaps the destination's chain config is a wrong structure to pass such custom client parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI I: configuration Internal: related to Hermes configuration I: logic Internal: related to the relaying logic O: usability Objective: cause to improve the user experience (UX) and ease using the product
Projects
No open projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

2 participants