Consider the Organization-Peer setup in a Hyperledger Fabric network as shown in the image.
Org 1 has two peers, Org 2 has one peer - all of which exist inside the same channel - X. Org 3 has one peer which exist outside in a different channel.
The peers have distinct chaincodes(c1, c2, c3 & c4) installed in each of them with the functions as explained.
write() - put a key-value pair into the ledger
update() - update a value for an existing key
read() - query an existing key-value pair
Now on to few questions.
Can c3 invoke c2 to update a key's value (as c3 do not have update()function)?
Can c4 invoke c2 to update a key's value (as c4 do not have update()function)?
Can c3.read() query the data created by c1.write() ?
This link on chaincode tutorial says "State created by a chaincode is scoped exclusively to that chaincode and can’t be accessed directly by another chaincode". Does this apply for peers in the same channel too? As per my understanding blockchain ledger data is accessible to all participating peers.
Can c4.read() query the data created by c1.write() ?
Can c2.update() update the data created by c1.write() ?