Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 658
Will_Z Avatar asked Jun 03 '16 06:06

Will_Z


1 Answers

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.

like image 143
Sergey Balashevich Avatar answered Oct 16 '22 01:10

Sergey Balashevich