-
Notifications
You must be signed in to change notification settings - Fork 74
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 fast return on eth_sendRawTransaction #3273
Conversation
Test Results 22 files + 3 309 suites +64 1h 1m 14s ⏱️ + 31m 40s For more details on these failures, see this check. Results for commit d274e6b. ± Comparison against base commit 7accf1f. This pull request removes 9 and adds 4 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
4dfec8f
to
239b1fa
Compare
11c9a39
to
3fa0638
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.
Left some notes and questions for reviewers.
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
323ded7
to
8950af9
Compare
LG, several tests are failing due to an |
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Quality Gate failedFailed conditions |
@natanasow Thanks for the good catch! Missed that during rebasing! Updated! |
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.
LGTM. Thanks for the great work!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3273 +/- ##
==========================================
+ Coverage 77.82% 77.92% +0.09%
==========================================
Files 66 66
Lines 4474 4476 +2
Branches 1005 1004 -1
==========================================
+ Hits 3482 3488 +6
+ Misses 617 615 -2
+ Partials 375 373 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
The
eth_sendRawTransaction
endpoint currently faces timeouts from various sources, including server, network, and client settings. For large callData, it uses Hedera File Service (HFS) to create and append file transactions, increasing latency and degrading user experience.This PR introduces a new conceptual feature design for
eth_sendRawTransaction
, enabling the API to return the transaction hash immediately upon passing prechecks. All subsequent processing (e.g., broadcasting to the network, handling file transactions, polling the mirror node, tracking HBAR consumption, etc.) is handled asynchronously in the background.The primary impact of this feature is a significant reduction in end-to-end client wait times while ensuring backend integrity remains intact.
Important Note for Clients:
With the transaction hash returned instantly, clients must monitor the transaction status using this hash (e.g., via
eth_getTransactionReceipt
or monitoring confirmations).If a request encounters internal errors (e.g., exceeding
maxChunkSize
, HBAR limits, SDK errors), these will no longer appear in the response. Instead, a transaction hash is returned, andeth_getTransactionReceipt
may return null indefinitely. That said, it remains the responsibility of the users to handle such cases appropriately.Fixes #3270
Related issue(s):
Additional aspects and considerations of the feature are highlighted in the ongoing discussion in #3202. Please feel free to share your insights in the thread if you have any.
Notes for reviewer:
TL;DR; The primary change in this PR is a refactor, mainly within
eth.ts
. The remaining work involves updating tests to align with the new immediate return logic. Most efforts are directed toward adding polling logic to verify the validity of transactions before proceeding to the next instruction.USE_ASYNC_TX_PROCESSING
, acts as the feature flag for this functionality.EthImpl.sendRawTransaction
method has been refactored to extract transaction processing logic into a new function,sendRawTransactionTxProcessor()
. WhenUSE_ASYNC_TX_PROCESSING
is enabled,sendRawTransactionTxProcessor()
is called withoutawait
, allowing transaction processing to run asynchronously in the background. If the flag is disabled, the function is awaited, maintaining the original synchronous flow.Checklist