-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 it easier for users to get nightly builds #13802
Comments
For the record: thinking about this, it's very dangerous to point people to the develop builds as nightlies. If anyone ever has the crazy idea of actually deploying something built by any of those builds, it'll be hell for e.g. sourcify to verify it. So we should indeed make sure that we only point to nightlies that stem from the same commit hash as the emscripten builds we're archiving. |
But anyone can do that at any time by just building it on his own so Sourcify already has that problem. Someone could even edit the bytecode to put a completely made up version in there or replace the actual version with something wrong. Even if it did not happen yet, it can happen at any time and Sourcify has to be able to deal with that in some way. IMO just telling the user that the contract comes from an unrecognized compiler version would be fine. These will be very rare, fringe cases anyway. @kuzdogan What's your opinion? What does Sourcify do now when it cannot find a matching compiler or the version embedded in the bytecode is missing of is something crazy? |
We actually don't look for the version in the bytecode but from the metadata. We get the compilers from:
I see none work for nightlies. I deployed a test contract on Sepolia at I see its metadata is outputting I can confirm solc-js can fetch Attaching the metadata and source here. |
Yeah, that was a bug on our side that went unnoticed for quite a while. Or actually, we thought we fixed it but it turned out that the build script in the main repo we overwriting the prerelease string we set in solc-bin. This was fixed for recent builds by #13581/ethereum/solc-bin#123. We could add aliases for names matching version strings if that helps you but we also have that problem with early binaries, which had pretty wild version strings - so not sure it matters that much.
ok, so this means that you can already handle versions that can't be fetched from solc-bin in a graceful way, right? I.e. by dislaying some error message? |
By the way, we actually have a PR to include the reported versions on the file list. That would slow list generation quite a bit and would complicate the CI because we can't really execute binaries for all platforms on the same machine, so we were reluctant to merge it so far but I wonder it this would actually be useful to you in case of these name/version discrepancies: ethereum/solc-bin#21. |
So yes it shows "Binary couldn't be fetched" or similar, which is the error thrown by the solc-js itself. But I think we should handle nightlies and this simple fix should do it:
Sorry, I lack the context, what are the reported versions? |
By "reported versions" i mean the stuff printed by
Versions reported by nightlies actually look more reasonable there but that's only because we temporarily removed pre-0.4 binaries from the repo when we were running out of space on GH pages (they're back now). You can see that on 0.4.1 the version string was wild enough that solc-js was choking on it (I think we either fixed that since then or at least ethereum/solc-js#563 will fix it).
Well, should be good enough for now but these strings historically were much more complicated and this reminds me that we actually have a mechanism in solc-js for cleaning them - |
Now I see thanks a lot @cameel So yes on our side we handle the cases mostly (and it's pretty rare), and when we can't, there will be a graceful error. Plus, the metadata was only introduced in 0.4.7 anyway, we shouldn't be effected from the wild ones. |
Regarding this, I wanted to report it as a bug in solc-js but then I realized that |
I can confirm that |
This issue has been marked as stale due to inactivity for the last 90 days. |
Hi everyone! This issue has been automatically closed due to inactivity. |
We provide nightly builds in solc-bin but these are emscripten-only. The static build artifacts on
develop
in the main repo can also be used as nightlies but this is not apparent to users and explaining how to get them is not very straightforward. There are a few things we could do to improve this situation:b_ubu_static
,b_win
andb_osx
runs to thenightly
workflow. This will make it easier for users to locate nightlies when they look into our CI.README
b_ubu_static
,b_win
,b_osx
andb_ems
jobs produce static binaries and upload them as artifacts. Explain how to find the right workflow in CircleCI.bin/soljson-nightly.js
,bin/soljson-latest.js
, etc. Their locations do not change so it's possible to have a direct link in the README.aws s3
utility (like we do ins3-mirror
workflow andsync-s3.sh
script).solc-bin
bucket under some path that's not currently in use (e.g.nightly/
). You'll just need to exclude it in the S3 sync script to ensure the script does not delete the files when syncing. There should also be a check that this path does not exist insolc-bin
.binaries.soliditylang.org
domain. This might still be acceptable given that we'll have links in theREADME
though.README
.The text was updated successfully, but these errors were encountered: