1. Why is PrivateFor required during contract creation? Would passing privatefor during function calls suffice?

  2. Inconsistent state observed. A contract was created by node 1 intended for node 2 and node 7 (privateFor node 2 and node 7). Node 3 and Node 4 was able to update the state but not retrieve it -- not able to retrieve the variable is understandable but being able to update the state variable cannot be understood as this contract was created intended for node 2 and node 7. After updating the state variable via node 3 & 4, node 2 and node 7 was getting the most updated value i.e., correct. However, node 1 was still getting the old, i.e., stale value.

Any thoughts and ideas for the above questions?

1 Answer 1


Answered @ https://github.com/jpmorganchase/quorum/issues/452

Pasting the answer: for 1 -- privateFor is required to create private state contracts that are only shared between participating parties. privateFor is then only going to work on the contracts that were created with privateFor, ie, it only works on the private smart contracts.

For 2. A private contract is now only shared between the defined nodes: 1, 2, and 7 because of the privateFor during contract creation. The contract only exists on these nodes. On the other nodes, since they were not party to the privateFor during contract creation, contract pay load does not exist so there is no such contract. You may share abi and contract address, and this will execute in solidity, but it will not affect the private contracts on the originally defined nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.