Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is chaincode container in Hyperledger Fabric?

Chaincode is already installed in the peer file system. Why does instantiating chaincode start the chaincode container? What is the purpose of the chaincode container?

like image 977
Seetharaman GR Avatar asked Dec 19 '22 04:12

Seetharaman GR


1 Answers

The purpose of the chaincode container is to ensure isolation of the smart contract's execution from the peer itself, so that a smart contract (chaincode) cannot crash or even access the peer because of an error or malicious code. When you instantiate a chaincode, the peer populates a container image with the chaincode and invokes the Docker management API to deploy that image. If the container isn't running, it will start a new one. Once running, all transactions and proposals received by the peer will be transmitted to that container for execution.

like image 151
christo4ferris Avatar answered Dec 28 '22 10:12

christo4ferris