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

Use a different mechanism to fetch solc binaries links #13

Open
rach-id opened this issue May 7, 2022 · 3 comments
Open

Use a different mechanism to fetch solc binaries links #13

rach-id opened this issue May 7, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rach-id
Copy link
Contributor

rach-id commented May 7, 2022

Currently, we're using https://github.com/web3j/web3j-sokt/blob/master/src/main/resources/releases.json to install solidity.
This is not good as we need to release new versions of sokt, and most of the other libraries, whenever we have a new solc version so that we're up-to-date.

I suggest we:

  • Either host the releases.json file somewhere (or even a very simple API to query the links), and we make a GET request call whenever we want to check for the versions.
  • Find a repetitive pattern for the links and look for them dynamically when detecting a version in contracts:
    • For Linux binaries for example: https://github.com/ethereum/solidity/releases/download/v<version>/solc-static-linux seems to work

This would make our releases easier and also avoid the issues we're getting from users depending on libraries that use the latest solidity versions.

@rach-id rach-id added enhancement New feature or request good first issue Good for newcomers labels May 7, 2022
@rach-id
Copy link
Contributor Author

rach-id commented May 7, 2022

Adding the good first issue label as the repetitive pattern mechanism is easy to implement while we think of a better solution or go for the hosted mechanism.

@conor10
Copy link

conor10 commented May 7, 2022

Thanks for this @sweexordious - did you see this issue #12? I presume this would be a helpful approach to use?

@rach-id
Copy link
Contributor Author

rach-id commented May 7, 2022

I checked that repo briefly and I found the following:
https://github.com/ethereum/solc-bin/blob/gh-pages/linux-amd64/list.json
which states which are the latest versions and related information:

    {
      "path": "solc-linux-amd64-v0.8.13+commit.abaa5c0e",
      "version": "0.8.13",
      "build": "commit.abaa5c0e",
      "longVersion": "0.8.13+commit.abaa5c0e",
      "keccak256": "0x789ce72e01f83cf052b543d6f0508c2ed2adae7ed40ea37913d9bd90166040ce",
      "sha256": "0xa805dffa86ccd8ed5c9cd18ffcfcca6ff46f635216aa7fc0246546f7be413d62",
      "urls": [
        "bzzr://73cb255e06cd0f1eb3abf03dcb915f4843728f2783e3535c76f547b87eeb829e",
        "dweb:/ipfs/QmSrfbnJcgUXUjT1oEAMQ77LC1MeEDxVfMGYuCJVRnogTr"
      ]
    }

And, we can use the first proposed resolve mechanism. We can just use the list file: https://binaries.soliditylang.org/<platform>list.json and create the download link: https://binaries.soliditylang.org/<platform>/<path>.

So, this change makes sense.

Edit: Just thought about it more, we can do it without. Will update the above description to accommodate.

Edit2: Keeping the good first issue as this can be tackled without much context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants