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

你离开我真会死。 提交于 2019-12-03 12:59:51

问题


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:


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.



来源:https://stackoverflow.com/questions/37607263/what-happened-exactly-on-chaincode-deploy-and-invoke-query-in-hyperledger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!