4

I am new to Hyperledger, what i did yesterday is installed Oracle virtual box on my windows 10, followed by Ubuntu, followed by Composer prerequisites including Docker Engine, Compose and everything else. Finally followed the composer playground tutorial and deployed the network.

What i am not able to understand in the end is - 1. where the chaincode is and how can i query that and modify directly, if needed? 2. Go lang was a pre requisite to setup Hyperledger Fabric, but for Hyperledger Composer, it was not mandatory, I am still confused if Hyperledger Fabric (the real blockchain) is also setup on my machine or it is just some simulated environment something? thanks in advance for your answers.

2 Answers2

3

I've been investigating Hyperledger Fabric composer myself too, hope this answers your questions:

  1. Hyperledger composer is built ontop of the Hyperledger Fabric framework. When developing with composer you are not producing chaincode, in essence, hyperledger composer is some very smart chaincode that can read and comprehend the model + transaction files. Composer is NOT a compiler, it does not take the business network definition files and produce chain code.

  2. Again, as you are not producing chaincode Go is not required for development. Hyperledger fabric is indeed setup on your machine. It is a real Fabric on which composer is built upon.

Hope that helps, I'm happy to clarify anything further if you need.

Jamo Kay
  • 39
  • 2
2

When you installed the dev environment for Hyperledger Composer, you installed (in VirtualBox) a HyperLedgerFabric V1 network with multiple nodes. So, yes, you do have a 'real' blockchain set up on your system. The transaction code that you write in JavaScript is your chaincode. HyperLedger Composer uses (today) a service called DukTape to enable your javascript-written transactions to run in the Go chaincode environment.

The chaincode in the default installation is in the lib folder inside the network folder. The file, in the default installation is sample.js, which is directly associated with the sample.cto file in your network\models folder. The cto file defines your assets, events and transactions using an Object-Oriented class kind of notation. The class name for a transaction is identical to the function name in the sample.js file.

Bob Dill
  • 938
  • 4
  • 12