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

chore(imp) improve cli error messages #1371

Merged
merged 6 commits into from
Feb 9, 2023
Merged

Conversation

GAtom22
Copy link
Contributor

@GAtom22 GAtom22 commented Feb 9, 2023

Description

Improve error messages related to gas and fees to be more informative


Closes https://linear.app/evmos/issue/ENG-1470/improve-gas=auto-error-messages

@linear
Copy link

linear bot commented Feb 9, 2023

ENG-1470 Improve `gas=auto` error messages

There are external reports being brought to the Evmos team that the automated gas calculation is not always reliable in calculating the needed gas.

----

Example taken from external devs (provided by nic):

Hi team we got errors below when setup our validator

raw_log: 'provided fee < minimum global fee ( < 5846880000000000aevmos). Please increase
  the gas price.: insufficient fee'

how to fix this

evmosd tx staking create-validator \
--amount=1000000000000000000aevmos \
--pubkey='xxxxxxxxxx' \
--moniker="Dora Factory" \
--chain-id=evmos_9001-2 \
--commission-rate="1.0" \
--commission-max-rate="1.0" \
--commission-max-change-rate="1.0" \
--min-self-delegation="1" \
--gas="auto" \
--gas-adjustment=1.5 \
--from=dora \
--details="Public Good Staking" \
--node=https://tendermint.bd.evmos.org:26657

Problem: The error msg is actually saying that no fee is provided. However, it is not clear

Solution: Refactor error messages to be more informative

@GAtom22 GAtom22 marked this pull request as ready for review February 9, 2023 19:48
@GAtom22 GAtom22 requested a review from a team as a code owner February 9, 2023 19:48
@GAtom22 GAtom22 requested review from Vvaradinov, 0a1c, facs95, fedekunze and MalteHerrmann and removed request for a team February 9, 2023 19:48
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #1371 (0cb7aa3) into main (04c0870) will decrease coverage by 0.53%.
The diff coverage is 100.00%.

❗ Current head 0cb7aa3 differs from pull request most recent head 1fb78f4. Consider uploading reports for the commit 1fb78f4 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1371      +/-   ##
==========================================
- Coverage   72.12%   71.59%   -0.53%     
==========================================
  Files         256      256              
  Lines       17544    17549       +5     
==========================================
- Hits        12653    12565      -88     
- Misses       4327     4427     +100     
+ Partials      564      557       -7     
Impacted Files Coverage Δ
app/ante/cosmos/min_price.go 100.00% <100.00%> (ø)
app/ante/evm/fee_checker.go 96.73% <100.00%> (ø)
app/ante/evm/setup.go 15.65% <0.00%> (-66.09%) ⬇️
app/ante/evm/fees.go 56.04% <0.00%> (-18.69%) ⬇️

GAtom22 and others added 2 commits February 9, 2023 18:30
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

utACK pending changelog entry

@facs95 facs95 enabled auto-merge (squash) February 9, 2023 22:20
@facs95
Copy link
Contributor

facs95 commented Feb 9, 2023

@Mergifyio backport release/v11.0.x

@mergify
Copy link
Contributor

mergify bot commented Feb 9, 2023

backport release/v11.0.x

✅ Backports have been created

@facs95 facs95 merged commit 991718f into main Feb 9, 2023
@facs95 facs95 deleted the GAtom22/imp-cli-err-msgs branch February 9, 2023 22:31
mergify bot pushed a commit that referenced this pull request Feb 9, 2023
* chore(imp) improve cli error messages

* Update app/ante/evm/fee_checker.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* chore(imp) add changelog entry

---------

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
(cherry picked from commit 991718f)

# Conflicts:
#	CHANGELOG.md
#	app/ante/cosmos/min_price.go
#	app/ante/cosmos/min_price_test.go
#	app/ante/evm/fee_checker.go
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.

3 participants