From smart contract programming / security course, I learned that even if you make a variable private, anyone can view the value because the contract is deployed on a public blockchain.
But how can you actually view the value? External contracts cannot access the value. Or, if you run a node, you can simply view the value?
I don’t understand how it works.
Also, how about mapping?
mapping(address=>uint256) private secretNumber
Is it possible for anyone to view the value of secretNumber
without needing to know the address?
PS: I’m not trying to store any sensitive information on blockchain but I am just curios.