Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Blockchain by (4.1k points)

I have got this example https://github.com/IBM-Blockchain/marbles run locally. I saw that the example downloaded the golang chaincode from https://github.com/ibm-blockchain/marbles-chaincode. And the chaincode was stored on harddisk at /marbles/node_modules/ibm-blockchain-js/temp/unzip. Could you please explain how the golang chaincode was executed inside the nodejs code?

1 Answer

0 votes
by (14.4k points)
edited by

The nodejs code is just a client to the validator network where the validator processes the golang based chaincode to completely decouple it from the nodejs based client. 

The validator downloads the chaincode and compiles it locally within an isolating container. 

The process looks like [golang::chaincode]->[nodejs::client]->(network)->[golang::validator]->[golang::container]. 

So the first and last parts are golang/chaincode related. The processing is done in the middle. The fact that the client is nodejs and the validator is golang does not matter here. 

Understand how this whole Blockchain system works. Enroll now in Blockchain Training.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...