-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: enabled retrieval of network gasPrice
in sendRawTransaction
using MAPI instead of HAPI.
#2981
Conversation
Signed-off-by: Logan Nguyen <[email protected]>
gasPrice
in sendRawTransaction
using MAPI instead of HAPI.
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.
Signed-off-by: Logan Nguyen <[email protected]> Revert "fix: updated getFeeWeibars" This reverts commit 94b1f9d. Revert "fix: updated getFeeWeibars" Signed-off-by: Logan Nguyen <[email protected]>
94b1f9d
to
80aea11
Compare
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
…ined value Signed-off-by: Logan Nguyen <[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.
I'm not sure why we want to set the maxTransactionFee
to MAX_GAS_PER_SEC
. 🤔
Is this a realistic scenario for the relay operator to pay that much for a transaction?
That's a valid concern. Please create a new ticket and move the conversation there. This PR focuses on the logic of utilizing MAPI instead of HAPI to get the gasPrice of the network. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2981 +/- ##
==========================================
+ Coverage 89.54% 91.39% +1.85%
==========================================
Files 56 59 +3
Lines 3796 3950 +154
Branches 775 809 +34
==========================================
+ Hits 3399 3610 +211
+ Misses 350 291 -59
- Partials 47 49 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
This PR enables
sendRawTransaction
to retrieve the currentgasPrice
of the network via the mirror node, instead of querying the consensus node for the fee schedule file. By switching to MAPI, the relay operator account can avoid incurring costs associated with MAPI queries.Related issue(s):
Fixes #2979
Notes for reviewer:
This PR utilizes the
gasPrice()
method in theeth.ts
module forsendRawTransaction
to take advantage of querying thegasPrice
through the mirror node. If that query fails, it falls back to querying the consensus node for the fee schedule using thegetTinybarGasFee
method in thesdkClient
.Checklist