What happened exactly on chaincode deploy and invo

2019-03-16 05:54发布

What happened exactly on chaincode deploy and invoke , query, in Hyperledger?

Need to confirm the cost of system on Chaincode deploy, invoke and query. If they are the same, seems better to make Chaincode more than one, even hundreds, thousands.

1条回答
太酷不给撩
2楼-- · 2019-03-16 06:06

During “Deploy” the chain code is submitted to the ledger in a form of transaction and distributed to all nodes in the network. Each node creates new Docker container with this chaincode embedded. After that container will be started and Init method will be executed.

During “Query” - chain code will read the current state and send it back to user. This transaction is not saved in blockchain.

During “Invoke” - chaincode can modify the state of the variables in ledger. Each “Invoke” transaction will be added to the “block” in the ledger.

查看更多
登录 后发表回答