-
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
fix: calculated transaction record query cost instead of querying operator balance #2848
fix: calculated transaction record query cost instead of querying operator balance #2848
Conversation
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.
Instead of extending the timeout from 45 seconds to 90 seconds to address the flakiness, I think we should focus on the fact that this transaction used to complete in less than 45 seconds, and now it’s taking twice as long.
The delay is especially evident when the relay executes multiple file appends and has to retry operator balance queries during hbar limiter metrics capture. To improve user experience and avoid unnecessary slowdowns, I suggest we handle these metrics asynchronously and address the actual problem which we have - that this transaction no longer executes in the time frame it used to.
Hey @victor-yanev, thanks for the comment! I also noticed that the main issue behind this timeout problem stems from the |
packages/relay/src/lib/services/transactionService/transactionService.ts
Outdated
Show resolved
Hide resolved
packages/relay/tests/lib/services/transactionService/transactionService.spec.ts
Outdated
Show resolved
Hide resolved
7c78887
to
bf11a76
Compare
…,000ms to reduce flakiness Signed-off-by: Logan Nguyen <[email protected]>
…ator balance Signed-off-by: Victor Yanev <[email protected]> Signed-off-by: Logan Nguyen <[email protected]> Co-Authored-By: Victor Yanev <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
bf11a76
to
e5cab22
Compare
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2848 +/- ##
==========================================
- Coverage 82.66% 81.81% -0.86%
==========================================
Files 49 46 -3
Lines 3554 3403 -151
Branches 751 718 -33
==========================================
- Hits 2938 2784 -154
- Misses 370 391 +21
+ Partials 246 228 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
This PR introduces a solution to calculate the transaction record query based on the exchange rate instead of querying the operator's balance. This fix eliminates the need for the two balance queries in each metrics capture request, which could cause significant timeouts when the callData size is large.
Fixes #2846
Related issue: #2808
Related issue: #2847
Notes for reviewer:
Checklist