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

Add debug logs for provider creation #5478

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

fvictorio
Copy link
Member

@fvictorio fvictorio commented Jul 3, 2024

Now and then, there are some timeouts in EDR Hardhat tests (example) related to the provider initialization in a beforeEach hook.

This seems super weird to me. That before each only has two async operations: a call to createHardhatNetworkProvider and a server.listen() call a bit below that. I'm completely sure that the alchemy provider (which is the one with the timeout) doesn't use the server, so the only async operation is the provider creation.

But createHardhatNetworkProvider is async just because it calls the makeTracingConfig function, which loads some build info files. I doubt that this is the function that is causing a 50s timeout, so the alternative is that there's something weird going on now and then with EdrProviderWrapper.create.

The easiest way to evaluate this theory is to add some debug logs, and to add DEBUG="hardhat:core:hardhat-network:*" in EDR's CI. This won't produce any results until a new version of Hardhat is released and a new timeout is hit (it doesn't happen often), but this is not urgent so this is fine.

@fvictorio fvictorio requested a review from alcuadrado July 3, 2024 09:54
Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 2:35pm

Copy link

changeset-bot bot commented Jul 3, 2024

🦋 Changeset detected

Latest commit: f6ddc92

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Jul 3, 2024
@fvictorio fvictorio added the no changeset needed This PR doesn't require a changeset label Jul 3, 2024
@alcuadrado alcuadrado closed this Jul 3, 2024
@alcuadrado alcuadrado reopened this Jul 3, 2024
@alcuadrado alcuadrado closed this Jul 3, 2024
@alcuadrado alcuadrado reopened this Jul 3, 2024
@alcuadrado alcuadrado merged commit 0826378 into main Jul 3, 2024
88 of 255 checks passed
@alcuadrado alcuadrado deleted the add-debug-logs-provider-creation branch July 3, 2024 20:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no changeset needed This PR doesn't require a changeset status:ready This issue is ready to be worked on
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants