AN-364: Download both variants of solc compiler during build #702
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.