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

Improved fee-related error message #2261

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

ljoss17
Copy link
Contributor

@ljoss17 ljoss17 commented Jun 2, 2022

Closes: #1400

Description

This PR adds a match case for the SDK Err(13), which is triggered when the configured gas price is lower than the minimum gas price allowed on the chain.

Trigger the error

It is possible to trigger the error using gm:

gm.toml
[global]
gaiad_binary="<Path to gaiad binary. E.g: /opt/bin/gaiad>"

[global.hermes]
binary="<Path to hermes binary. E.g: /home/.hermes/bin/hermes>"


[a]
  add_to_hermes = true
  ports_start_at = 27000

[b]
  add_to_hermes = true
  ports_start_at = 27030
  1. use the above gm config
  2. gm start, gm hermes config, gm hermes keys
  3. gm stop a
  4. open the configuration file for the chain a, located in .gm/a/config/app.toml
    • set minimum-gas-prices = "0.017stake"
  5. gm start a
  6. replace the gas configuration for chain a in the .hermes/config.toml
    • set gas_price = { price = 0.001, denom = 'stake' }
  7. hermes create client a b
    • now we should see the error with the diagnostic for the error

PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@ljoss17 ljoss17 marked this pull request as ready for review June 3, 2022 07:02
@adizere adizere self-assigned this Jun 3, 2022
Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Luca!

@adizere adizere merged commit 69471d0 into master Jun 3, 2022
@adizere adizere deleted the luca_joss/improve_fee_related_error_message branch June 3, 2022 08:49
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Added handler for SDK Err(13) to output understandable error meaning

* Added changelog entry for error handling improvement
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 this pull request may close these issues.

Unhelpful fee-related error messages
2 participants