Event URL: https://bit.ly/2JisLG9
Contacts:
-
How do we start?
-
On your laptop: how to install the Visual Studio Code with the IBM Blockchain Platform plugin
-
How to create your first Smart Contract with Visual Studio Code
-
How to launch the brand new IBM Blockchain Platform 2.0 in the IBM Cloud
It all started in October during the Global Financial Crisis in 2008 with Satoshi Nakamoto and his paper BitCoin: A Peer-to-Peer Electronic Cash System which addressed a key problem in electronic commerce:
A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.
Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending.
We propose a solution to the double-spending problem using a peer-to-peer network.
Enterprise grade permissioned distributed ledger platform that offers modularity and versatility for a broad set of industry use cases.
-
Raft ordering service Fault Tolerance consensus algorithm
IBM Blockchain Garage Services
Learning Objective 2: On your laptop: how to install the IBM Visual Studio Code with the brand new IBP plugin
An introduction to programming Hyperledger Fabric on SlideShare
IBM Blockchain Platform on SlideShare
IBM Blockchain Solutions on SlideShare
Complete instructions: Install IBM Blockchain Platform VS Code extension for free
Go through Tutorial One in VS Code: Local Smart Contract Development.
Follow the typical workflow from generating a new smart contract project, deploying code to the local_fabric_runtime and testing your transactions via an application gateway
* SPDX-License-Identifier: Apache-2.0
*/
import { Context, Contract, Info, Returns, Transaction } from 'fabric-contract-api';
import { MyAsset } from './my-asset';
@Info({title: 'MyAssetContract', description: 'My Smart Contract' })
export class MyAssetContract extends Contract {
@Transaction(false)
@Returns('boolean')
public async myAssetExists(ctx: Context, myAssetId: string): Promise<boolean> {
const buffer = await ctx.stub.getState(myAssetId);
return (!!buffer && buffer.length > 0);
}
@Transaction()
public async createMyAsset(ctx: Context, myAssetId: string, value: string): Promise<void> {
const exists = await this.myAssetExists(ctx, myAssetId);
if (exists) {
throw new Error(`The my asset ${myAssetId} already exists`);
}
const myAsset = new MyAsset();
myAsset.value = value;
const buffer = Buffer.from(JSON.stringify(myAsset));
await ctx.stub.putState(myAssetId, buffer);
}
@Transaction(false)
@Returns('MyAsset')
public async readMyAsset(ctx: Context, myAssetId: string): Promise<MyAsset> {
const exists = await this.myAssetExists(ctx, myAssetId);
if (!exists) {
throw new Error(`The my asset ${myAssetId} does not exist`);
}
const buffer = await ctx.stub.getState(myAssetId);
const myAsset = JSON.parse(buffer.toString()) as MyAsset;
return myAsset;
}
@Transaction()
public async updateMyAsset(ctx: Context, myAssetId: string, newValue: string): Promise<void> {
const exists = await this.myAssetExists(ctx, myAssetId);
if (!exists) {
throw new Error(`The my asset ${myAssetId} does not exist`);
}
const myAsset = new MyAsset();
myAsset.value = newValue;
const buffer = Buffer.from(JSON.stringify(myAsset));
await ctx.stub.putState(myAssetId, buffer);
}
@Transaction()
public async deleteMyAsset(ctx: Context, myAssetId: string): Promise<void> {
const exists = await this.myAssetExists(ctx, myAssetId);
if (!exists) {
throw new Error(`The my asset ${myAssetId} does not exist`);
}
await ctx.stub.deleteState(myAssetId);
}
}
Free IBM Cloud sign-up link: https://ibm.biz/BdzMtC
IBM Cloud Catalog link: https://cloud.ibm.com/catalog/
1) Find IBM Blockchain Platform service in the IBM Cloud: https://cloud.ibm.com/catalog?search=blockchain.
IAM Enabled= "Identity and Access Management"
2) Launch IBM Blockchain Platform Service
Deploy a Peer on the IBM Blockchain Platform
Deploy an Ordering Service on the IBM Blockchain Platform
Create and join a channel on the IBM Blockchain Platform
- The application uses Node.js and can sometimes get the wrong version of Node.
- If npm install gets errors,
- do: npm rebuild, npm install
- And if that doesn't work, do:
- nvm use 8.12.0 npm install or nvm use 8.12.0 npm rebuild npm install
- the same if npm start gets errors 1 You can also do the same if Visual Studio Code console, Local Fabric Ops pane, do Teardown and Restart Fabric Runtime
- If you get an error can't find xcode, do xcode-select --install
Creating a basic Blockchain network using the IBM Blockchain Platform V2.0
SmartContract Trading using IBM Blockchain Platform Extension for VSCode (supports Fabric 1.4
Build a blockchain insurance app
Does Hyperledger Fabric perform at scale?
Forbes: Blockchain Goes To Work At Walmart, Amazon, JPMorgan, Cargill and 46 Other Enterprises
Target Blockchain for Supply Chain
Why new off-chain storage is required for blockchains
Jerry Cuomo IBM Fellow and CTO, instigator of Blockchain: https://twitter.com/jerrycuomo
Christopher Ferris. IBM Fellow CTO Open Technology https://twitter.com/christo4ferris
Arnaud J Le Hors. Senior Technical Staff Member: https://twitter.com/lehors
Christian Cachin Swiss Cryptographer, Zurich. https://twitter.com/cczurich?lang=en
IBM Blockchain: https://twitter.com/ibmblockchain?lang=en
Mark Parzygnat.Program Director IBM Blockchain: https://twitter.com/meetmarkp?lang=en