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

WIP: Expansion pack #3

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

WIP: Expansion pack #3

wants to merge 20 commits into from

Conversation

bohendo
Copy link

@bohendo bohendo commented Oct 27, 2022

This PR introduces a refresh.sh script that will download a new json list of available versions from the solidity team & download any versions of solc which are not already present in this repo.

This PR also introduced copies of the solc binary for all available versions (or, it will eventually, git push has been going for >10 mins..). Beware, this will make the repo very slow to clone.

For each architecture, there is a folder of the same name which contains all solc binaries for that architecture. Additionally, each folder contains:

  • list-latest.json: An auto-generated list of available solidity versions & their expected sha256 hash. Do not edit by hand otherwise your changes will be lost the next time refresh.sh is run.
  • list-legacy.json: A manually curated list of unusual solc versions that aren't covered by the public list of supported versions. All manual additions & updates should happen in this file.
  • list.json: An auto-generated list that is simply the combination of content from both list-latest.json and list-legacy.json. If a version is specified by both lists, the one from list-legacy.json will be prioritized here.

@montyly
Copy link
Member

montyly commented Oct 28, 2022

This is great. Maybe we could zip the binaries to reduce the repo size? Looks like we can reduce the size by at least a factor of 3

@bohendo
Copy link
Author

bohendo commented Oct 28, 2022

This is great. Maybe we could zip the binaries to reduce the repo size? Looks like we can reduce the size by at least a factor of 3

@montyly I don't think we have that much room for improvement via compression. git already uses zlib to compress all the objects it stores in the git history; if you poke around in any repo's .git/objects/* you'll find compressed blobs rather than plaintext.

Also, these are binaries rather than text so they prob don't compress very well regardless. BUT if some library compresses these binaries significantly better than zlib, there could be some room for improvement.. which still probably isn't worth the overhead bc the solc-select code would get more complicated if it needed to decompress the bins it gets from this repo.

@bohendo
Copy link
Author

bohendo commented Oct 28, 2022

Benchmark below. Cloning the repo requires downloading ~1.12 GB (it is decompressed to almost 5GB after) & takes almost 10 mins to clone. Not great but not terrible. It looks like the entire repo is compressed again before transferring over the wire too, giving us even less room for improvement via manual compression..

$ time git clone [email protected]:crytic/solc.git solc-copy
Cloning into 'solc-copy'...
remote: Enumerating objects: 354, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 354 (delta 7), reused 58 (delta 7), pack-reused 295
Receiving objects: 100% (354/354), 1.12 GiB | 1.96 MiB/s, done.
Resolving deltas: 100% (120/120), done.

real	9m50.961s
user	0m59.281s
sys	0m26.404s

@bohendo bohendo changed the title Expansion pack WIP: Expansion pack Jan 3, 2023
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


bohendo seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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