-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Private contract accessing public variables on public contract aborts execution #82
Comments
Hi @rsarres, what is the rest of the code actually doing? If it's updating state in ContractB then that may be the problem. Would also like to see what happens if you make the function a constant. |
Thanks @tylobban. Yes, it updates the state of the private ContractB. I may have misunderstood the Quorum Design doc as it states that S -> (A) -> [B -> C] transaction is allowed. Doesn´t it mean that the read-only VM state is only applied to the public contracts B and C and the private contract (A) can have its state changed? |
@rsarres hi! Can you please confirm which version of solidity you are using for your contracts? It looks like this issue is caused by changes that were made in the 0.4.0 release of Solidity and incompatibility with the geth version that Quorum is currently on. Please can you try compile your contracts with 0.3.6 and let us know if that works? We will soon be working on upgrading geth to a later version. |
Hi @tylobban . Sorry about the delayed response, I was away from office last week. I am working on the vagrant VM of the 7nodes example. The geth version output is:
The solc --version output is:
I will try to compile the contracts with 0.3.6 version and post the results. |
Hi @tylobban . |
Hi, just wondering if this issue is fixable and if it is on the road map. We are experiencing the same issue and the workaround (compile in 0.3.6) is working for us but we'd like to take advantage of some of the improvements post 0.4.10. Many thanks, Matt. |
@mattcrooks @rsarres this should have been fixed with Quorum v2. I'll confirm before closing the issue but let us know if you are still experiencing it too. |
@mattcrooks @jpmsam Hi. I have just tested the contracts compiled in 0.4.21 and 0.4.10 and the behavior is the same: Everything runs fine when following the 5nodesRTGS readme instructions until the sendValue call, the first call of a function that performs a contract-to-contract interaction. Debugging this call, I saw that it ends with a REVERT in 0.4.21 and with a "Missing opcode 0xfe" in 0.4.10. I am using Quorum V.2.0.0. |
@mattcrooks As an example, I have just committed two new deploy scripts using precompiled contracts in Solidity 0.4.21 and 0.4.10 to the 5nodesRTGS git. If you follow 5nodesRTGS readme using one of these contract versions instead of the 0.3.6 script, you will see that the issue persists: function sendValue aborts execution. |
This has been resolved |
Consider the following scenario:
ContractA is PUBLIC
ContractB is PRIVATE
I have the following issue: When I remove the line with an arrow where contractB reads contractA´s mapping, everything works and the (code continues...) executes . If the line with an arrow is present, (code continues...) never executes.
AFAIK, my private contract is not making a state change in the public contract, it is only reading a variable on a read only VM, like this:
S -> (A) -> [B]
I tried to encapsulate the mapping with a getter function and got the same behavior.
The text was updated successfully, but these errors were encountered: