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

Get TransactionRecord via consensus node in TransactionService can be improved for better performance #2847

Closed
quiet-node opened this issue Aug 19, 2024 · 0 comments · Fixed by #2873
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@quiet-node
Copy link
Member

quiet-node commented Aug 19, 2024

Problem

Currently, the TransactionService.getTransactionStatusAndMetrics() method, when GET_RECORD_DEFAULT_TO_CONSENSUS_NODE is set to true, queries the consensus node to retrieve the operator's balance information to calculate the charged amount before and after executing TransactionRecordQuery. To ensure accurate account balances, a 200ms timeout is used to allow the balances to update properly. This results in a total of 400ms (before and after) for each request to calculate the difference in account balance. Depending on the size of the callData, each client call (e.g., eth_sendRawTransaction) can involve multiple requests (10+ or 20+), significantly increasing the total wait time just to calculate the balance difference.

This issue has been raised in the SDK repository under this ticket, requesting a new API that performs the calculation natively.

Solution

Wait for the new API to be included in the SDK and implement it in the TransactionService to improve performance.

Alternatives

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant