SlideShare a Scribd company logo
1 of 27
Download to read offline
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
DEMYSTIFY BLOCKCHAIN
DEVELOPMENT WITH
HYPERLEDGER FABRIC
Benjamin Fuentes
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
>whoami
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Agenda
What is Blockchain
Hyperledger Fabric
Demo : implementing a smart contract
Need help ?
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Blockchain
• Introduction
• Bitcoin
• Ethereum
• Hyperledger
• Hyperledger Fabric
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Introduction
Definition : a distributed system, introduced on
Bitcoin white paper in 2008, that maintains a
continuously-growing list of data records
hardened against tampering and revision
Maintain global state on distributed systems comes
from Byzantine Generals’ Problem described by Leslie
Lamport (1982)
Usage:
• Shared ledgers : digital currencies, etc …
• Distributed applications : smart contract, chaincode
Mesopotamian
ledger
Byzantine Generals’
Problem
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
The blockchain network
Page
Peer 1
chain
state
Distributed, almost real-time synchronized, no single point of failure, unstoppable
Peer 3
chain
state
Peer 2
chain
state
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
The chain inside a peer
… Block
n-1
Block
n
Genesis
Block 0
HASH
Previous
HASH
Payload
HASH
Previous
HASH
Payload
HASH
Previous
HASH
Payload
HASH
Each block contains the hash of the previous block
A hash is a compressed data of the payload. If the content changes, the hash changes too. We can verify
easily this
Each peer of the network contains the same blockchain locally, a consensus is needed to accept new blocks
and dispatch it all over the network
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
CAP theorem resolved ?
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes9
• An unregulated shadow-currency
• The first blockchain application
• Resource intensive (Proof Of Work Consensus)
Created in 2008 by Satoshi Nakamoto (a pseudonym) after Worldwide
financial crisis to propose a decentralized cash exchange system.
The aim is to allow people to transfer digital currency without intermediary,
no censorship and keeping (pseudo-)anonymity
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes10
It is an open source, public, blockchain-based distributed computing platform
featuring smart contract (scripting) functionality. It provides a
decentralized Turing-complete virtual machine, the Ethereum Virtual Machine
(EVM), which can execute scripts using an international network of public
nodes.
Ethereum also provides a value token called "ether", which can be
transferred between participants and is used to compensate participant nodes
for computations performed
The system comes from a Bitcoin fork and went live on 30 July 2015.
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Hyperledger
Hyperledger is a blockchain-based open
standard for distributed ledgers under the Linux
Foundation (>100 members)
The project aims to create an open, public,
decentralized ledger based on blockchain
technology
Answer to: business needs in terms of cost,
speed, compliance and traceability
Fabric
Burrow Indy
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Hyperledger Fabric
Key Features
• No Tokens ! Based on pluggable consensus (*BFT, Kafka)
• Channels for sharing confidential information
• Endorsement policies for transactions (rules based on “who can endorse”)
• Key/Value and JSON-stored world state support
• Bring-your-own Membership Service Provider (MSP)
• Developed in Go and uses .proto file (it means any language is supported)
• Easy deployment based on Docker images
• Smart contracts in Go and Java
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric - the Basics
• Actors
• Components
• Interactions
• Architecture
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Actors
A common user interacting with the Blockchain using an application.
They could not be aware of the Blockchain.
The overall authority in a business network. Specifically, regulators
may require broad access to the ledger’s contents.
Manages the different types of certificates required to run a
permissioned Blockchain.
Any external systems which may be used by the Blockchain to
process transactions (APIs, proxy, etc …)
Existing data systems which may provide data to influence the
behavior of smart contracts.
Blockchain
User
Certificate
Authority
Blockchain
Regulator
Traditional
Processing
Platform &
Data
sources
U
R
ü
The developer of client applications and smart contracts which
interact with the network
Blockchain
Developer D
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Components
Membership
Smart
Contract
Systems
Management
Events
Consensus
Wallet
Ledger Contains the current World State of the ledger and a transaction
invocations chain of blocks
f(abc); The logic code running on each invocation call. Transaction
invocations result in updating or querying ledger State
…
E T
Chorum responsible for maintaining a consistently replicated ledger and
for agreeing on new blockchain block
Manages identity and transaction certificates
Creates notifications after smart contracts execution
Provides the ability to create, change and monitor Blockchain
components
Securely keeps user’s security credentials
i
Responsible for integrating Blockchain bi-directionally with
external systems. Not part of Blockchain, but used with it.
Systems
Integration
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Interactions
Communication channels:
• SDK : use gRPC to communicate with a blockchain peer or Certificate
Authority. Maintain the user’s key wallet and embed part of protocol
logic
Functional interaction methods:
• INSTALL* : copy a chaincode on a peer
• INSTANTIATE* : run the chaincode on some specific channels &
policies
• QUERY : to read data from World State
• INVOKE* : to call a chaincode method creating a new transaction
changing in a way the World State
• UPGRADE* : to deploy a new chaincode version
membership
keys
Ledger
Events
Chaincode
state
peer
SDK
ECA, TCA, TLS-CA
Blockchain
network
(* Creates a block on the chain)
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Architecture
1.Blockchain developer codes
Application and Smart Contract
2.He deploys the app on a server and
smart contract on a peer using
INSTALL/INSTANTIATE
3.A registered user interacts with the
app sending order (INVOKE) or
retrieving information (QUERY)
through the smart contract
4.Smart contract can emit an event
which can be susbcribed by the app
World State
Chain of blocks
Genesis
Block
…
Blockchain
developer
Smart
Contract
Invokes
Queries
Develops
ApplicationD
SDK
txn txn
Block n
PEER
develops, then deploys emits
PutState GetState
U
Blockchain
user
Interacts
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Think distributed and deterministic !!!
Get resources from external systems
peer
Blockchain
network
peer
peer
External System
Put resources to external systems
peer
Blockchain
network
peer
peer
t1 t3
t2
1 call
1 call
1 call
External System
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Hyperledger Fabric - Key features
• Endorsement/consensus model
• Plugging external identity server
• Plugging external State DB
• Historical queries
• HTTP API deprecated, use SDK
• Chaincode upgrades
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric V1.0 - Endorsement/Consensus model
Peer role has been split :
• Committer peer : commits
transactions, maintains ledger and state
• Endorsing peer: receives a transaction
proposal for endorsement, responds
granting or denying endorsement
• Ordering peer: approves the inclusion
of transaction blocks into the ledger and
communicates with peer and endorsing
peer nodes
Also a peer can now communicate via
private channels inside the network to
strenghten privacy
– SOLO (Single node
for development)
– Kafka / Zookeeper
– SBFT (future)
Ordering-Service
OO
O O
E
C
Peer types
or
Consensus modes
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric V1.0 - HTTP deprecated, use SDK
Do not use HTTP API anymore
Use SDK over gRPC :
• Java
• NodeJs
• Python
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric V1.0 - Certificate Authority /
Membership Service Provider (MSP)
Make as pluggable as possible
Make it decentralized
Default implementation :
CloudFlare's PKI/TLS toolkit
Developed in GO
CLI commands for server and client
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric V1.0 - new World State DB
Key/value database (LevelDB)
Document JSON database (CouchDB)
SQL data stores (future?)
• requires schema definition
• difficult to change schema
CouchDB
Chaincode
APIs
LevelDB
Worldstate
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric V1.0 - Chaincode upgrades
New command UPGRADE to
use instead of redeploying
another chaincode
Chaincode will contain version
number
…
Smart
Contract
txn txn txn txn
Smart
Contract
Application
SDK
UPGRADE
Version N+1Version N
World/Ledger
State
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Fabric V1.0 - Historical queries
Simple use case :
• Show history of values for an asset X
Rich queries :
• Show value of an asset at a certain point
in time
• Show all assets having same field value
through history (example : owned by a
specific owner)
tt-1t-2
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Kitty wants DEMO
@voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes
Need Help ?
http://www.reactiv.me
reactivme@gmail.com
Leave feedback
@benji_fuentes
@reactivme

More Related Content

What's hot

An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruLennartF
 
Hyperledger community update 20180528
Hyperledger community update 20180528Hyperledger community update 20180528
Hyperledger community update 20180528Arnaud Le Hors
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger applicationEric Cattoir
 
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise BlockchainHyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise BlockchainAltoros
 
Hyperledger Lightning Talk
Hyperledger Lightning TalkHyperledger Lightning Talk
Hyperledger Lightning TalkAndrew Kennedy
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyJollen Chen
 
Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Dr. Ketan Parmar
 
Architecture of the Hyperledger Blockchain Fabric
Architecture of the Hyperledger Blockchain FabricArchitecture of the Hyperledger Blockchain Fabric
Architecture of the Hyperledger Blockchain Fabricmustafa sarac
 
Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Dr. Ketan Parmar
 
Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0Altoros
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDuncan Johnston-Watt
 
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & CodeDeploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & CodeHorea Porutiu
 
Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Arnaud Le Hors
 
Hyperledger Fabric Architecture
Hyperledger Fabric ArchitectureHyperledger Fabric Architecture
Hyperledger Fabric Architecture상문 오
 
Trading Derivatives on Hyperledger
Trading Derivatives on HyperledgerTrading Derivatives on Hyperledger
Trading Derivatives on HyperledgerLF Events
 
Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910Arnaud Le Hors
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerDev_Events
 

What's hot (20)

Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru
 
Hyperledger community update 20180528
Hyperledger community update 20180528Hyperledger community update 20180528
Hyperledger community update 20180528
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
 
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise BlockchainHyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
 
Hyperledger Lightning Talk
Hyperledger Lightning TalkHyperledger Lightning Talk
Hyperledger Lightning Talk
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and Property
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer
 
Architecture of the Hyperledger Blockchain Fabric
Architecture of the Hyperledger Blockchain FabricArchitecture of the Hyperledger Blockchain Fabric
Architecture of the Hyperledger Blockchain Fabric
 
Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer Introduction of Hyperledger Fabric & Composer
Introduction of Hyperledger Fabric & Composer
 
Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain Network
 
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & CodeDeploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
 
Blockchain Hyperledger Fabric
Blockchain Hyperledger FabricBlockchain Hyperledger Fabric
Blockchain Hyperledger Fabric
 
Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018Hyperledger Fabric Update - June 2018
Hyperledger Fabric Update - June 2018
 
Hyperledger Fabric Architecture
Hyperledger Fabric ArchitectureHyperledger Fabric Architecture
Hyperledger Fabric Architecture
 
Trading Derivatives on Hyperledger
Trading Derivatives on HyperledgerTrading Derivatives on Hyperledger
Trading Derivatives on Hyperledger
 
Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910Blockchain explained FIATA Congress 20180910
Blockchain explained FIATA Congress 20180910
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and Hyperledger
 

Similar to Demystify blockchain development with hyperledger fabric

Blockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its StructureBlockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its Structurekasthurimukila
 
Blockchain for Python Developers - Pyjamas Conf 2020
Blockchain for Python Developers - Pyjamas Conf 2020Blockchain for Python Developers - Pyjamas Conf 2020
Blockchain for Python Developers - Pyjamas Conf 2020Juarez Junior
 
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsBlockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsIngo Weber
 
Block chain fundamentals and hyperledger
Block chain fundamentals and hyperledgerBlock chain fundamentals and hyperledger
Block chain fundamentals and hyperledgersendhilkumarks
 
BlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overviewBlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overviewPad Kankipati
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Ingo Weber
 
Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...Ingo Weber
 
Gluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain ApplicationsGluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain ApplicationsDuncan Johnston-Watt
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxdeepaksingh160910
 
blockchain unit 3
blockchain unit 3blockchain unit 3
blockchain unit 3Rohit Verma
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4LennartF
 
Integrating blockchain and traditional web
Integrating blockchain and traditional webIntegrating blockchain and traditional web
Integrating blockchain and traditional webMichael Coon
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymondMeng-Ru (Raymond) Tsai
 
Blockchain - Primer for City CIOs v05 01 22.pdf
Blockchain - Primer for City CIOs v05 01 22.pdfBlockchain - Primer for City CIOs v05 01 22.pdf
Blockchain - Primer for City CIOs v05 01 22.pdfssusera441c2
 
A Breathless Tour of Blockchain
A Breathless Tour of BlockchainA Breathless Tour of Blockchain
A Breathless Tour of BlockchainEoin Woods
 

Similar to Demystify blockchain development with hyperledger fabric (20)

Blockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its StructureBlockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its Structure
 
Blockchain for Python Developers - Pyjamas Conf 2020
Blockchain for Python Developers - Pyjamas Conf 2020Blockchain for Python Developers - Pyjamas Conf 2020
Blockchain for Python Developers - Pyjamas Conf 2020
 
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsBlockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and Applications
 
Block chain fundamentals and hyperledger
Block chain fundamentals and hyperledgerBlock chain fundamentals and hyperledger
Block chain fundamentals and hyperledger
 
BlockChain-1.pptx
BlockChain-1.pptxBlockChain-1.pptx
BlockChain-1.pptx
 
BlockChain-1.pptx
BlockChain-1.pptxBlockChain-1.pptx
BlockChain-1.pptx
 
BlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overviewBlockchainConf.tech - Hyperledger overview
BlockchainConf.tech - Hyperledger overview
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020
 
Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...Blockchain Application Design and Development, and the Case of Programmable M...
Blockchain Application Design and Development, and the Case of Programmable M...
 
Gluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain ApplicationsGluecon 2016 Keynote: Deploying and Managing Blockchain Applications
Gluecon 2016 Keynote: Deploying and Managing Blockchain Applications
 
hyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptxhyperledger-chaincode & hyperl fabric.pptx
hyperledger-chaincode & hyperl fabric.pptx
 
Introduction to Blockchain Technology
Introduction to Blockchain TechnologyIntroduction to Blockchain Technology
Introduction to Blockchain Technology
 
blockchain unit 3
blockchain unit 3blockchain unit 3
blockchain unit 3
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4
 
Blockchain
BlockchainBlockchain
Blockchain
 
Defrag x blockchain keynote
Defrag x blockchain keynoteDefrag x blockchain keynote
Defrag x blockchain keynote
 
Integrating blockchain and traditional web
Integrating blockchain and traditional webIntegrating blockchain and traditional web
Integrating blockchain and traditional web
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond
 
Blockchain - Primer for City CIOs v05 01 22.pdf
Blockchain - Primer for City CIOs v05 01 22.pdfBlockchain - Primer for City CIOs v05 01 22.pdf
Blockchain - Primer for City CIOs v05 01 22.pdf
 
A Breathless Tour of Blockchain
A Breathless Tour of BlockchainA Breathless Tour of Blockchain
A Breathless Tour of Blockchain
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Demystify blockchain development with hyperledger fabric

  • 1. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes DEMYSTIFY BLOCKCHAIN DEVELOPMENT WITH HYPERLEDGER FABRIC Benjamin Fuentes
  • 2. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes >whoami
  • 3. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Agenda What is Blockchain Hyperledger Fabric Demo : implementing a smart contract Need help ?
  • 4. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Blockchain • Introduction • Bitcoin • Ethereum • Hyperledger • Hyperledger Fabric
  • 5. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Introduction Definition : a distributed system, introduced on Bitcoin white paper in 2008, that maintains a continuously-growing list of data records hardened against tampering and revision Maintain global state on distributed systems comes from Byzantine Generals’ Problem described by Leslie Lamport (1982) Usage: • Shared ledgers : digital currencies, etc … • Distributed applications : smart contract, chaincode Mesopotamian ledger Byzantine Generals’ Problem
  • 6. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes The blockchain network Page Peer 1 chain state Distributed, almost real-time synchronized, no single point of failure, unstoppable Peer 3 chain state Peer 2 chain state
  • 7. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes The chain inside a peer … Block n-1 Block n Genesis Block 0 HASH Previous HASH Payload HASH Previous HASH Payload HASH Previous HASH Payload HASH Each block contains the hash of the previous block A hash is a compressed data of the payload. If the content changes, the hash changes too. We can verify easily this Each peer of the network contains the same blockchain locally, a consensus is needed to accept new blocks and dispatch it all over the network
  • 8. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes CAP theorem resolved ?
  • 9. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes9 • An unregulated shadow-currency • The first blockchain application • Resource intensive (Proof Of Work Consensus) Created in 2008 by Satoshi Nakamoto (a pseudonym) after Worldwide financial crisis to propose a decentralized cash exchange system. The aim is to allow people to transfer digital currency without intermediary, no censorship and keeping (pseudo-)anonymity
  • 10. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes10 It is an open source, public, blockchain-based distributed computing platform featuring smart contract (scripting) functionality. It provides a decentralized Turing-complete virtual machine, the Ethereum Virtual Machine (EVM), which can execute scripts using an international network of public nodes. Ethereum also provides a value token called "ether", which can be transferred between participants and is used to compensate participant nodes for computations performed The system comes from a Bitcoin fork and went live on 30 July 2015.
  • 11. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Hyperledger Hyperledger is a blockchain-based open standard for distributed ledgers under the Linux Foundation (>100 members) The project aims to create an open, public, decentralized ledger based on blockchain technology Answer to: business needs in terms of cost, speed, compliance and traceability Fabric Burrow Indy
  • 12. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Hyperledger Fabric Key Features • No Tokens ! Based on pluggable consensus (*BFT, Kafka) • Channels for sharing confidential information • Endorsement policies for transactions (rules based on “who can endorse”) • Key/Value and JSON-stored world state support • Bring-your-own Membership Service Provider (MSP) • Developed in Go and uses .proto file (it means any language is supported) • Easy deployment based on Docker images • Smart contracts in Go and Java
  • 13. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric - the Basics • Actors • Components • Interactions • Architecture
  • 14. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Actors A common user interacting with the Blockchain using an application. They could not be aware of the Blockchain. The overall authority in a business network. Specifically, regulators may require broad access to the ledger’s contents. Manages the different types of certificates required to run a permissioned Blockchain. Any external systems which may be used by the Blockchain to process transactions (APIs, proxy, etc …) Existing data systems which may provide data to influence the behavior of smart contracts. Blockchain User Certificate Authority Blockchain Regulator Traditional Processing Platform & Data sources U R ü The developer of client applications and smart contracts which interact with the network Blockchain Developer D
  • 15. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Components Membership Smart Contract Systems Management Events Consensus Wallet Ledger Contains the current World State of the ledger and a transaction invocations chain of blocks f(abc); The logic code running on each invocation call. Transaction invocations result in updating or querying ledger State … E T Chorum responsible for maintaining a consistently replicated ledger and for agreeing on new blockchain block Manages identity and transaction certificates Creates notifications after smart contracts execution Provides the ability to create, change and monitor Blockchain components Securely keeps user’s security credentials i Responsible for integrating Blockchain bi-directionally with external systems. Not part of Blockchain, but used with it. Systems Integration
  • 16. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Interactions Communication channels: • SDK : use gRPC to communicate with a blockchain peer or Certificate Authority. Maintain the user’s key wallet and embed part of protocol logic Functional interaction methods: • INSTALL* : copy a chaincode on a peer • INSTANTIATE* : run the chaincode on some specific channels & policies • QUERY : to read data from World State • INVOKE* : to call a chaincode method creating a new transaction changing in a way the World State • UPGRADE* : to deploy a new chaincode version membership keys Ledger Events Chaincode state peer SDK ECA, TCA, TLS-CA Blockchain network (* Creates a block on the chain)
  • 17. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Architecture 1.Blockchain developer codes Application and Smart Contract 2.He deploys the app on a server and smart contract on a peer using INSTALL/INSTANTIATE 3.A registered user interacts with the app sending order (INVOKE) or retrieving information (QUERY) through the smart contract 4.Smart contract can emit an event which can be susbcribed by the app World State Chain of blocks Genesis Block … Blockchain developer Smart Contract Invokes Queries Develops ApplicationD SDK txn txn Block n PEER develops, then deploys emits PutState GetState U Blockchain user Interacts
  • 18. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Think distributed and deterministic !!! Get resources from external systems peer Blockchain network peer peer External System Put resources to external systems peer Blockchain network peer peer t1 t3 t2 1 call 1 call 1 call External System
  • 19. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Hyperledger Fabric - Key features • Endorsement/consensus model • Plugging external identity server • Plugging external State DB • Historical queries • HTTP API deprecated, use SDK • Chaincode upgrades
  • 20. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric V1.0 - Endorsement/Consensus model Peer role has been split : • Committer peer : commits transactions, maintains ledger and state • Endorsing peer: receives a transaction proposal for endorsement, responds granting or denying endorsement • Ordering peer: approves the inclusion of transaction blocks into the ledger and communicates with peer and endorsing peer nodes Also a peer can now communicate via private channels inside the network to strenghten privacy – SOLO (Single node for development) – Kafka / Zookeeper – SBFT (future) Ordering-Service OO O O E C Peer types or Consensus modes
  • 21. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric V1.0 - HTTP deprecated, use SDK Do not use HTTP API anymore Use SDK over gRPC : • Java • NodeJs • Python
  • 22. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric V1.0 - Certificate Authority / Membership Service Provider (MSP) Make as pluggable as possible Make it decentralized Default implementation : CloudFlare's PKI/TLS toolkit Developed in GO CLI commands for server and client
  • 23. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric V1.0 - new World State DB Key/value database (LevelDB) Document JSON database (CouchDB) SQL data stores (future?) • requires schema definition • difficult to change schema CouchDB Chaincode APIs LevelDB Worldstate
  • 24. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric V1.0 - Chaincode upgrades New command UPGRADE to use instead of redeploying another chaincode Chaincode will contain version number … Smart Contract txn txn txn txn Smart Contract Application SDK UPGRADE Version N+1Version N World/Ledger State
  • 25. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Fabric V1.0 - Historical queries Simple use case : • Show history of values for an asset X Rich queries : • Show value of an asset at a certain point in time • Show all assets having same field value through history (example : owned by a specific owner) tt-1t-2
  • 26. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Kitty wants DEMO
  • 27. @voxxed_thess #Blockchain #Hyperledger @reactivme @benji_fuentes Need Help ? http://www.reactiv.me reactivme@gmail.com Leave feedback @benji_fuentes @reactivme