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

Time-out starknet_getTransactionStatus after 5s #1619

Closed
wants to merge 2 commits into from

Conversation

joshklop
Copy link
Contributor

to avoid sending 429s after waiting for 30s, due to feeder rate limiting.

@joshklop joshklop requested a review from omerfirmak December 29, 2023 22:00
@joshklop joshklop force-pushed the joshklop/cancel-gettxstatus branch from 1a52dfb to 62f48d7 Compare December 29, 2023 22:02
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.42%. Comparing base (6735ed5) to head (99f7811).
Report is 141 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

rpc/handlers.go Outdated
Comment on lines 1288 to 1291
const timeout = 5 * time.Second
ctxChild, cancelChild := context.WithTimeout(ctx, timeout)
txStatus, err := h.feederClient.Transaction(ctxChild, &hash)
cancelChild()
Copy link
Contributor

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?

Copy link
Contributor Author

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).

Copy link
Contributor

@omerfirmak omerfirmak Jan 3, 2024

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.
@kirugan kirugan force-pushed the joshklop/cancel-gettxstatus branch from 62f48d7 to fb814c7 Compare August 20, 2024 11:41
@kirugan
Copy link
Contributor

kirugan commented Dec 18, 2024

Decided to close the PR. We already have timeout setting for feeder client which is larger than 5 sec.

@kirugan kirugan closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants