-
Notifications
You must be signed in to change notification settings - Fork 78
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
Limit the ethCall gas to 15_000_000, otherwise the call will fail #513
Conversation
Signed-off-by: Maksim Dimitrov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
Missing log and test
Signed-off-by: Maksim Dimitrov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
packages/relay/src/lib/eth.ts
Outdated
// With values over 15_000_000 the call will fail with BUSY error | ||
if (gas > 15_000_000) { | ||
this.logger.trace(`${requestIdPrefix} eth_call gas amount (${gas}) exceeds network limit, capping gas to 15_000_000`); | ||
gas = 15_000_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could have made 15_000_000
a const
Can make this change in a future PR, no biggie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll still probably have to merge main at some point to fix the dapp tests, I can push that change too
Signed-off-by: Maksim Dimitrov <[email protected]>
Codecov ReportBase: 76.38% // Head: 76.67% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #513 +/- ##
==========================================
+ Coverage 76.38% 76.67% +0.29%
==========================================
Files 12 12
Lines 923 926 +3
Branches 144 145 +1
==========================================
+ Hits 705 710 +5
+ Misses 165 164 -1
+ Partials 53 52 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Maksim Dimitrov <[email protected]>
Kudos, SonarCloud Quality Gate passed!
|
@dimitrovmaksim, all your commits need to be signed |
All of them seem to have the "Signed-off-by:" message |
Closing in favor of #526 |
Signed-off-by: Maksim Dimitrov [email protected]
Description:
I'm not sure if this is the best way to do this, but ethCalls with gas over 15_000_000 will fail with BUSY error, because the Hedera limit is set to 15_000_000. This breaks the integration with TheGraph, when executing
eth_call
s from the event handlers, because the graph-node reserves all 50_000_000 gas.Related issue(s):
Fixes #511
Notes for reviewer:
Checklist