-
Notifications
You must be signed in to change notification settings - Fork 310
Latest solidity support #393
Comments
Hi @mstad , the latest official supported version is indeed 0.4 . It would be great if you can post 1. the minimum contract written in Solidity 0.5 that can't be run 2. the error you received here. Then, we can try to see how to overcome these. |
Hi @yxliang01, as soon as I tried to analyze a contract (the contract has the pragma >0.5.0, and the solc that I have installed is the 0.5.15 release), I receive the error of 'compilation failed.' Analyzing it with -ce option, I receive the comment that the last supported solc release is 0.4.19. |
No, the message of the officially supported version is not an error. Would be great if you can paste the contract and the full output log here. |
The output isWARNING:root:You are using an untested version of z3. 4.5.1 is the officially tested version CRITICAL:root:Solidity compilation failed.The file is: pragma solidity >=0.5.0 < 0.6.0; contract Ownable {
}Note that I am using the Oyente build just-now; using the prebuild docker oyente, I had only this lines as warnings and errors: WARNING:root:You are using solc version 0.5.15, The latest supported version is 0.4.19 CRITICAL:root:Solidity compilation failed.Thanks |
@mstad Would you like to
|
Hi, sorry for the delay. I build oyente docker container from the master branch as oyente. Now, I am trying to using it sharing the directory in which I have some contract, but it retunr that it docker run -it -v /home/.../simple_contracts/:/share oyente /share/myContract.sol -ce CRITICAL:root:Skipping non-existent input file ""/share/myContract_0.5.15.sol"" CRITICAL:root:Solidity compilation failed. |
Why is the supplied path in |
The error message reports the path that in my intention was shared in the container... but I made a mistake, I think... |
@mstad I meant that the error message doesn't seem to correspond to the command you have pasted. |
you are totally right, I put the wrong filename... Inserting the right command, I receive an error related to constructor. I attach the command, the error and the file. Thanks so much. docker run -it -v /home/mirkostad/Programmi/perl/simple_contracts/:/share oyente -s /share/my.sol -ce CRITICAL:root:/share/my.sol:7:16: Error: Expected identifier, got 'LParen' CRITICAL:root:Solidity compilation failed. my.sol pragma solidity >=0.5.0 < 0.6.0; contract MyContract {
} |
@mstad I believe you are using the old Would you like to simply try to use the latest 0.5 solc and see whether it works? A quick way is that you add P.S. You might want to care the comment formatting a bit :) |
@yxliang01 I'll try to rebuild it now and I let you know asap. You are right for the formatting... |
Hi, I tries to build the docker from master using: |
@mstad Looks like the error might be in the stdout. I have just added stdout output of solc when compilation failed. Could you pull the latest master and build again, then run in the same manner? |
@yxliang01 I'll do it now. |
Hi, i'll tried and I received this output: ======= /share/my.sol:MyContract ======= CRITICAL:root: |
@mstad the compilation succeeded, this means that it is the logic to extract the binary code is not supporting the new solc. Would you like to try branch |
@yxliang01 Yes, I would try to do it. |
@yxliang01 I build the container from fix-new-solc branch: |
@mstad Thanks again for testing. Looks like the previous patch fixed the compilation result passing problem which means we have made one step forward! According to this error message, I have just pushed new patch to branch |
@yxliang01 Hi,i tried to use the fix-new-solc branch. I build the new container and tried the same contract. The analysis is not complete, but the output is slighlty different than before: |
@mstad This means we moved one step again! I've made a new commit to the branch to print more information message for addressing this issue. |
@yxliang01 Hi, i put here the new error message from the same file. |
@yxliang01 Hi, do you have some news about it? |
Hi @mstad , I think I need more information. Can you run with |
Hi, this are results with --verbose option; the file is attached. |
@mstad Thanks again. So, I think this exposes the following issues:
To address them, we need to first try to build the image with |
@yxliang01 Hi build the branch with the following options: |
@mstad Looks like the output format of |
Hi @yxliang01, anything new? |
Hi, let me know if I have well understood; I have compiled with: WARNING:root:You are using solc version 0.4.24, The latest supported version is 0.4.19 CRITICAL:root:/share/0x1c_fixed.sol:90:32: Error: Expected ',' but got 'payable' CRITICAL:root:Solidity compilation failed. |
@mstad This is a valid compilation error since |
What we are interested here is whether Oyente can now support solc newer than 0.4.19 in the new |
@yxliang01 You mean between 0.4.19 and 0.4.24? |
@mstad sorry I think I don't get what you are asking. |
@yxliang01 Sorry, I wrote half of the sentence. You mean that the test Solidity file should be written, in this test, in Solidity release 0.4.x; am I right? |
@mstad What I meant essentially is that the input Solidity file should be written for solc 0.4.24 when the |
@yxliang01 First test: |
@yxliang01 0x1c_fixed_04_19.sol and secondResult.txt as attachment-> ok |
@yxliang01 |
@mstad Nice! Looks like we can set the latest officially supported solc version to 0.4.24 after merging the branch To better understand the supported solc versions, would you like to also try solc > 0.4.24 with evm == 1.8.0 to figure out the exact latest supported solc version? By the way, just a small recommendation, maybe the results can be directly pasted here as code block, so that when others encounter errors, they might be able to find this issue by searching. |
@yxliang01 Yes, I really would try. Tomorrow I use some other further version with evm both with 1.7.3 and 1.8.0 and we will see what happens. My impression is that the direct compatibility stops at 0.4.24 release but... only tests can speak definitively about it. If, in some way, it works with 0.5.0, my problems are solved. And.... yes, I insert code directly to help other users. |
@yxliang01 I try to do the following CRITICAL:root: If I run oyente5 with the file created for 0.4.19... CRITICAL:root:/share/0x1c_fixed_04_19.sol:20:1: Error: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Linux.g++ - note that nightly builds are considered to be strictly less than the released version /share/0x1c_fixed_04_19.sol:297:5: Warning: This declaration shadows an existing declaration. /share/0x1c_fixed_04_19.sol:636:3: Warning: This declaration shadows an existing declaration. /share/0x1c_fixed_04_19.sol:89:20: Error: Data location must be "calldata" for parameter in external function, but none was given. CRITICAL:root:Solidity compilation failed. In your opinion.. is it possible that it works in some way for 0.5.x... or there is no way? In theory i will need... if in your opinion there is no way... I have to find another solution. |
Hi @mstad , supporting 0.5.x is definitely doable if not already supported. The second error is expected since the pragma specifies that only solc 0.4.19 can be used. What's interesting is the first error for which can potentially help us identify the problem. However, from your comment, it looks like solc didn't have any output nor error message. Would you like to execute |
Hi @yxliang01... How can I enter in the container without running oyente application? |
You can use |
@yxliang01 CRITICAL:root: |
This comment has been minimized.
This comment has been minimized.
@yxliang01 CRITICAL:root: ---> 0xdb.sol CRITICAL:root:/share/0xdb.sol:186:5: Error: Overriding function visibility differs. /share/0xdb.sol:238:5: Error: Overriding function visibility differs. /share/0xdb.sol:419:5: Error: Overriding function visibility differs. /share/0xdb.sol:868:5: Error: Overriding function visibility differs. /share/0xdb.sol:238:5: Error: Overriding function visibility differs. /share/0xdb.sol:419:5: Error: Overriding function visibility differs. /share/0xdb.sol:186:5: Error: Overriding function visibility differs. If I want to try to build a container using --build-arg SOLC_VERSION=0.5.15 which --build-arg=ETHEREUM_VERSION=alltools-v1.x.x. you suggest I can try? |
@mstad Regarding the two errors you have encountered, I need to see the I think you can try alltools-v1.8.1 first, then slowly raise the version (e.g. 1.8.2, 1.8.3...) until encountering errors. |
@yxliang01 Sorry for the delay. I am intending to do it |
@yxliang01 Output : |
@Mayur1496 do you use the fix-new-solc branch? |
@mstad |
After this PR, the latest known supported solc version is `0.5.4` with `evm` toolchain version `1.8.16`. Meanwhile, Solidity file containing non-ascii text will be supported. Thanks @mstad and @Mayur1496 for reporting and testing (in #393 ). Note that the version detection in Oyente is still unmodified as we plan to enhance the supported version detection later. This might be the first PR breaking python 2 support and partially support python > 3 and < 3.6.
sorry to bother you ,but how to build oyente docker container from the master branch as oyente? |
@taylorgag You can use the command |
Hi,
is the last solidity supported 0.4.24? (I tried to compile contract using 0.5.x release and I receive an error). Is there a way to overcome these limitations?
The text was updated successfully, but these errors were encountered: