I am trying to follow this tutorial https://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains.
I configured 2_deploy_simplestorage.js at is mentionned and
the command
deployer.deploy(SimpleStorage, 42, {privateFor:
["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="]}).
When I try to verifiy the privacy of the value, it seems that every node can access the data, what could be the problem! I have to mention that the commend initials the value to 42 but when I verify it is 0! this is the smart contract:
pragma solidity >=0.4.17;
contract SimpleStorage {
uint public storedData;
function inita (uint initVal) public {
storedData = initVal;
}
function set(uint x) public {
storedData = x;
}
function get() view public returns (uint retVal) {
return storedData;
}
}
The problem was with the version of solcI am using. When working with quorum you have sort of tow ledgers one private and the other is public accessed by all participants nodes. When I use privateFor I specify the address of the nodes that are supposed to acces the private ledger and the other nodes are not supposed to see the modification of the ledger.