Hyperledger Fabric
Karthikeyan Sukumaran, CEO
RAKS OM2
What to expect ?
● About me
● Introduction to Hyperledger & Fabric
● The T & T Factor of Hyperledger Fabric
● Hyperledger Fabric Architecture - An Overview
● Main components of Hyperledger Fabric
● Usage of Fabric in Enterprise
● Enterprise blockchain frameworks
2
1. About Me
● CEO of a Blockchain startup
● Have 10+ years of experience on Mobile and Web platforms
● 1+ years on Blockchain platforms (Hyperledger Fabric & Composer, Corda, Chain
Framework and Ethereum)
● Have worked on close to 6 Blockchain pilots on various platforms
● Out of the 6 - one project could go into Production by mid of 2018
● I co-host Hyperledger Chennai meetup
3
2. Introduction to
Hyperledger & Fabric
Hyperledger
● Open source collaborative effort to advance cross-industry blockchain technologies
● Hosted by Linux Foundation
● Has a global collaboration with finance, banking, supply chain, manufacturing and
technology companies
● Works to standardise the protocols
● Goal is to “Create an enterprise grade, open source distributed ledger framework and
code base”
● Projects incubated under Hyperledger - Fabric, Sawtooth, Iroha, Burrow & Indy
5
What is Fabric ?
● Fabric is a permissioned blockchain network, originally contributed by IBM and Digital
asset. It was incubated under Hyperledger to drive its development by managing a vast
open source community
● Enterprise based Distributed Ledger built on Blockchain technology with smart contracts
to enforce trust between parties
● Enforcing trust when parties involved in the transaction dont trust one another
● Follows a different approach
● No crypto involved
● No mining - Instead there is a Consensus mechanism
● High throughput
6
3. The T&T factor of
Fabric
Truth & Trust factor of Fabric
● First there is no cryptocurrency involved - rather we can use fabric to create
cryptocurrency
● No mining is involved - but basics of blockchain is followed
○ It has block immutability
○ Eliminating double spending
● Fabric can do half a million transactions per min
● Data is immutable
● Every network has a ledger to store all transactions
● Every peer has a ledger copy
● Once a record is created it cannot be updated or deleted - rather a new record has to be
inserted
● Order of data is maintained
● Fabric does not impose hardware or software requirements
● DO not have the problem of a 51% attack 8
4. Fabric Architecture -
An Overview
Fabric Actors
● Blockchain user
● Blockchain developer
● Blockchain regulator
● Certificate Authority
● Data Sources from traditional sources
10
Main components of Fabric
● Fabric-CA (Certificate Authority)
● Fabric Peers
● Fabric Orderers
11
Fabric-CA
● Every transaction should be signed with a certificate
● Pluggable - Can use default (generate using openssl) or use your own
● Certificates are PKCS (.p12) format
● Certificates are per user
● Certificate can contain additional attributes - Roles definition can be done
● This can be simply categorised as registering a user - which the official term is called
Enrollment
● Fabric-CA can be attached to LDAP
● Fabric-CA servers default DB is SQLite - but pluggable with mysql & postgresql
● Please note: Fabric-CA can be completely replaced with your own certificate
implementation
12
Fabric-CA
13
Fabric-Peer
● Peer is where the Ledger is present
● It also maintains the world state
● Peer can add or query the data from the ledger
● We can have more than one peer - On production we need more than one
● One peer can be part of multiple channels
● All peers synchronise - Once connected to the network
● There are three types of peers Peer, Endorsing Peer & Ordering peer
● Endorsement policies are followed on the peers
14
Fabric-Orderer
● Ordering service is the heart of the consensus process
● Anything that has to be committed needs to be processed through the ordering service
● Ordering service creates the Blocks
● This sends the block to the peer to update
● There is two type of ordering service - Solo (Which can be used for development) &
Apache kafka (For production)
● Apache Kafka has a distributed service
● By perfect configuration with Apache kafka we can achieve good throughputs, with solo
its not possible
15
Channels
● Every channel is completely independent
● All channels have different rules, chaincodes etc
● Peers must be part of a channel
● Every single party inside a channel should agree to include a new party
● Many peers can be added to a single channel
16
Channels
17
Chaincodes
● Its the smart contract for Fabric
● Its a program that is written to read and update the ledger data
● Peer executes the chaincodes
● Chaincode must be inside a channel
● You can have one or more chaincodes
● Chaincode must be installed on all the peers
● There are two types of Chaincodes 1) Chaincode for developers (CD) 2) Chaincode for
operators (CO)
● CD interface methods are Init, Invoke & Shim
● CO main commands are package, install, instantiate & upgrade
18
Membership services Provider (MSP)
● Every peer should be part of the same MSP to interact with each other
● It generates certificates for peer & orderers
● Admin and CA certificates can be categorised
19
Sample transaction flow
1) Propose
2) Transaction valid - Anchor
3) Submit - Anchor
4) Other endorsements
5) Send to orderer
6) Orderer delivers
7) All nodes validates and updates
20
Propose
21
Transaction Valid - Anchor
22
Submit - Anchor
23
Other endorsements
24
Submit to orderer
25
Orderer delivers
26
Validate
27
A complete recap
● No tokens, its based on pluggable consensus
● Channels
● Endorsement policies
● Key/Value and JSON stored world state (CouchDB)
● Membership services
● Chaincode in GoLang, Java & Javascript
28
5.Usage of Fabric in
Enterprise
Fabric in Enterprise
● First identify the usecase - Takes most of the time
● Identify legal contracts with the current methods and check for usecases
● Having fabric in a consortium helps
● In a single enterprise try and extend to vendors, suppliers, partners and logistics vendors
● Look out for interoperability with third party APIs
● Any enterprise you go - dont try and change the whole process - try and build the network
on top of the existing - This case is purely to get it started
● In large Supply chain clients look into options to build with Oracle or SAP (Oracle has
hyperledger fabric implementation in their product)
● In large banking clients look into choosing the correct framework - Corda serves as the
best option here
30
6.Enterprise Blockchain
Frameworks
Enterprise Blockchain Frameworks
● Hyperledger Fabric
● Hyperledger Composer (With Fabric)
● Hyperledger Sawtooth
● Ethereum - Quorum & Burrow
● Chain Framework (chain.com)
● Multi-chain
● R3 Corda
32
Appendix
Image References (Fabric Flow) - The
Ledger presentation on Fabric
References from Bitcoin, IBM,
Hyperledger fabric docs, Deloitte,
Ethereum, theledger, Gyft, T-Mining &
Blockgeeks
33

Hyperledger fabric 3

  • 1.
  • 2.
    What to expect? ● About me ● Introduction to Hyperledger & Fabric ● The T & T Factor of Hyperledger Fabric ● Hyperledger Fabric Architecture - An Overview ● Main components of Hyperledger Fabric ● Usage of Fabric in Enterprise ● Enterprise blockchain frameworks 2
  • 3.
    1. About Me ●CEO of a Blockchain startup ● Have 10+ years of experience on Mobile and Web platforms ● 1+ years on Blockchain platforms (Hyperledger Fabric & Composer, Corda, Chain Framework and Ethereum) ● Have worked on close to 6 Blockchain pilots on various platforms ● Out of the 6 - one project could go into Production by mid of 2018 ● I co-host Hyperledger Chennai meetup 3
  • 4.
  • 5.
    Hyperledger ● Open sourcecollaborative effort to advance cross-industry blockchain technologies ● Hosted by Linux Foundation ● Has a global collaboration with finance, banking, supply chain, manufacturing and technology companies ● Works to standardise the protocols ● Goal is to “Create an enterprise grade, open source distributed ledger framework and code base” ● Projects incubated under Hyperledger - Fabric, Sawtooth, Iroha, Burrow & Indy 5
  • 6.
    What is Fabric? ● Fabric is a permissioned blockchain network, originally contributed by IBM and Digital asset. It was incubated under Hyperledger to drive its development by managing a vast open source community ● Enterprise based Distributed Ledger built on Blockchain technology with smart contracts to enforce trust between parties ● Enforcing trust when parties involved in the transaction dont trust one another ● Follows a different approach ● No crypto involved ● No mining - Instead there is a Consensus mechanism ● High throughput 6
  • 7.
    3. The T&Tfactor of Fabric
  • 8.
    Truth & Trustfactor of Fabric ● First there is no cryptocurrency involved - rather we can use fabric to create cryptocurrency ● No mining is involved - but basics of blockchain is followed ○ It has block immutability ○ Eliminating double spending ● Fabric can do half a million transactions per min ● Data is immutable ● Every network has a ledger to store all transactions ● Every peer has a ledger copy ● Once a record is created it cannot be updated or deleted - rather a new record has to be inserted ● Order of data is maintained ● Fabric does not impose hardware or software requirements ● DO not have the problem of a 51% attack 8
  • 9.
  • 10.
    Fabric Actors ● Blockchainuser ● Blockchain developer ● Blockchain regulator ● Certificate Authority ● Data Sources from traditional sources 10
  • 11.
    Main components ofFabric ● Fabric-CA (Certificate Authority) ● Fabric Peers ● Fabric Orderers 11
  • 12.
    Fabric-CA ● Every transactionshould be signed with a certificate ● Pluggable - Can use default (generate using openssl) or use your own ● Certificates are PKCS (.p12) format ● Certificates are per user ● Certificate can contain additional attributes - Roles definition can be done ● This can be simply categorised as registering a user - which the official term is called Enrollment ● Fabric-CA can be attached to LDAP ● Fabric-CA servers default DB is SQLite - but pluggable with mysql & postgresql ● Please note: Fabric-CA can be completely replaced with your own certificate implementation 12
  • 13.
  • 14.
    Fabric-Peer ● Peer iswhere the Ledger is present ● It also maintains the world state ● Peer can add or query the data from the ledger ● We can have more than one peer - On production we need more than one ● One peer can be part of multiple channels ● All peers synchronise - Once connected to the network ● There are three types of peers Peer, Endorsing Peer & Ordering peer ● Endorsement policies are followed on the peers 14
  • 15.
    Fabric-Orderer ● Ordering serviceis the heart of the consensus process ● Anything that has to be committed needs to be processed through the ordering service ● Ordering service creates the Blocks ● This sends the block to the peer to update ● There is two type of ordering service - Solo (Which can be used for development) & Apache kafka (For production) ● Apache Kafka has a distributed service ● By perfect configuration with Apache kafka we can achieve good throughputs, with solo its not possible 15
  • 16.
    Channels ● Every channelis completely independent ● All channels have different rules, chaincodes etc ● Peers must be part of a channel ● Every single party inside a channel should agree to include a new party ● Many peers can be added to a single channel 16
  • 17.
  • 18.
    Chaincodes ● Its thesmart contract for Fabric ● Its a program that is written to read and update the ledger data ● Peer executes the chaincodes ● Chaincode must be inside a channel ● You can have one or more chaincodes ● Chaincode must be installed on all the peers ● There are two types of Chaincodes 1) Chaincode for developers (CD) 2) Chaincode for operators (CO) ● CD interface methods are Init, Invoke & Shim ● CO main commands are package, install, instantiate & upgrade 18
  • 19.
    Membership services Provider(MSP) ● Every peer should be part of the same MSP to interact with each other ● It generates certificates for peer & orderers ● Admin and CA certificates can be categorised 19
  • 20.
    Sample transaction flow 1)Propose 2) Transaction valid - Anchor 3) Submit - Anchor 4) Other endorsements 5) Send to orderer 6) Orderer delivers 7) All nodes validates and updates 20
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
    A complete recap ●No tokens, its based on pluggable consensus ● Channels ● Endorsement policies ● Key/Value and JSON stored world state (CouchDB) ● Membership services ● Chaincode in GoLang, Java & Javascript 28
  • 29.
    5.Usage of Fabricin Enterprise
  • 30.
    Fabric in Enterprise ●First identify the usecase - Takes most of the time ● Identify legal contracts with the current methods and check for usecases ● Having fabric in a consortium helps ● In a single enterprise try and extend to vendors, suppliers, partners and logistics vendors ● Look out for interoperability with third party APIs ● Any enterprise you go - dont try and change the whole process - try and build the network on top of the existing - This case is purely to get it started ● In large Supply chain clients look into options to build with Oracle or SAP (Oracle has hyperledger fabric implementation in their product) ● In large banking clients look into choosing the correct framework - Corda serves as the best option here 30
  • 31.
  • 32.
    Enterprise Blockchain Frameworks ●Hyperledger Fabric ● Hyperledger Composer (With Fabric) ● Hyperledger Sawtooth ● Ethereum - Quorum & Burrow ● Chain Framework (chain.com) ● Multi-chain ● R3 Corda 32
  • 33.
    Appendix Image References (FabricFlow) - The Ledger presentation on Fabric References from Bitcoin, IBM, Hyperledger fabric docs, Deloitte, Ethereum, theledger, Gyft, T-Mining & Blockgeeks 33