SlideShare a Scribd company logo
Deploy a blockchain web-app
with Hyperledger Fabric
Horea Porutiu
Advisory Software Engineer, IBM
July 2019
Blockchain Architected
Blockchain Explored
Blockchain Solutions
Blockchain Composed
Next Steps
Blockchain Explained
IBM Blockchain Platform
2
By a show of hands…
1. Understands how blockchains work?
2. Know what Hyperledger Fabric is?
3. Developed a smart contract?
4. Developed a dapp?
5. Deployed a network to production?
✋🏼
⛓
3
What you will learn
1. Blockchain vocabulary 📖
4
What you will learn
1. Blockchain vocabulary
2. A use-case of blockchain
📖
✅
5
What you will learn
1. Blockchain vocabulary
2. A use-case of blockchain
3. Architecture behind a Hyperledger Fabric solution
📖
✅
🚧
6
What you will learn
1. Blockchain vocabulary
2. A use-case of blockchain
3. Architecture behind a Hyperledger Fabric solution
4. Difference between the world state and the ledger
📖
✅
🚧
📒
7
What you will learn
1. Blockchain vocabulary
2. A use-case of blockchain
3. Architecture behind a Hyperledger Fabric solution
4. Difference between the world state and the ledger
5. Difference between public and private blockchains
📖
✅
🚧
📒
🔓
8
What you will learn
1. Blockchain vocabulary
2. A use-case of blockchain
3. Architecture behind a Hyperledger Fabric solution
4. Difference between the world state and the ledger
5. Difference between public and private blockchains
6. How a client application invokes a smart contract
📖
✅
🚧
📒
🔓
🏼
9
Security: Public vs. private blockchains
•Bitcoin
•Users treated equally
•Identity is anonymous
Public blockchains
10
Security: Public vs. private blockchains
•Bitcoin
•Users treated equally
•Identity is anonymous
Public blockchains Private blockchains
•Hyperledger Fabric,
Quorum
•Network members
known, transactions can
be secret
11
Security: Public vs. private blockchains
• Identity management (anonymous vs. known)
•Bitcoin
•Users treated equally
•Identity is anonymous
Public blockchains Private blockchains
•Hyperledger Fabric,
Quorum
•Network members
known, transactions can
be secret
12
Security: Public vs. private blockchains
• Identity management (anonymous vs. known)
• Most business use-cases require private, permissioned blockchains
– Network members know who they’re dealing with (KYC)
– Membership is controlled
•Bitcoin
•Users treated equally
•Identity is anonymous
Public blockchains Private blockchains
•Hyperledger Fabric,
Quorum
•Network members
known, transactions can
be secret
13
A ledger often consists of two data structures
• Blockchain
o A linked list of blocks
o Each block describes a set of transactions
(e.g. the inputs to a smart contract invocation)
o Immutable – blocks cannot be tampered
block
txn txn txn
Blockchain
14
A ledger often consists of two data structures
• Blockchain
o A linked list of blocks
o Each block describes a set of transactions
(e.g. the inputs to a smart contract invocation)
o Immutable – blocks cannot be tampered
• World State
o An ordinary database (e.g. key/value store)
o Stores the combined outputs of all transactions
o CAN deleteWorld state
block
txn txn txn
Blockchain
15
Block detail (simplified)
-New blocks always added to the end
Block 16
Prev Block Hash:
57ec2fda71
Block Hash:
87ea2ffe94
Block Hash:
57ec2fda71
Block 15
Prev Block Hash:
d68b2f0a3b
Block 17
Prev Block Hash:
87ea2ffe94
Block Hash:
44bf2efe32
Transaction
Transaction
Transaction
Transaction
Transaction
Transaction
…
…
16
Block detail (simplified)
-New blocks always added to the end
-Each block header includes a hash of the current block transactions
and the previous block’s transactions
Block 16
Prev Block Hash:
57ec2fda71
Block Hash:
87ea2ffe94
Block Hash:
57ec2fda71
Block 15
Prev Block Hash:
d68b2f0a3b
Block 17
Prev Block Hash:
87ea2ffe94
Block Hash:
44bf2efe32
Transaction
Transaction
Transaction
Transaction
Transaction
Transaction
…
…
17
What is Hyperledger Fabric
• Platform for distributed ledger solutions
📒
18
What is Hyperledger Fabric
• Platform for distributed ledger solutions
• Open Source
– Contributions by hundreds of engineers from tens of
organizations
📒
👨🏼💻👩🏼💻
19
What is Hyperledger Fabric
• Platform for distributed ledger solutions
• Open Source
– Contributions by hundreds of engineers from tens of
organizations
• Features
– Smart Contracts (updates the ledger)
– Consensus (synch ledger across network)
– Privacy (channels)
🔒
📒
👨🏼💻👩🏼💻
20
Blockchain
User
Membership
Services
Blockchain
Developer
Blockchain
Network
Operator
Blockchain
B2B transactions
access to logic
access to data
creates
applications
operates
accesses
security
certificates
Regulator
performs
oversight
Traditional
Data
Sources
Traditional
Processing
Platforms
R
U
D
O

Blockchain
Architect
A
designs
Actors in a blockchain solution
21
The blockchain developer
Blockchain
Developer
D
f(abc);
Smart
Contract
Blockchain developers’ primary interests are…
Application
22
Ledger
…
The blockchain developer
Blockchain
Developer
D
f(abc);
Smart
Contract
Blockchain developers’ primary interests are…
…and how they interact with the ledger and other systems of record:
Systems
IntegrationEvents
!
Traditional
Data
Sources
Traditional
Processing
Platforms
Application
23
Components in a blockchain solution
Ledger List of transactions maintained by peers…
24
Components in a blockchain solution
Smart
Contract
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
25
Components in a blockchain solution
Smart
Contract
Peer
Network
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
Network which reaches consensus to add blocks
26
Components in a blockchain solution
Membership
Smart
Contract
Peer
Network
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
E T
Network which reaches consensus to add blocks
Authenticates and manages identities on network
27
Components in a blockchain solution
Membership
Smart
Contract
Events
Peer
Network
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
E T
Network which reaches consensus to add blocks
Authenticates and manages identities on network
Emits notifications of operations on network!
28
Components in a blockchain solution
Membership
Smart
Contract
Systems
Management
Events
Peer
Network
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
E T
Network which reaches consensus to add blocks
Authenticates and manages identities on network
Emits notifications of operations on network
Enables us to create/monitor blockchain componentsi
!
29
Components in a blockchain solution
Membership
Smart
Contract
Systems
Management
Events
Peer
Network
Wallet
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
E T
Network which reaches consensus to add blocks
Authenticates and manages identities on network
Emits notifications of operations on network
Enables us to create/monitor blockchain components
Securely manages a user’s credentials
i
!
30
Components in a blockchain solution
Membership
Smart
Contract
Systems
Management
Events
Peer
Network
Wallet
Ledger List of transactions maintained by peers
f(abc); Software running on peer, updates the world state
…
E T
Network which reaches consensus to add blocks
Authenticates and manages identities on network
Emits notifications of operations on network
Enables us to create/monitor blockchain components
Securely manages a user’s credentials
i
Systems
Integration Integrate blockchain with eternal systems
!
31
Smart Contracts
Smart Contracts contain the business logic deployed to peers
32
Smart Contracts
Smart Contracts contain the business logic deployed to peers
• Interact with the world state through the Fabric shim interface
33
Smart Contracts
Smart Contracts contain the business logic deployed to peers
• Interact with the world state through the Fabric shim interface
• Language support for:
– Golang
– Node.js
– Java
34
Smart Contracts
Smart Contracts contain the business logic deployed to peers
• Interact with the world state through the Fabric shim interface
• Language support for:
– Golang
– Node.js
– Java
Smart
ContractPeer
Client
Application
SDK
Invoke()
Admin
Install
Instantiate
Init()
35
Client Application
Client applications use Fabric SDK to:
• Connects over channels to peer and
orderer nodes
• Provide public / private keys ! Events
Channels
Client
Application SDK
🔑
36
Client Application
Client applications use Fabric SDK to:
• Connects over channels to peer and
orderer nodes
• Provide public / private keys
Connection Profile
• Network end-points and connection
parameters
• The gateway to submit transactions to
a Hyperledger Fabric network
! Events
Channels
Client
Application SDK
Local MSP
• Connection Parms
• Credential Store
• Channels
• Organisations
• Orderers
• Peers
• CAs
Connection Profile
🔑
37
Blockchain
developer
Smart
Contract
submitsdevelops
develops
recorded
accesses
event
emits
emits
D
Ledger
‘get’, ‘put’,
‘delete’
Client
Application
SDK
!
!
World state
block
txn txn txn
Blockchain
Peer
event
How applications interact with the ledger
38
Sample blockchain use-case: e-voting
39
Components in an e-voting blockchain solution
Ledger The ledger containing history of submitted votes…
40
Components in an e-voting blockchain solution
Smart
Contract
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
41
Components in an e-voting blockchain solution
Smart
Contract
Peer
Network
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
The peers which run the voterContract
42
Components in an e-voting blockchain solution
Membership
Smart
Contract
Peer
Network
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
E T
The peers which run the voterContract
Public and private key for each registered voter
43
Components in an e-voting blockchain solution
Membership
Smart
Contract
Events
Peer
Network
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
E T
The peers which run the voterContract
Public and private key for each registered voter
Emit events to when a transaction is complete!
44
Components in an e-voting blockchain solution
Membership
Smart
Contract
Systems
Management
Events
Peer
Network
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
E T
The peers which run the voterContract
Public and private key for each registered voter
Emit events to when a transaction is complete
VSCode extension to manage nodes & networki
!
45
Components in an e-voting blockchain solution
Membership
Smart
Contract
Systems
Management
Events
Peer
Network
Wallet
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
E T
The peers which run the voterContract
Public and private key for each registered voter
Emit events to when a transaction is complete
VSCode extension to manage nodes & network
Stores our voter’s public/private keys and certs
i
!
46
Components in an e-voting blockchain solution
Membership
Smart
Contract
Systems
Management
Events
Peer
Network
Wallet
Ledger The ledger containing history of submitted votes
f(abc);
voterContract. Registers voters & submits votes
…
E T
The peers which run the voterContract
Public and private key for each registered voter
Emit events to when a transaction is complete
VSCode extension to manage nodes & network
Stores our voter’s public/private keys and certs
i
Systems
Integration An API to validate voter registration (DMV API)
!
47
App Architecture
Concepts and Components
Considerations for the Developer,
Operator and Architect
49
Working with the ledger example: a change of
ownership transaction
World state
Transaction input - sent from application
invoke(voterContract, castVote,
2020election, 123123123, democrat)
txn txn txn
Application
f(abc);
Smart
Contract
50
Working with the ledger example: a change of
ownership transaction
World state
Transaction input - sent from application
invoke(voterContract, castVote,
2020election, 123123123, democrat)
Smart contract implementation
castVote(ctx, args) {
args.democrat.count++
}
txn txn txn
Application
f(abc);
Smart
Contract
51
Working with the ledger example: a change of
ownership transaction
World state
Transaction input - sent from application
invoke(voterContract, castVote,
2020election, 123123123, democrat)
democrat.count = 1
voterId.castBallot = true
World state: new contents
Smart contract implementation
castVote(ctx, args) {
args.democrat.count++
}
txn txn txn
Application
f(abc);
Smart
Contract
52
Working with the ledger example: a change of
ownership transaction
World state
Transaction input - sent from application
invoke(voterContract, castVote,
2020election, 123123123, democrat)
democrat.count = 1
voterId.castBallot = true
World state: new contents
Smart contract implementation
castVote(ctx, args) {
args.democrat.count++
}
txn txn txnDemocrat.co
unt = 1
Application
f(abc);
Smart
Contract
53
Working with the ledger example: a change of
ownership transaction
World state
Transaction input - sent from application
invoke(voterContract, castVote,
2020election, 123123123, democrat)
democrat.count = 1
voterId.castBallot = true
World state: new contents
Smart contract implementation
castVote(ctx, args) {
args.democrat.count++
}
txn txn txnDemocrat.co
unt = 1
“Invoke, voterContract,
castVote, 2020election,
123123123, democrat”
Application
f(abc);
Smart
Contract
54
E-voting Demo
55
What we learned
1. Blockchain vocabulary
2. A use-case of blockchain
3. Architecture behind a Hyperledger Fabric solution
4. Difference between the world state and the ledger
5. Difference between public and private blockchains
6. How a client application invokes a smart contract
📖
✅
🚧
📒
🔓
🏼
56
Contact
Questions⁉️: horea.porutiu@ibm.com
Twitter: @horeaporutiu
YouTube🎥: horeaporutiu
Rate today’s session
Session page on conference website O’Reilly Events App
Deployablockchainwebappwithhyperledgerfabricpresentation 190820170703

More Related Content

PPTX
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
PPTX
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
ODP
Hyperledger Fabric and Tools
PDF
Demystify blockchain development with hyperledger fabric
PDF
Bitmark and Hyperledger Workshop: the Digital Assets and Property
PPTX
Blockchain explored
PDF
Architecture of the Hyperledger Blockchain Fabric
PDF
Technical Introduction to Hyperledger Fabric v1.0
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Hyperledger Fabric and Tools
Demystify blockchain development with hyperledger fabric
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Blockchain explored
Architecture of the Hyperledger Blockchain Fabric
Technical Introduction to Hyperledger Fabric v1.0

What's hot (20)

PDF
An introduction to blockchain and hyperledger v ru
ODP
Blockchain Explorer
PDF
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
PPTX
Hyperledger Consensus Algorithms
ODP
Hyperledger Composer
PPTX
Introduction to Blockchain
PDF
Bitcoin Blockchain - Under the Hood
PDF
Hyperledger Fabric Architecture
PDF
Blockchain Explored: A technical deep-dive
PDF
Hyperledger Lightning Talk
PPTX
bitcoin_presentation
PPTX
Anatomy of a hyperledger application
ODP
Blockchain Introduction
PDF
Hyperledger whitepaper
PDF
Bitcoin Wallet &amp Keys
PDF
How to develop Decentralized App (ĐApp) on Ethereum
PDF
Alternative Consensus & Enterprise Blockchain
PDF
Blockchain Hyperledger Fabric
PDF
Hyperledger Fabric Application Development 20190618
PPTX
Microservices architecture
An introduction to blockchain and hyperledger v ru
Blockchain Explorer
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
Hyperledger Consensus Algorithms
Hyperledger Composer
Introduction to Blockchain
Bitcoin Blockchain - Under the Hood
Hyperledger Fabric Architecture
Blockchain Explored: A technical deep-dive
Hyperledger Lightning Talk
bitcoin_presentation
Anatomy of a hyperledger application
Blockchain Introduction
Hyperledger whitepaper
Bitcoin Wallet &amp Keys
How to develop Decentralized App (ĐApp) on Ethereum
Alternative Consensus & Enterprise Blockchain
Blockchain Hyperledger Fabric
Hyperledger Fabric Application Development 20190618
Microservices architecture
Ad

Similar to Deployablockchainwebappwithhyperledgerfabricpresentation 190820170703 (20)

PPTX
Blockchain architected
PDF
Wwc developing hyperledger applications v4
PDF
Wwc developing hyperledger applications v4
PPTX
Blockchain Hyper Ledger Fabric : Bangkok Conference
PPSX
Blockchain HyperLedger Fabric Internals - Clavent
PDF
Wwc developing hyperledger applications v2
PDF
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
PDF
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
PPTX
Blockchain Intro to Hyperledger Fabric
PPTX
Hyperledger & blockchain meetup - Milano 23.10.2019
PDF
Ibp technical introduction
PDF
Lecture 8 Hyperledger Fabric 2022f.pdf
PDF
Hyperledger Fabric Technical Deep Dive 20190618
PPTX
hyperledger-chaincode & hyperl fabric.pptx
PDF
Hyperledger community update Feb 20, 2018
PPTX
Blockchain Technology ,Architecture and its Structure
PPTX
Block chain fundamentals and hyperledger
PPTX
BlockChain-1.pptx
PDF
Blockchain development 101
PDF
Blockchain for Business
Blockchain architected
Wwc developing hyperledger applications v4
Wwc developing hyperledger applications v4
Blockchain Hyper Ledger Fabric : Bangkok Conference
Blockchain HyperLedger Fabric Internals - Clavent
Wwc developing hyperledger applications v2
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Blockchain Intro to Hyperledger Fabric
Hyperledger & blockchain meetup - Milano 23.10.2019
Ibp technical introduction
Lecture 8 Hyperledger Fabric 2022f.pdf
Hyperledger Fabric Technical Deep Dive 20190618
hyperledger-chaincode & hyperl fabric.pptx
Hyperledger community update Feb 20, 2018
Blockchain Technology ,Architecture and its Structure
Block chain fundamentals and hyperledger
BlockChain-1.pptx
Blockchain development 101
Blockchain for Business
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
cuic standard and advanced reporting.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
KodekX | Application Modernization Development
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Empathic Computing: Creating Shared Understanding
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Building Integrated photovoltaic BIPV_UPV.pdf
The AUB Centre for AI in Media Proposal.docx
cuic standard and advanced reporting.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
KodekX | Application Modernization Development
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Network Security Unit 5.pdf for BCA BBA.
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Deployablockchainwebappwithhyperledgerfabricpresentation 190820170703

  • 1. Deploy a blockchain web-app with Hyperledger Fabric Horea Porutiu Advisory Software Engineer, IBM July 2019 Blockchain Architected Blockchain Explored Blockchain Solutions Blockchain Composed Next Steps Blockchain Explained IBM Blockchain Platform
  • 2. 2 By a show of hands… 1. Understands how blockchains work? 2. Know what Hyperledger Fabric is? 3. Developed a smart contract? 4. Developed a dapp? 5. Deployed a network to production? ✋🏼 ⛓
  • 3. 3 What you will learn 1. Blockchain vocabulary 📖
  • 4. 4 What you will learn 1. Blockchain vocabulary 2. A use-case of blockchain 📖 ✅
  • 5. 5 What you will learn 1. Blockchain vocabulary 2. A use-case of blockchain 3. Architecture behind a Hyperledger Fabric solution 📖 ✅ 🚧
  • 6. 6 What you will learn 1. Blockchain vocabulary 2. A use-case of blockchain 3. Architecture behind a Hyperledger Fabric solution 4. Difference between the world state and the ledger 📖 ✅ 🚧 📒
  • 7. 7 What you will learn 1. Blockchain vocabulary 2. A use-case of blockchain 3. Architecture behind a Hyperledger Fabric solution 4. Difference between the world state and the ledger 5. Difference between public and private blockchains 📖 ✅ 🚧 📒 🔓
  • 8. 8 What you will learn 1. Blockchain vocabulary 2. A use-case of blockchain 3. Architecture behind a Hyperledger Fabric solution 4. Difference between the world state and the ledger 5. Difference between public and private blockchains 6. How a client application invokes a smart contract 📖 ✅ 🚧 📒 🔓 🏼
  • 9. 9 Security: Public vs. private blockchains •Bitcoin •Users treated equally •Identity is anonymous Public blockchains
  • 10. 10 Security: Public vs. private blockchains •Bitcoin •Users treated equally •Identity is anonymous Public blockchains Private blockchains •Hyperledger Fabric, Quorum •Network members known, transactions can be secret
  • 11. 11 Security: Public vs. private blockchains • Identity management (anonymous vs. known) •Bitcoin •Users treated equally •Identity is anonymous Public blockchains Private blockchains •Hyperledger Fabric, Quorum •Network members known, transactions can be secret
  • 12. 12 Security: Public vs. private blockchains • Identity management (anonymous vs. known) • Most business use-cases require private, permissioned blockchains – Network members know who they’re dealing with (KYC) – Membership is controlled •Bitcoin •Users treated equally •Identity is anonymous Public blockchains Private blockchains •Hyperledger Fabric, Quorum •Network members known, transactions can be secret
  • 13. 13 A ledger often consists of two data structures • Blockchain o A linked list of blocks o Each block describes a set of transactions (e.g. the inputs to a smart contract invocation) o Immutable – blocks cannot be tampered block txn txn txn Blockchain
  • 14. 14 A ledger often consists of two data structures • Blockchain o A linked list of blocks o Each block describes a set of transactions (e.g. the inputs to a smart contract invocation) o Immutable – blocks cannot be tampered • World State o An ordinary database (e.g. key/value store) o Stores the combined outputs of all transactions o CAN deleteWorld state block txn txn txn Blockchain
  • 15. 15 Block detail (simplified) -New blocks always added to the end Block 16 Prev Block Hash: 57ec2fda71 Block Hash: 87ea2ffe94 Block Hash: 57ec2fda71 Block 15 Prev Block Hash: d68b2f0a3b Block 17 Prev Block Hash: 87ea2ffe94 Block Hash: 44bf2efe32 Transaction Transaction Transaction Transaction Transaction Transaction … …
  • 16. 16 Block detail (simplified) -New blocks always added to the end -Each block header includes a hash of the current block transactions and the previous block’s transactions Block 16 Prev Block Hash: 57ec2fda71 Block Hash: 87ea2ffe94 Block Hash: 57ec2fda71 Block 15 Prev Block Hash: d68b2f0a3b Block 17 Prev Block Hash: 87ea2ffe94 Block Hash: 44bf2efe32 Transaction Transaction Transaction Transaction Transaction Transaction … …
  • 17. 17 What is Hyperledger Fabric • Platform for distributed ledger solutions 📒
  • 18. 18 What is Hyperledger Fabric • Platform for distributed ledger solutions • Open Source – Contributions by hundreds of engineers from tens of organizations 📒 👨🏼💻👩🏼💻
  • 19. 19 What is Hyperledger Fabric • Platform for distributed ledger solutions • Open Source – Contributions by hundreds of engineers from tens of organizations • Features – Smart Contracts (updates the ledger) – Consensus (synch ledger across network) – Privacy (channels) 🔒 📒 👨🏼💻👩🏼💻
  • 20. 20 Blockchain User Membership Services Blockchain Developer Blockchain Network Operator Blockchain B2B transactions access to logic access to data creates applications operates accesses security certificates Regulator performs oversight Traditional Data Sources Traditional Processing Platforms R U D O  Blockchain Architect A designs Actors in a blockchain solution
  • 22. 22 Ledger … The blockchain developer Blockchain Developer D f(abc); Smart Contract Blockchain developers’ primary interests are… …and how they interact with the ledger and other systems of record: Systems IntegrationEvents ! Traditional Data Sources Traditional Processing Platforms Application
  • 23. 23 Components in a blockchain solution Ledger List of transactions maintained by peers…
  • 24. 24 Components in a blockchain solution Smart Contract Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state …
  • 25. 25 Components in a blockchain solution Smart Contract Peer Network Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state … Network which reaches consensus to add blocks
  • 26. 26 Components in a blockchain solution Membership Smart Contract Peer Network Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state … E T Network which reaches consensus to add blocks Authenticates and manages identities on network
  • 27. 27 Components in a blockchain solution Membership Smart Contract Events Peer Network Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state … E T Network which reaches consensus to add blocks Authenticates and manages identities on network Emits notifications of operations on network!
  • 28. 28 Components in a blockchain solution Membership Smart Contract Systems Management Events Peer Network Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state … E T Network which reaches consensus to add blocks Authenticates and manages identities on network Emits notifications of operations on network Enables us to create/monitor blockchain componentsi !
  • 29. 29 Components in a blockchain solution Membership Smart Contract Systems Management Events Peer Network Wallet Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state … E T Network which reaches consensus to add blocks Authenticates and manages identities on network Emits notifications of operations on network Enables us to create/monitor blockchain components Securely manages a user’s credentials i !
  • 30. 30 Components in a blockchain solution Membership Smart Contract Systems Management Events Peer Network Wallet Ledger List of transactions maintained by peers f(abc); Software running on peer, updates the world state … E T Network which reaches consensus to add blocks Authenticates and manages identities on network Emits notifications of operations on network Enables us to create/monitor blockchain components Securely manages a user’s credentials i Systems Integration Integrate blockchain with eternal systems !
  • 31. 31 Smart Contracts Smart Contracts contain the business logic deployed to peers
  • 32. 32 Smart Contracts Smart Contracts contain the business logic deployed to peers • Interact with the world state through the Fabric shim interface
  • 33. 33 Smart Contracts Smart Contracts contain the business logic deployed to peers • Interact with the world state through the Fabric shim interface • Language support for: – Golang – Node.js – Java
  • 34. 34 Smart Contracts Smart Contracts contain the business logic deployed to peers • Interact with the world state through the Fabric shim interface • Language support for: – Golang – Node.js – Java Smart ContractPeer Client Application SDK Invoke() Admin Install Instantiate Init()
  • 35. 35 Client Application Client applications use Fabric SDK to: • Connects over channels to peer and orderer nodes • Provide public / private keys ! Events Channels Client Application SDK 🔑
  • 36. 36 Client Application Client applications use Fabric SDK to: • Connects over channels to peer and orderer nodes • Provide public / private keys Connection Profile • Network end-points and connection parameters • The gateway to submit transactions to a Hyperledger Fabric network ! Events Channels Client Application SDK Local MSP • Connection Parms • Credential Store • Channels • Organisations • Orderers • Peers • CAs Connection Profile 🔑
  • 39. 39 Components in an e-voting blockchain solution Ledger The ledger containing history of submitted votes…
  • 40. 40 Components in an e-voting blockchain solution Smart Contract Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes …
  • 41. 41 Components in an e-voting blockchain solution Smart Contract Peer Network Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes … The peers which run the voterContract
  • 42. 42 Components in an e-voting blockchain solution Membership Smart Contract Peer Network Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes … E T The peers which run the voterContract Public and private key for each registered voter
  • 43. 43 Components in an e-voting blockchain solution Membership Smart Contract Events Peer Network Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes … E T The peers which run the voterContract Public and private key for each registered voter Emit events to when a transaction is complete!
  • 44. 44 Components in an e-voting blockchain solution Membership Smart Contract Systems Management Events Peer Network Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes … E T The peers which run the voterContract Public and private key for each registered voter Emit events to when a transaction is complete VSCode extension to manage nodes & networki !
  • 45. 45 Components in an e-voting blockchain solution Membership Smart Contract Systems Management Events Peer Network Wallet Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes … E T The peers which run the voterContract Public and private key for each registered voter Emit events to when a transaction is complete VSCode extension to manage nodes & network Stores our voter’s public/private keys and certs i !
  • 46. 46 Components in an e-voting blockchain solution Membership Smart Contract Systems Management Events Peer Network Wallet Ledger The ledger containing history of submitted votes f(abc); voterContract. Registers voters & submits votes … E T The peers which run the voterContract Public and private key for each registered voter Emit events to when a transaction is complete VSCode extension to manage nodes & network Stores our voter’s public/private keys and certs i Systems Integration An API to validate voter registration (DMV API) !
  • 48. Concepts and Components Considerations for the Developer, Operator and Architect
  • 49. 49 Working with the ledger example: a change of ownership transaction World state Transaction input - sent from application invoke(voterContract, castVote, 2020election, 123123123, democrat) txn txn txn Application f(abc); Smart Contract
  • 50. 50 Working with the ledger example: a change of ownership transaction World state Transaction input - sent from application invoke(voterContract, castVote, 2020election, 123123123, democrat) Smart contract implementation castVote(ctx, args) { args.democrat.count++ } txn txn txn Application f(abc); Smart Contract
  • 51. 51 Working with the ledger example: a change of ownership transaction World state Transaction input - sent from application invoke(voterContract, castVote, 2020election, 123123123, democrat) democrat.count = 1 voterId.castBallot = true World state: new contents Smart contract implementation castVote(ctx, args) { args.democrat.count++ } txn txn txn Application f(abc); Smart Contract
  • 52. 52 Working with the ledger example: a change of ownership transaction World state Transaction input - sent from application invoke(voterContract, castVote, 2020election, 123123123, democrat) democrat.count = 1 voterId.castBallot = true World state: new contents Smart contract implementation castVote(ctx, args) { args.democrat.count++ } txn txn txnDemocrat.co unt = 1 Application f(abc); Smart Contract
  • 53. 53 Working with the ledger example: a change of ownership transaction World state Transaction input - sent from application invoke(voterContract, castVote, 2020election, 123123123, democrat) democrat.count = 1 voterId.castBallot = true World state: new contents Smart contract implementation castVote(ctx, args) { args.democrat.count++ } txn txn txnDemocrat.co unt = 1 “Invoke, voterContract, castVote, 2020election, 123123123, democrat” Application f(abc); Smart Contract
  • 55. 55 What we learned 1. Blockchain vocabulary 2. A use-case of blockchain 3. Architecture behind a Hyperledger Fabric solution 4. Difference between the world state and the ledger 5. Difference between public and private blockchains 6. How a client application invokes a smart contract 📖 ✅ 🚧 📒 🔓 🏼
  • 57. Rate today’s session Session page on conference website O’Reilly Events App