-
Notifications
You must be signed in to change notification settings - Fork 72
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: Adds retry to send raw transaction #3161
fix: Adds retry to send raw transaction #3161
Conversation
Test Results 4 files - 16 419 suites +148 19s ⏱️ - 40m 15s Results for commit ec0a0a1. ± Comparison against base commit 7fea98c. This pull request removes 604 and adds 1477 tests. Note that renamed tests count towards both.
This pull request removes 4 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
41aa0c4
to
4ef6b94
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.
LGTM, the following suggestion will make sure we don't do unnecessary repeats and avoids submitting duplicated transactions.
Also, please add unit tests which simulate a 'timeout exceeded'
/'Connection dropped'
error from the SDK client and confirm that:
- the transaction is not retried when the mirror node returns the transaction with a
{ result: 'SUCCESS' }
- the transaction is retried when the transaction is not found in the mirror node or a result different from
'SUCCESS'
is returned
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.
Good work. A couple of questions.
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.
Nice change although I don't think we should be doing a retry.
Let's discuss
25437f2
to
cc16db5
Compare
dc77178
to
b4ec668
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.
Nice changes but sorry gotta block. Please fine more details below.
@konstantinabl Now that I’ve had a chance to delve into this “ In the catch block, this part only throws an error if it has the However, this may be a regression and not entirely accurate, as it appears there are errors that cause transactions to fail and not reach the consensus node, i.e., the I hope this clarifies things and stays within the scope of the |
@quiet-node Not quite sure what the relation to this PR is, but I believe we also handle these error here -> https://github.com/hashgraph/hedera-json-rpc-relay/blob/main/packages/relay/src/lib/eth.ts#L1482 |
Signed-off-by: Konstantina Blazhukova <[email protected]>
… to include transactionId Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
a2773b5
to
b83a40a
Compare
Signed-off-by: Konstantina Blazhukova <[email protected]>
Quality Gate failedFailed conditions |
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.
Approve to unblock.
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.
Nice improvements. Left some comments.
I'm unblocking as the transaction is no longer being retried
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3161 +/- ##
==========================================
+ Coverage 83.35% 84.55% +1.19%
==========================================
Files 66 69 +3
Lines 4290 4473 +183
Branches 837 881 +44
==========================================
+ Hits 3576 3782 +206
+ Misses 473 428 -45
- Partials 241 263 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
|
* Adds retry to eth send raw transaction Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds mirror node check before retry and expands SDKClientError object to include transactionId Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds unit tests Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds improvements Signed-off-by: Konstantina Blazhukova <[email protected]> * adds relevant comment for hardcoded values Signed-off-by: Konstantina Blazhukova <[email protected]> * removes retry and adds mirror node check in the sdk client Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds unit tests Signed-off-by: Konstantina Blazhukova <[email protected]> * Addresses PR comments Signed-off-by: Konstantina Blazhukova <[email protected]> * Changes the error thrown when timeout occurs to SDKClientError Signed-off-by: Konstantina Blazhukova <[email protected]> * Ensure other error types are thrown Signed-off-by: Konstantina Blazhukova <[email protected]> --------- Signed-off-by: Konstantina Blazhukova <[email protected]>
* Adds retry to eth send raw transaction Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds mirror node check before retry and expands SDKClientError object to include transactionId Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds unit tests Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds improvements Signed-off-by: Konstantina Blazhukova <[email protected]> * adds relevant comment for hardcoded values Signed-off-by: Konstantina Blazhukova <[email protected]> * removes retry and adds mirror node check in the sdk client Signed-off-by: Konstantina Blazhukova <[email protected]> * Adds unit tests Signed-off-by: Konstantina Blazhukova <[email protected]> * Addresses PR comments Signed-off-by: Konstantina Blazhukova <[email protected]> * Changes the error thrown when timeout occurs to SDKClientError Signed-off-by: Konstantina Blazhukova <[email protected]> * Ensure other error types are thrown Signed-off-by: Konstantina Blazhukova <[email protected]> --------- Signed-off-by: Konstantina Blazhukova <[email protected]> Signed-off-by: Eric Badiere <[email protected]>
* Adds retry to eth send raw transaction * Adds mirror node check before retry and expands SDKClientError object to include transactionId * Adds unit tests * Adds improvements * adds relevant comment for hardcoded values * removes retry and adds mirror node check in the sdk client * Adds unit tests * Addresses PR comments * Changes the error thrown when timeout occurs to SDKClientError * Ensure other error types are thrown --------- Signed-off-by: Konstantina Blazhukova <[email protected]> Signed-off-by: Eric Badiere <[email protected]> Co-authored-by: konstantinabl <[email protected]>
@konstantinabl we should fix the title of the PR as no retry logic was added |
Description:
Currently, we experience the SDk timing out in the CI and on mainnet, eventhough the transactions that fail do not take more than 10 seconds. More info in the issue below
Related issue(s):
Workaround until #3118 is solved