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

Make RPC_TIMEOUT configurable #1044

Closed
sealer3 opened this issue Jun 2, 2023 · 2 comments
Closed

Make RPC_TIMEOUT configurable #1044

sealer3 opened this issue Jun 2, 2023 · 2 comments

Comments

@sealer3
Copy link
Contributor

sealer3 commented Jun 2, 2023

In lib-sourcify, RPC_TIMEOUT is currently set to 5 secs when verifying contracts at

https://github.com/ethereum/sourcify/blob/9dd1c7c5a63bcb85465f2534260f0d24cab2da0e/packages/lib-sourcify/src/lib/verification.ts#LL34C1-L34C26

Unfortunately I sometimes hit that timeout even though the RPC is still online and I know it will eventually process the request. The maximum timeout could be very long. So, I would like the timeout to be extended somehow, probably by making RPC_TIMEOUT configurable.

I would do it myself and make a PR, but first I wonder if there is a cleaner approach than adding an argument to every function that will call a get function (which uses an RPC server) or using an environment variable to set the timeout.

View in Huly HI-420

@kuzdogan
Copy link
Member

kuzdogan commented Jun 2, 2023

Just pushed the env var fix 09fe33e and it's live on production #1045.

It might make sense in the future to pass a config object or another way to pass these, as we want lib-sourcify to run in the browser. But for now this should solve the problem.

Thanks for the report, keep these coming! :) Also curious about your use case if you'd like to tell us about it. You can reach us out from the channels in the footer https://sourcify.dev

@sealer3
Copy link
Contributor Author

sealer3 commented Jun 2, 2023

Thank you for such a quick turnaround! Quite amazing. I will reach out eventually

@sealer3 sealer3 closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants