A smart contract can call other smart contracts both within the same channel and across different channels.
Which of the following transactions is inter-contract communication whose functionality is limited?
- Chaincode X calls Getstate in Chaincode Y on the same channel.
- Chaincode X calls Putstate in Chaincode Y on the same channel.
- Chaincode X calls Getstate in Chaincode Y on a different channel.
- Chaincode X calls Putstate in Chaincode Y on a different channel.
Answer(s): D
Explanation:
In Hyperledger Fabric, inter-contract communication is possible both within the same channel and across different channels. However, the functionality to alter the state (using PutState) of a chaincode on a different channel is restricted. This limitation is due to the security and isolation principles of channels in Hyperledger Fabric, where each channel represents a separate ledger and state. Transactions within a channel can read and write data freely, subject to endorsement policies, but writing data to another channel's chaincode directly is not permitted. This prevents unauthorized influence on a separate and potentially isolated business process, ensuring that operations within a channel are controlled and secure.
Reveal Solution
Next Question