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

AN-364: Download both variants of solc compiler during build #702

Merged
merged 4 commits into from
Dec 3, 2021

Conversation

aquarat
Copy link
Contributor

@aquarat aquarat commented Nov 30, 2021

As per Slack, HardHat first attempts to download the linux-amd64 compiler. This always fails to execute, which causes HardHat to always fall back to the solc JS/WASM variant, which is platform and CPU agnostic and does execute. This is also the case in v0.2.2.

The main bug, apart from the Alpine incompatibility, is that the process of downloading solc js sometimes results in a corrupt file. I always start from a clean state (docker system prune -f --all) when running these builds, but sometimes builds fail continuously. I think a corrupt copy of the compiler is being cached by Amazon CloudFront.

The fault is intermittent: this commit for the 10th of November, for instance, sometimes succeeds and sometimes fails for me.
v0.2.2 so far has not failed once, I've built it on a loop more than 30x.

The contents of this PR download both compilers and manifests, expecting HardHat to always fall back to the platform agnostic compiler. This has been built > 20x now and hasn't failed.

This will also fix a scenario where HardHat can't download the compiler due to a proxy server.

@Siegrift does not believe the e2e tests issue is related.

@changeset-bot
Copy link

changeset-bot bot commented Nov 30, 2021

⚠️ No Changeset found

Latest commit: a478c5a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@Siegrift
Copy link
Contributor

@Siegrift does not believe the e2e tests issue is related.

Siegrift knows :)

Copy link
Member

@bbenligiray bbenligiray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me 👌

@aquarat aquarat removed the request for review from amarthadan December 2, 2021 15:24
@aquarat aquarat merged commit 1ee496e into master Dec 3, 2021
@aquarat aquarat deleted the an-364-solc-js-download branch December 3, 2021 07:22
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

Successfully merging this pull request may close these issues.

3 participants