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

show a more verbose message when perform gas is lower than gas used #11686

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

shileiwill
Copy link
Contributor

Screenshot 2024-01-04 at 10 08 03 AM

As seen in the above screenshot, when simulatePerformUpkeep fails bc of gas low, we dont give a detailed message, and users have to dig into Tenderly to compare the 2 numbers.

In this PR, we fetch the 2 numbers, compare them, and show a verbose message when PerformGas set by the upkeep is lower than GasUsed.

Tested locally:

leishi@MB-MJ2FP47WKD chaincli % go run main.go keeper debug 107898679162339936390863681941183272204956889701514940875700959060546913091267
2024/01/04 12:02:45 Using config file .env
2024/01/04 12:02:45 WARNING: no PRIVATE_KEY set: cannot use commands that deploy contracts or send transactions
2024/01/04 12:02:46 ☑️  upkeep is active (not paused or cancelled)
2024/01/04 12:02:46 ☑️  upkeep is funded above the min balance
2024/01/04 12:02:46 ☑️  upkeep identified as conditional trigger
2024/01/04 12:02:49 ❌ this upkeep is not eligible: simulate perform upkeep unsuccessful, PerformGas (2300) is lower than GasUsed (5140)
2024/01/04 12:02:49 🔗 upkeep link: https://automation.chain.link/fuji/107898679162339936390863681941183272204956889701514940875700959060546913091267
2024/01/04 12:02:49 🔗 upkeep contract address: https://testnet.snowtrace.io/address/0x39012Fe60799F16F1678DFbcB9933143a6e24170
2024/01/04 12:02:49 🔗 checkUpkeep simulation: https://dashboard.tenderly.co/simulator/b11f21d8-a02b-464c-ba62-45f84260bd46
2024/01/04 12:02:49 🔗 simulatePerformUpkeep simulation: https://dashboard.tenderly.co/simulator/34b5ec5c-bdee-488b-91a6-7afb6aaff028

@shileiwill shileiwill requested a review from RyanRHall January 4, 2024 20:04
Copy link
Contributor

github-actions bot commented Jan 4, 2024

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition D Maintainability Rating on New Code (is worse than A)
Failed condition 32.22% Technical Debt Ratio on New Code (is greater than 4%)

See analysis details on SonarQube

Fix issues before they fail your Quality Gate with SonarLint SonarLint in your IDE.

@shileiwill shileiwill marked this pull request as ready for review January 4, 2024 21:54
@shileiwill shileiwill added this pull request to the merge queue Jan 9, 2024
Merged via the queue into develop with commit 8499fe8 Jan 9, 2024
77 checks passed
@shileiwill shileiwill deleted the debugging_perform_gas branch January 9, 2024 00:33
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.

2 participants