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

Gaia manager hermes config command writes incorrect strategy #1007

Closed
5 of 7 tasks
adizere opened this issue May 27, 2021 · 0 comments · Fixed by #1008
Closed
5 of 7 tasks

Gaia manager hermes config command writes incorrect strategy #1007

adizere opened this issue May 27, 2021 · 0 comments · Fixed by #1008

Comments

@adizere
Copy link
Member

adizere commented May 27, 2021

Crate

gm

Summary of Bug

The gm hermes config command overwrites entirely the config file of Hermes. This is generally not a problem, except we recently changed how the global section of Hermes config looks like, and gm needs to be updated to reflect these recent changes.

Concretely, it used to be that the strategy field in the global section of the Hermes config was a String with the default value of naive (and was even ignored):

https://github.com/informalsystems/ibc-rs/blob/d9ce34bb961d5750366dbc970fd116a638424d07/config.toml#L1-L2

With PR #924 we changed the valid options for the strategy field to be different:

https://github.com/informalsystems/ibc-rs/blob/7c0418e3f6adf270a2a91f19b39a0141234c7545/config.toml#L1-L5

gm v0.0.1 will write naive in this field, which Hermes will not recognize.

Version

7c0418e

Steps to Reproduce

$ gm start
$ gm hermes config
$ gm hermes keys

error: hermes fatal error: parse error: unknown variant `naive`, expected `packets` or `all` for key `global.strategy` at line 76 column 1

Acceptance Criteria

  • gm hermes config builds a config file that Hermes can parse correctly;
  • stretch goal: gm hermes config should leave the global section of the config untouched.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere adizere changed the title Gaia manager hermes config command write incorrect strategy field Gaia manager hermes config command writes incorrect strategy May 27, 2021
adizere added a commit that referenced this issue May 27, 2021
* gm hermes config preserves the global section; fixes #1007.

* Moved parameter loading to load_config

* Added defaults for strategy and log_level
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this issue Sep 13, 2022
…s#1008)

* gm hermes config preserves the global section; fixes informalsystems#1007.

* Moved parameter loading to load_config

* Added defaults for strategy and log_level
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

Successfully merging a pull request may close this issue.

1 participant