-
Notifications
You must be signed in to change notification settings - Fork 197
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
Time-out starknet_getTransactionStatus after 5s #1619
Conversation
1a52dfb
to
62f48d7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1619 +/- ##
==========================================
+ Coverage 78.37% 78.42% +0.05%
==========================================
Files 100 100
Lines 9221 9224 +3
==========================================
+ Hits 7227 7234 +7
+ Misses 1355 1352 -3
+ Partials 639 638 -1 ☔ View full report in Codecov by Sentry. |
rpc/handlers.go
Outdated
const timeout = 5 * time.Second | ||
ctxChild, cancelChild := context.WithTimeout(ctx, timeout) | ||
txStatus, err := h.feederClient.Transaction(ctxChild, &hash) | ||
cancelChild() |
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 this, should we make feeder.Client
respect the timeout value that we pass to it by WithTimeout
regardless of how many times it retries to complete the request?
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.
Maybe, but I think the current method of setting a per-request timeout and then controlling the overall timeout with a context also makes sense (makes me wonder if a per-request timeout is even necessary, but that's out-of-scope for this PR).
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.
controlling the overall timeout with a context
That didn't work for Gateway client tho, that is why we ended up having to do #1614. I am worried that we will end up having to do the same here as well.
to avoid sending 429s after waiting for 30s, due to feeder rate limiting.
62f48d7
to
fb814c7
Compare
Decided to close the PR. We already have timeout setting for feeder client which is larger than 5 sec. |
to avoid sending 429s after waiting for 30s, due to feeder rate limiting.