Blockchain for Business Enterprise adoption patterns Use case examples from practice

Into Fabric v1

Hyperledger Meetup Frankfurt, 11. Mai 2017

© 2017 IBM Corporation Recap: Where the problems arise: book keeping across a business network

EveryEvery participantparticipant keepskeeps theirtheir ownown ledgerledger updatedupdated withwith theirtheir transactionstransactions TransactionsTransactions mostlymostly bilateralbilateral messagemessage basedbased Each organization in the network has complex silos that require reconciliation

© 2017 IBM Corporation 2 The business solution: use a distributed built by all participants Technology Requirements

Blockchains shift the paradigm from Append only information held by a single owner to the lifetime history of an asset or transaction distributed across multiple participants in a Consensus Protocols business network for agreeing change to the ledger Instead of messaging-based communications, the new paradigm is state- Cryptography based based security and privacy/ confidentiality Smart Contracts incorporate business rules for the automation of transactions Programable Smart Contracts

© 2017 IBM Corporation 3 Hyperledger, a project Premier • Announced by The Linux Foundation on December 17, 2015 with 17 founders, now over 130 members

• Hyperledger is an open source and openly governed collaborative effort to advance cross-industry technologies for business, hosted by The Linux Foundation. General • Hyperledger Fabric is a blockchain framework implementation and one of the Hyperledger projects, intended as a foundation for developing applications/solutions with a modular architecture

Enable adoption of shared ledger technology at a pace and depth not achievable by any one Associate company or industry

www.hyperledger.org © 2017 IBM Corporation Page 4 Strategic Client Blockchain Adoption Journey A multi-stage approach, delivering incremental and new business value at each milestone

RUN CHANGE TRANSFORM

Internal Focus New Eco-Systems Digitise / BPO leveraging CBM Select Existing SCM Partners Operational Efficiency Digitise / BPO leveraging CBM GRC Operational Efficiency GRC

Transformational Innovation New Business Models New/Adjacent SCM Partners New Revenue Streams

Immediate Prototyping Within 1-2 years Within 2-3 years TIME

Deploy Deploy Shadow Shadow Blockchain Blockchain Deploy Deploy Production Production Blockchain Blockchain

© 2017 IBM Corporation Page 5 Seven design principles of sustainable Blockchain business networks

Providing network participants control of their business

Provision for an extensible business network – Flexibility in membership

Permissioned but protected network – Protecting competitive data

Open access and collaborative global network – Collective innovation

Scalability – Transaction processing and data encryption processing

Security – New security challenges of shared business network

Coexisting with existing systems of record and transaction systems

© 2017 IBM Corporation Page 6 IBM Global Finances’s blockchain solution addresses disputes management

Blockchain utilized to significantly improve resolution time for common disputes

 Utilized data available from suppliers to deliver enhanced information to both Suppliers and Business Partners

 Accomplished with no code changes to our core Commercial Financing system using shadow ledger approach

 Integrated Blockchain into existing user interface

 Enhanced data includes key information regarding shipments status which minimizes proof of delivery disputes

 Established a ‘platform’ for competitive advantage

 Continuing to work with our Suppliers and Business Partners to further expand blockchain capabilities

IBM Blockchain Team :: © 2017 IBM Corporation ©2016 IBM Corporation 7 © 2017 IBM Corporation 8 FX Netting Settlement Nosotro Bank Settlement Nosotro Bank Trade Execution and Confirmation Example: A Bank B Bank FX Netting Netting Service(DLT) Matching, Validation, Netting

e.g. Central Bank e.g. CLS Bank

What • Lack of standardized payment netting process for Benefits trades not settled within current CLS PvP environment 1. It will enable them to submit FX • Institutions intervene manually and inconsistently to instructions for six different complete netting process products • Higher costs and increased intra-day liquidity demands 2. When the product launches CLS will support 24 different currencies How • CLSNet will match FX instructions based on the same vs the 18 currencies it already matching principles as the CLS core settlement service and will send a match notification to each counterparty. offers Allows all counter-parties to have the same validated record of transaction and fulfillment

© 2017 IBM Corporation Page 9 Current business issues in the global distribution market

Importers and Banks Carriers Forwarders Ports Authorities Exporters Manual, paper- Excess No single Manual Data Collection and False Positives Delivery Black based Inventory version of ”the Collection Lack of visibility processes Manual, paper- Truth” Holes Manual, pre-manifest Lack of Real- based Manual, paper- Sub-optimal processes paper-based Lack of visibility Time based stack into land move- information Duplication of processes processes placement Administrative ment before / Process Manual Data after ocean Collection transport

Root Causes: Multiple data formats Point-to-point interactions Absence of messaging standards © 2017 IBM Corporation Embedded video: MAERSK Blockchain can be found at https://www.youtube.com/watch?v=tdhpYQCWnCw

© 2017 IBM Corporation Hyperledger Fabric

Into v1

©©20120177IBMIBM Corporation Corporation Embedded Video Hyperledger v0.6 Lessons Learned Video can be found at https://www.youtube.com/watch?v=EKa5Gh9whgU

© 2017 IBM Corporation Architecture of Hyperledger Fabric v0.6

membership ECA, TCA, TLS-CA

peer SDK Consensus keys Ledger Events Chaincode

state

© 2017 IBM Corporation 15 Architecture of Hyperledger Fabric v1

membership No SPoF No SPoT

peer Endorser application 1: Submit Proposal 2: Execute CC SDK 3: Return Endorsed Response Chaincode 4a: Submit Tx o-service 5: Deliver batch Keys Committer 4b: Order TXs in a 6: Validate & Commit Tx batch according to Ledger consensus Event Source : https://jira.hyperledger.org/browse/FAB-37 © 2017 IBM Corporation 16 Ledger representation Replaceable

Transaction Log State Database tx array CouchDB (external option) Latest written key/values for use in transaction simulation supports keyed queries, TX Reads[] Last written key/value composite key queries, key Writes[] Supports keyed queries, block composite key queries, key range queries, plus full data range queries rich queries (beta in 1.0) TX Reads[] Writes[] Key History index

TX tracking history of a key Reads[] Writes[] Block index TX Reads[] blockHash  SegNo + offset Writes[] blockNum  SegNo + offset txId  SegNo + offset

File System Level DB © 2017 IBM Corporation 18 Sample transaction: Step 1/7 – Propose transaction

Application proposes transaction

E0 P3 P4 Endorsement policy: A A • “E0, E1 and E2 must sign” B D • (P3, P4 are not part of the policy)

Client application submits a transaction Client S Application D E proposal for chaincode A. It must target K 1 A the required peers {E0, E1, E2} B O O

A Key: p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation 19 Sample transaction: Step 2/7 – Execute proposal

Endorsers Execute Proposals

E , E & E will each execute the E0 P3 P4 0 1 2 A A proposed transaction. None of these B D executions will update the ledger

Each execution will capture the set of Client S Application D E Read and Written data, called RW sets, K 1 A which will now flow in the fabric. B O O

A Key: p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation 20 Sample transaction: Step 3/7 – Proposal Response

Application receives responses

E0 P3 P4 The RW sets are signed by each A A endorser and returned to the application B D

S Client D Application K E1 A B O O

A Key: p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation 21 Sample transaction: Step 4/7 – Order Transaction

Application submits responses for ordering E0 P3 P4 A A Application submits responses as a B D transaction to be ordered.

S Ordering happens across the fabric in Client D Application parallel with transactions submitted by K E1 A other applications B O O

A Key: p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation (other applications) 22 Sample transaction: Step 5/7 – Deliver Transaction

Orderer delivers to all committing peers

E0 P3 P4 Ordering service collects transactions A A into blocks for distribution to committing B D peers. Peers can deliver to other peers using gossip (not shown)

S Client D Application Different ordering algorithms available: K E1 A O O • SOLO (single node, development) B • Kafka (blocks map to topics) • SBFT (tolerates faulty peers, future) A Key: p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation 23 Sample transaction: Step 6/7 – Validate Transaction

Committing peers validate transactions

E0 P3 P4 Every committing peer validates against A A the endorsement policy. Also check RW B D sets are still valid for the current state

S Transactions are written to the ledger Client D Application and update caching DBs with validated K E1 A transactions B O O

A Key: p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation 24 Sample transaction: Step 7/7 – Notify Transaction

Committing peers notify applications

! ! ! E0 P3 P4 Applications can register to be notified A A when transactions succeed or fail, and B D when blocks are added to the ledger

S Applications will be notified by each peer Client D ! Application ! to which they are connected K E1 A B O O

A Key: ! p O O E2 Endorser Ledger A B Ordering-Service Committer Application

Orderier

Smart Contract Endorsement (Chain code) Policy © 2017 IBM Corporation 25 Example of Multi-Channel with Endorsement

Client App SDK E0 E2 Z A B • Peers E and E connect to the red Y 0 3 O O channel for chaincodes Y and Z

Client • Peers E E and E connect to the App 1, 2, 3 O O blue channel for chaincodes A and B SDK E1 E3 A Ordering-Service Y B Z

Endorser Blockchain Network A B

Orderer

Chaincode

© 2017 IBM Corporation 26 Where to Ask Questions

Hyperledger Community has moved off Slack to RocketChat. Go to chat.hyperledger.org and register. You will be required to have a linux foundation ID however. If you aren't registered with the Linux Foundation, get an ID from https://identity.linuxfoundation.org/

For questions on Version 1.0, go to the fabric-questions channel. Also every day, the docker build status is posted when passing the continuous integration tests will be posted on fabric-ci (only posted when tests pass)

© 2017 IBM Corporation 28 Useful Information To Get You Started

• Documentation actively getting updated as we progress: http://hyperledger- fabric.readthedocs.io/en/latest/

• Support for Docker images for easy deployment for Hyperledger-fabric 1.0. Docker images will be available for all major components to run a network (peers, solo orderer, CLI, CA, Kafka, CouchDB). A “Getting started” section will be available in the Hyperledger-fabric publications. Getting started will help a developer or user to start the network, run a simple application , and learn the basics of running v1. See: http://hyperledger-fabric.readthedocs.io/en/latest/

• Support for a tool that helps bootstrap a network. The bootstrap network tool is available and called the Configuration Transaction Generator (configtxgen). The tool is designed to configure the network with organizations included in the ordering service genesis block and generates the configuration transaction artifacts used for channel creation.

© 2017 IBM Corporation 29 Thomas Hartmann Thank You! Expert Consultant

IBM Global Business Services

IBM Deutschland GmbH Wilhelm-Fay-Straße 30-34 65936 Frankfurt

Mobile: +49 171 2234 153 Phone: +49 7034 274 0608 Mail: thomas.hartmann@de..com

© 201©7 2017IBM Corporation IBM Corporation Page 30