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

+1 vote

I need to confirm the cost of deployment, invoke and query using chaincode  If they are the same, seems better to make Chaincode more than one, even hundreds, thousands. Can someone explain to me?

Apr 26, 2018 in Blockchain by nsv999
• 5,090 points
339 views

1 answer to this question.

+1 vote
Best answer

1. Deploy: During Deploy the chaincode is written onto the ledger in a form of transaction and distributed to all nodes in the network. Each node creates a Docker container with this chaincode embedded in it. After that container will be started and Init method will be executed.

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

3. Query: During Query the chaincode will read the current state and send it back to user. This transaction is not saved in blockchain. 

answered Apr 26, 2018 by Christine
• 15,790 points

selected Aug 3, 2018 by Omkar

Related Questions In Blockchain

+16 votes
4 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What is transientMap in node.js and getTransient in chaincode?

TransientMap: TransientMap  contains data that might be used to ...READ MORE

answered Jul 13, 2018 in Blockchain by digger
• 26,550 points
195 views
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,550 points
68 views
+1 vote
1 answer
+1 vote
1 answer
0 votes
1 answer