/blockchain-samples

Samples demonstrating the use of Blockchain with IBM Watson IoT

Primary LanguageGoApache License 2.0Apache-2.0

Blockchain Samples

This project contains sample blockchain smart contracts and generic user interfaces for the Hyperledger fabric.

These contracts are intended for exploration of the IBM Blockchain Bluemix environment and the Hyperledger fabric. They can be used to seed smart contract development with advanced features.

Note: The release strategies for Hyperledger and for this project are evolving, so contract development is currently separated into folders that remain compatible with specific generations of the Hyperledger project on Bluemix.


Hyperledger Supported Components

The Hyperledger Bluemix environment will evolve with the intent that releases will be tagged in the Hyperledger fabric project to indicate Bluemix compatibility levels. At the time of writing -- 16 June 2016 -- the Hyperledger fabric on Bluemix is compatible with the following folders in this project:

Release 1.3 of this project was meant to guarantee compatibility when developing against Bluemix Hyperledger in the May-June 2016 time frame:

https://github.com/ibm-watson-iot/blockchain-samples/releases/tag/1.3

However, the folder strategy was adopted after that and so the folders named above will remain compatible with Bluemix for the forseeable future. As the strategy evolves, this document will capture changes.


Upcoming Hyperledger Supported Components

The following contracts are compatible with the latest Hyperledger code base, expected on Bluemix in early summer:

  • sdk

    • The sdk is under construction and its evolution is intended to include future packaging of boiler plate code for asset CRUD interfaces and related features such as asset state history, recent state activity, alerts and rules, and so on. This is intended to shrink the size of derived contracts while improving reliability and productivity.

    • iot_sample_contract

      • Introduces saving of transaction timestamp and transaction uuid in asset state such that an audit can trace the state of an asset at any point in time to the specific block and transaction on the chain. Cleans up minor issues and bugs from the Trade Lane sample.
    • aviation_sample_contract

      • Introduces complex object models with multiple asset classes managed by a single contract.
    • docs

      • A complete set of documentation that is derived from the document set in the Trade Lane sample but is intended to evolve over time to include new features and more articles.
  • cashMachine

    • A sample contract that models an instant teller or other cash machine. Derived from the simple contract for hyperledger.

    OpenBlockChain Supported Components

    The following folders are compatible only with the earliest generation of Hyperledger on Bluemix, which was called Open Blockchain, or OBC: