DevNet Sandbox: BlockChain Sandbox

DevNet Sandbox: BlockChain Sandbox

Hello World Example - Instructions

Quick Start:

In this quick start, we’re going to perform a very simple transaction, involving simulating sending some cryptocurrency from one peer organisation, to another (Org1 to Org2).

So, we've taken example code from the HyperLedger git repo – ‘chaincode_example02’ available here - and instantiated it on two of the sandbox blockchain peer nodes as ‘mycc’:

We have already run "instantiated" scripts below to create user1/user2 and assign token ‘values’ to them (Note: The steps below is no need to run mannauly since they are executed in our lab setup) And here is commands to run the "Hello world" example:
  1. SSH into Fabric-CLI using and credentials [cli/cisco123]
  2. input the query statement:
  3. input the query statement:
  4. Now, to transfer 10 of user1 to user2 input this action statement:

    The state change PROPOSE message will be sent to all ledgers i.e. endorsing peers. The peers simulate a transaction and produce an endorsement signature back to the Fabric-CLI client.

    The CLI client collects an endorsement for a transaction and broadcasts it through the orderer node if the proposal endorsed by enough peers. The Orderer node then delivers the transactions to all peers.

  5. We can now check key value user1 again to make sure it is 90, using the query from step 2
  6. We can also check key value user2 is equal to 210, using the query in step 3
  7. We can also check the ‘state’ DB from any peer that participated in the transaction validation.
And that’s it! You’ve successfully transferred some value from one peer account to another on the HyperLedger Blockchain. Now dive into the HyperLedger Blockchain Documentation to learn much more!

Some more information about our HyperLedger Deployment in this Sandbox: