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

v0.7 - Daric #370

Merged
merged 160 commits into from
May 6, 2021
Merged

v0.7 - Daric #370

merged 160 commits into from
May 6, 2021

Conversation

AntoineRondelet
Copy link
Contributor

No description provided.

AntoineRondelet and others added 30 commits January 1, 2021 11:28
Updated copyright headers to 2021
@AntoineRondelet AntoineRondelet requested a review from dtebbs as a code owner May 5, 2021 11:06
@AntoineRondelet AntoineRondelet marked this pull request as draft May 5, 2021 11:06
@AntoineRondelet AntoineRondelet removed the request for review from dtebbs May 5, 2021 11:07
@AntoineRondelet AntoineRondelet changed the title [WIP] 0.7 - <release-name> [WIP] 0.7 - Daric May 5, 2021
Copy link
Contributor

@dtebbs dtebbs left a comment

Choose a reason for hiding this comment

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

LGTM.

@dtebbs
Copy link
Contributor

dtebbs commented May 5, 2021

The docker builds appear to be failing while trying to install the solidity compiler. I can't see why it would fail, so I've restarted the job (for "pull_request") in case it's something intermittent. If that works, we can run the "push" version too.

@dtebbs
Copy link
Contributor

dtebbs commented May 5, 2021

#15 830.5 python -c "from zeth.core.contracts import install_sol; \
#15 830.5 	install_sol()"
#15 832.0 Traceback (most recent call last):
#15 832.0   File "/home/zeth/client/env/lib/python3.8/site-packages/solcx/install.py", line 633, in _validate_installation
#15 832.0     installed_version = wrapper._get_solc_version(binary_path)
#15 832.0   File "/home/zeth/client/env/lib/python3.8/site-packages/solcx/wrapper.py", line 17, in _get_solc_version
#15 832.0     stdout_data = subprocess.check_output([str(solc_binary), "--version"], encoding="utf8")
#15 832.0   File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
#15 832.0     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#15 832.0   File "/usr/lib/python3.8/subprocess.py", line 493, in run
#15 832.0     with Popen(*popenargs, **kwargs) as process:
#15 832.0   File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
#15 832.0     self._execute_child(args, executable, preexec_fn, close_fds,
#15 832.0   File "/usr/lib/python3.8/subprocess.py", line 1706, in _execute_child
#15 832.0     raise child_exception_type(errno_num, err_msg, err_filename)
#15 832.0 FileNotFoundError: [Errno 2] No such file or directory: '/root/.solcx/solc-v0.8.1'
#15 832.0 
#15 832.0 During handling of the above exception, another exception occurred:
#15 832.0 
#15 832.0 Traceback (most recent call last):
#15 832.0   File "<string>", line 1, in <module>
#15 832.0   File "/home/zeth/client/zeth/core/contracts.py", line 120, in install_sol
#15 832.0     solcx.install_solc(SOL_COMPILER_VERSION)
#15 832.0   File "/home/zeth/client/env/lib/python3.8/site-packages/solcx/install.py", line 466, in install_solc
#15 832.0     raise exc
#15 832.0   File "/home/zeth/client/env/lib/python3.8/site-packages/solcx/install.py", line 459, in install_solc
#15 832.0     _validate_installation(version, solcx_binary_path)
#15 832.0   File "/home/zeth/client/env/lib/python3.8/site-packages/solcx/install.py", line 636, in _validate_installation
#15 832.0     raise SolcInstallationError(
#15 832.0 solcx.exceptions.SolcInstallationError: Downloaded binary would not execute, or returned unexpected output. If this issue persists, you can try to compile from source code using `solcx.compile_solc('0.8.1')`.
#15 832.1 make: *** [Makefile:8: setup] Error 1
#15 ERROR: executor failed running [/bin/sh -c virtualenv env     && source env/bin/activate     && pip install --no-index --find-links=wheels cryptography     && make setup]: exit code: 2
------
 > [ 9/11] RUN virtualenv env     && source env/bin/activate     && pip install --no-index --find-links=wheels cryptography     && make setup:
------
Dockerfile-client:47
--------------------
  46 |     
  47 | >>> RUN virtualenv env \
  48 | >>>     && source env/bin/activate \
  49 | >>>     && pip install --no-index --find-links=wheels cryptography \
  50 | >>>     && make setup
  51 |     
--------------------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c virtualenv env     && source env/bin/activate     && pip install --no-index --find-links=wheels cryptography     && make setup]: exit code: 2
Error: Process completed with exit code 1.

@dtebbs
Copy link
Contributor

dtebbs commented May 5, 2021

The same command worked for me in a local docker container. It may be something specific to the environment.

@dtebbs
Copy link
Contributor

dtebbs commented May 5, 2021

It seems solc-v0.8.1 does indeed not execute in a container based on an alpine image. ldd reports a missing shared lib. Investigating in #371.

@AntoineRondelet
Copy link
Contributor Author

AntoineRondelet commented May 5, 2021

It seems solc-v0.8.1 does indeed not execute in a container based on an alpine image. ldd reports a missing shared lib. Investigating in #371.

Thanks for looking into that. Yes indeed I just did a very quick test using solc-select in an alpine:3.13 container, and the compiler seems to work fine until 0.7.5 - higher -> things break, which seems to be confirmed by looking at the alpine package registry: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/solidity

Let's check the contracts code to see if we use any new syntax from 0.8. If the code can compile using 0.7, we can modify the pragmas to support solc 0.7.5 and wait until 0.8 is added to alpine (I'll check the code and check https://docs.soliditylang.org/en/latest/080-breaking-changes.html#how-to-update-your-code to see if we can compile with 0.7 -> even if things compile, the "safe arithmetic" is only avail in 0.8 as well as the AbiEncoderv2 etc, so the code won't be as stable and sound...). After 0.7.5 there's 0.7.6 and right after there's 0.8.0 AFAIK, so we should be able to have the new solidity version fairly soon in Alpine I hope.

@AntoineRondelet AntoineRondelet marked this pull request as ready for review May 6, 2021 11:22
Removed surrounding quotes in GA names for consistency
@AntoineRondelet AntoineRondelet changed the title [WIP] 0.7 - Daric v0.7 - Daric May 6, 2021
@AntoineRondelet AntoineRondelet merged commit 8247fc3 into master May 6, 2021
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.

2 participants