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

Solidity 0.4.23 does not work properly on latest quorum release (2.0.2) #371

Closed
nottherealbatman opened this issue May 9, 2018 · 12 comments

Comments

@nottherealbatman
Copy link

When compiling with 0.4.23 quorum contracts return null responses
See full issue posted at truffle trufflesuite/truffle#936 as it was though to be an truffle issue

@fixanoid
Copy link
Contributor

@nottherealbatman Quorum is currently up to Geth 1.7.2 which limits its Solidity to 0.4.18 (need to confirm breaking changes). We've plans for updating Geth, but this is an ongoing long term project that will take time before we pulled in Solidity changes.

@kyriediculous
Copy link

Seems to me that this is not really worth it to migrate until a major release aka 0.50.0?
although slowly preparing the changes in between 0.4.18 and 0.50.0 for a PR isn't a bad idea I think.

I do like that quorum is using more up to date geth versions than hyperledger burrow (still no require, revert and assert :( )

@nottherealbatman
Copy link
Author

The reason why I brought this up because 0.4.23 brings a lot of nice new features with it like returning dynamic arrays and custom error messages. And it is building up to the 0.5.0 release so maybe slowly preparing isn't a bad idea.

@jpmsam
Copy link
Contributor

jpmsam commented May 24, 2018

@nottherealbatman 0.4.23 is supported, I have tested a few contracts and it works. Please make sure you are using the latest quorum-examples with the updated genesis block. I recently made an update to the genesis file to enable byzantium at block 1.

@nottherealbatman
Copy link
Author

@jpmsam In our test it was not reliable, we encountered strange bugs which we didn't had with 0.4.18. See link in opening post to the truffle issue.

@jpmsam
Copy link
Contributor

jpmsam commented May 24, 2018

@nottherealbatman which genesis file were you using and was it on a new network? I will try to replicate using the steps provided on the truffle issue.

@arnoudbevers
Copy link

Just to chime in here, since I was the one submitting the truffle issue:

  • It was an 'old network', set up a few months ago and started with the same versions as in the truffle issues, using Solidity 0.4.18 initially.
  • The genesis file was generated in a setup.sh script allocationg the balance to every account in the network (hence the ${account}.
{
	 "alloc": {
	 "${account}": {
		  "balance": "1000000000000000000000000000"
		}
	  },
	  "coinbase": "0x0000000000000000000000000000000000000000",
	  "config": {
		"homesteadBlock": 0
	  },
	  "difficulty": "0x0",
	  "extraData": "0x",
	  "gasLimit": "0xFFFFFFFFFFFF",
	  "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
	  "nonce": "0x0",
	  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
	  "timestamp": "0x00"
}

@jpmsam
Copy link
Contributor

jpmsam commented May 25, 2018

@arnoudbevers thanks for chiming in. Would you be able to do run the same test using the latest genesis block?

@fixanoid
Copy link
Contributor

Hi, so I've tested this just now on our quorum-examples repo in local mode. I'm on a mac running quorum / constellation master builds, latest 10x node and latest truffle. The findings:

  1. In raft mode, with new genesis config that specifies "byzantiumBlock" the contracts compile and test runs as expected
  2. In IBFT mode, with missing "byzantiumBlock" the contracts behave as you point out and error with 0x
  3. In IBFT mode, when editing the genesis config to include "byzantiumBlock" the contracts and test run as expected

So, looks like you may need to re-init your Quorum with genesis config "byzantiumBlock": 1.

Curiously, when testing in raft mode, truffle repeatedly timed out during migration and test. I've yet to find out why this is happening but it seems that if I execute another txn in the geth console, before it timed out, truffle chugs along.

@arnoudbevers @jpmsam

@jpmsam
Copy link
Contributor

jpmsam commented Jun 11, 2018

@fixanoid Thanks! Please patch the Istanbul genesis block and you should be able to close this issue.

@fixanoid
Copy link
Contributor

Patched just now.

@arnoudbevers
Copy link

Thank you, I haven't had much time to look into the issue the last couple of weeks. I'll keep it in mind for the next deployment!
Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants