0 votes
1 view
in Blockchain by (7k 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.5k points)

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. 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...