SlideShare a Scribd company logo
1 of 30
Download to read offline
Architecture of the Hyperledger
Blockchain Fabric
Christian Cachin
IBM Research – Zurich
& many others at IBM, IBM Research, and Hyperledger
November 2016
2
What is a blockchain?
3
A state machine
§ Functionality F
– Operation o transforms a state s to new state s' and may generate a response r
(s', r) ← F(s, o)
§ Validation condition
– Operation needs to be valid, in current state, according to a predicate P()
o
s s' / r
o
s s' / r
P(s,o) = TRUE
4
Blockchain state machine
§ Append-only log
– Every operation o appends a "block" of valid transactions (tx) to the log
§ Log content is verifiable from the most recent element
§ Log entries form a hash chain
ht ← Hash( [tx1, tx2, ... ] || ht-1 || t) .
o
s s'
5
Distributed p2p protocol to create a ledger
o1 o2 o3
s0 s1 s2 s3
Nodes run a
protocol to
construct the
ledger
Nodes
produce
transactions
6
Blockchain protocol features
§ Only "valid" operations (transactions) are "executed"
§ Transactions can be simple
– Bitcoin tx are statement of ownership for coins, digitally signed
"This bitcoin now belongs to K2" signed by K1
§ Transactions can be complex (smart contracts = arbitrary code)
– Embody logic that responds to events (on blockchain) and may transfer assets in
response
– Auctions, elections, investment decisions, blackmail ...
7
Security and privacy
§ Transactional privacy
– Anonymity or pseudonymity through cryptographic tools
– Some is feasible today (e.g., anonymous credentials in IBM Identity Mixer)
§ Contract privacy
– Distributed secure cryptographic computation on encrypted data
§ Accountability & non-repudiation
– Identity and cryptographic signatures
§ Auditability & transparency
– Cryptographic hash chain
§ Many of these need advanced cryptographic protocols
8
Consensus
9
Decentralized – Nakamoto consensus/Bitcoin
§ Nodes prepare blocks
– List of transactions (tx)
– All tx valid
§ Lottery race
– Solves a hard puzzle
– Selects a random
winner/leader
– Winner's operation/
block is executed and
"mines" a coin
§ All nodes verify and
validate new block
– "Longest" chain wins
10
Decentralized = permissionless
§ Survives censorship and suppression
– No central entity
§ Nakamoto consensus requires proof-of-work (PoW)
– Original intent: one CPU, one vote
– Majority of hashing power controls network
– Gives economic incentive to participate (solution to PoW is a newly "mined" Bitcoin)
§ Today, total hashing work consumes a lot of electricity
– Estimates vary, 250-500MW, from a major city to a small country ...
§ Protocol features
– Stability is a tradeoff between dissemination of new block (10s-20s) and mining rate
(new block on average every 10min)
– Decisions are not final ("wait until chain is 6 blocks longer before a tx is confirmed")
11
Consortium consensus (BFT, Hyperledger)
§ Designated set of
homogeneous
validator nodes
§ BFT/Byzantine agreement
– Tolerates f-out-of-n faulty/
adversarial nodes
– Generalized quorums
§ Tx sent to consensus
nodes
§ Consensus validates tx,
decides, and disseminates
result
12
Consortium consensus = permissioned
§ Central entity controls group membership
– Dynamic membership changes in protocol
– Membership may be decided inline, by protocol itself
§ Features
– BFT and consensus are very-well understood problems
● Clear assumptions and top-down design
● 700 protocols and counting [AGK+15]
● Textbooks [CGR11]
● Open-source implementations (BFT-SMaRT)
– Many systems already provide crash tolerant consensus (Chubby, Zookeeper, etcd ...)
– Requires Ω(n2) communication (OK for 10-100 nodes, not > 1000s)
§ Revival of research in BFT protocols
– Focus on scalability and communication efficiency
13
Consortium consensus – under development
§ Hyperledger fabric (originated from IBM's contribution to Hyperledger)
– Includes PBFT protocol [CL02]
§ Tendermint and others
§ HoneyBadgerBFT [MXC+16]
– Revisits practical randomized BFT [CKPS01], including amoritzation
§ Many existing BFT libraries predate blockchain
– BFT-SMaRT, Univ. Lisbon (github.com/bft-smart/library)
– Prime, Johns Hopkins Univ. (www.dsn.jhu.edu/byzrep/prime.html)
14
More variations of consensus
§ Bitcoin-NG [EGS+16]
– Bitcoin PoW elects a leader, it is responsible for ordering the next K tx
§ Proof-of-stake (explored by Ethereum)
– Voting power relative to asset holdings (through cryptocurrency held by blockchain)
§ Hybrid PoW (PeerCensus [DSW16])
– PoW protocol to elect nodes in one consensus group
– Group runs ordinary BFT consensus
§ Hierarchical & partitioned, randomized [LNB+15]
– Random sub-groups, nodes and tx assigned randomly to sub-groups
– Each sub-group runs ordinary BFT consensus
15
Scalability–performance tradeoff
M. Vukolic: The Quest for Scalable Blockchain Fabric: Proof-of-Work vs. BFT Replication.
Proc. iNetSeC 2015, LNCS 9591.
16
Hyperledger
17
Hyperledger Project
§ Open-source collaboration under Linux Foundation
– www.hyperledger.org
– Hyperledger unites industry leaders to advance blockchain technology (Dec. '15)
– 50+ members in July '16
§ Develops an enterprise-grade, open source distributed ledger framework
§ Code contributions from several members
§ IBM's contribution – github.com/hyperledger/fabric/
– Security architecture and consensus protocols from IBM Research - Zurich
18
19
Hyperledger fabric
§ Enterprise-grade blockchain fabric and distributed ledger framework
– A blockchain implementation in the Hyperledger Project
§ Developed open-source, by IBM and others (DAH, LSEG ...)
– github.com/hyperledger/fabric
– Initially called 'openblockchain'
– Donated by IBM to Hyperledger project
– Actively developed
§ Technical details
– Implemented in GO
– Runs smart contracts ("chaincode") within Docker containers
– Implements consortium blockchain using BFT consensus
20
Hyperledger fabric architecture
21
Hyperledger fabric details (v0.6-preview) / 1
§ Platform-agnostic
– GO, gRPC over HTTP/2
§ Peers
– Validating peers (all running consensus) and non-validating peers
§ Transactions
– Deploy new chaincode / Invoke an operation / Read state
– Chaincode is arbitrary GO program running in a Docker container
§ State is a key-value store (RocksDB)
– Put, get ... no other state must be held in chaincode
– Non-validating peers store state and execute transactions
22
Hyperledger fabric details / 2
§ Consensus in BFT model
– Modular architecture supports other consensus protocols
– Currently, PBFT [CL02]
– Non-determinism addressed by Sieve protocol [CSV16]
– Static membership in consensus group
§ Hash chain computed over state and transactions
23
Hyperledger fabric details / 3
§ Membership service issues certificates to peers
– Enrollment certificates (E-Cert, issued by E-CA)
● Assign identity to node, gives permission to join and issue transactions
– Transaction certificates (T-Cert, issued by T-CA)
● Capability to issue one transaction (or more)
● Unlinkable to enrollment certificate, for anyone except for transaction CA
§ Pseudonymous transaction authorization
– Controlled by peer, how many Transaction-Signatures with same T-Cert
24
Non-determinism in BFT replication [CSV16]
§ Service-replication paradigm needs deterministic operations
– Agree on order of operations, then every node executes
§ What if application is given as black-box? Deterministic? ... undecidable!
§ Our approach – filter out inadvertent non-determinism
– Execute operation, compare results, and revert it if "too much" divergence is evident
– When "enough" nodes arrive at the same result, accept it
§ If application is randomized
– For algorithmic purpose (Monte Carlo): use master-slave approach
– For cryptography and security functions: cryptographic verifiable random functions (VRF)
25
Towards Hyperledger fabric v1.0
§ Separate the functions of nodes into endorsers and consensus nodes
– Every chaincode may have different endorsers
– Endorsers have state, run tx, and validate tx for their chaincode
– Consensus nodes order already-validated tx
§ Scales better, computation effort can be distributed
§ Permits confidential state on blockchain (seen only by endorsers)
26
Separation of endorsement from consensus
§ Validation is by chaincode
§ Dedicated endorsers
per chaincode
§ Consensus service
– Only communication
– Pub/sub messaging
– Ordering for endorsed tx
§ State and hash chain
are common
– State may be encrypted
Consensus service
only orders tx
Per-chaincode
endorsers
27
Transaction flow
28
Conclusion
§ Blockchain combines many interesting techniques
– Distributed computing for consensus
– Cryptography for integrity, privacy, anonymity
§ Blockchain = Distributing trust over the Internet
§ Hyperledger Fabric
– Open-source platform for permissioned ledger (so far, consortium consensus)
– GO, gRPC, HTTP/2, Docker, RocksDB ...
– Modular consensus (PBFT so far)
– Pseudonymous authorization
29
References
www.hyperledger.org
github.com/hyperledger/fabric
hyperledger-fabric.readthedocs.io/
[AGK+15] P.-L. Aublin, R. Guerraoui, N. Knezevic, V. Quéma, M. Vukolic: The Next 700 BFT Protocols. ACM
TOCS, 32(4), 2015.
[BCG+14] E. Ben-Sasson, A. Chiesa, C. Garman, M. Green, I. Miers, E. Tromer, M. Virza: Zerocash:
Decentralized Anonymous Payments from Bitcoin. IEEE S&P 2014.
[CKPS01] C. Cachin, K. Kursawe, F. Petzold, V. Shoup: Secure and Efficient Asynchronous Broadcast
Protocols. CRYPTO 2001.
[CGR11] C. Cachin, R. Guerraoui, L. Rodrigues: Introduction to Reliable and Secure Distributed
Programming (2. ed.). Springer, 2011.
[CSV16] C. Cachin, S. Schubert, M. Vukolic: Non-determinism in Byzantine Fault-Tolerant Replication.
OPODIS 2016.
30
References
[CL02] M. Castro, B. Liskov: Practical Byzantine fault tolerance and proactive recovery. ACM TOCS, 20(4),
2002.
[DSW16] C. Decker, J. Seidel, R. Wattenhofer: Bitcoin meets strong consistency. ICDCN 2016.
[EGS+16] I. Eyal, A. Gencer, E.G. Sirer, R. van Renesse: Bitcoin-NG: A Scalable Blockchain Protocol. NSDI
2016.
[KMS+16] A. Kosba, A. Miller, E. Shi, Z. Wen, C. Papamanthou: Hawk: The Blockchain Model of
Cryptography and Privacy-Preserving Smart Contracts. IEEE S&P 2016.
[LNB+15] L. Luu, V. Narayanan, K. Baweja, C. Zheng, S. Gilbert, P. Saxena: A Secure Sharding Protocol For
Open Blockchains. ACM CCS 2016.
[MR98] D. Malkhi, M. Reiter: Byzantine Quorum Systems. Distributed Computing, 1998.
[MXC+16] A. Miller, Y. Xia, K. Croman, E. Shi, D. Song: The Honey Badger of BFT Protocols. ACM CCS 2016.
[V16] M. Vukolic: The Quest for Scalable Blockchain Fabric: Proof-of-Work vs. BFT Replication. LNCS 9591,
Proc. iNetSeC 2015.

More Related Content

What's hot

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
Altoros
 
Alternative Consensus & Enterprise Blockchain
Alternative Consensus & Enterprise BlockchainAlternative Consensus & Enterprise Blockchain
Alternative Consensus & Enterprise Blockchain
Tobias Disse
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Дмитрий Плахов
 

What's hot (20)

Introducing r3 corda™ a distributed ledger designed for financial services
Introducing r3 corda™  a distributed ledger designed for financial servicesIntroducing r3 corda™  a distributed ledger designed for financial services
Introducing r3 corda™ a distributed ledger designed for financial services
 
Blockchain explored
Blockchain explored Blockchain explored
Blockchain explored
 
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 -...
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
 
How to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumHow to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on Ethereum
 
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
 
Alternative Consensus & Enterprise Blockchain
Alternative Consensus & Enterprise BlockchainAlternative Consensus & Enterprise Blockchain
Alternative Consensus & Enterprise Blockchain
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus Algorithms
 
Banking on a Blockchain
Banking on a BlockchainBanking on a Blockchain
Banking on a Blockchain
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
 
EUIPO DPM knowledge share: Blockchain and IP
EUIPO DPM knowledge share: Blockchain and IPEUIPO DPM knowledge share: Blockchain and IP
EUIPO DPM knowledge share: Blockchain and IP
 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
 
Hyperledger fabric 3
Hyperledger fabric 3Hyperledger fabric 3
Hyperledger fabric 3
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN ExplosionMetadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
 
Understanding private blockchains
Understanding private blockchainsUnderstanding private blockchains
Understanding private blockchains
 
Build your first blockchain
Build your first blockchainBuild your first blockchain
Build your first blockchain
 
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
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
 

Similar to Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Research Zurich

Similar to Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Research Zurich (20)

Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
Structured approach to blockchain and consensus techniques
Structured approach to blockchain and consensus techniquesStructured approach to blockchain and consensus techniques
Structured approach to blockchain and consensus techniques
 
Blockchain meets database
Blockchain meets databaseBlockchain meets database
Blockchain meets database
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
 
20190606 blockchain101
20190606 blockchain10120190606 blockchain101
20190606 blockchain101
 
RSK (Rootstock) - Smarter Bitcoin
RSK (Rootstock) - Smarter BitcoinRSK (Rootstock) - Smarter Bitcoin
RSK (Rootstock) - Smarter Bitcoin
 
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain TransactionsHorizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slides
 
Introduction to Blockchain Technology
Introduction to Blockchain TechnologyIntroduction to Blockchain Technology
Introduction to Blockchain Technology
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain TransactionsHorizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2
 
Flowchain: A case study on building a Blockchain for the IoT
Flowchain: A case study on building a Blockchain for the IoTFlowchain: A case study on building a Blockchain for the IoT
Flowchain: A case study on building a Blockchain for the IoT
 
01 what is blockchain
01 what is blockchain01 what is blockchain
01 what is blockchain
 
Blockchain - a formal introduction
Blockchain - a formal introductionBlockchain - a formal introduction
Blockchain - a formal introduction
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challengesBlockchain overview, use cases, implementations and challenges
Blockchain overview, use cases, implementations and challenges
 
Introduction to Blockchain Web3 Session
Introduction to Blockchain Web3 SessionIntroduction to Blockchain Web3 Session
Introduction to Blockchain Web3 Session
 
Bitcoin and blockchain engineering
Bitcoin and blockchain engineeringBitcoin and blockchain engineering
Bitcoin and blockchain engineering
 

More from Romeo Kienzler

DeepLearning and Advanced Machine Learning on IoT
DeepLearning and Advanced Machine Learning on IoTDeepLearning and Advanced Machine Learning on IoT
DeepLearning and Advanced Machine Learning on IoT
Romeo Kienzler
 
TDWI_DW2014_SQLNoSQL_DBAAS
TDWI_DW2014_SQLNoSQL_DBAASTDWI_DW2014_SQLNoSQL_DBAAS
TDWI_DW2014_SQLNoSQL_DBAAS
Romeo Kienzler
 
The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...
The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...
The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...
Romeo Kienzler
 
DBaaS Bluemix Meetup DACH 26.8.14
DBaaS Bluemix Meetup DACH 26.8.14DBaaS Bluemix Meetup DACH 26.8.14
DBaaS Bluemix Meetup DACH 26.8.14
Romeo Kienzler
 
Cloudfoundry / Bluemix tutorials, compressed in 4 Hours
Cloudfoundry / Bluemix tutorials, compressed in 4 HoursCloudfoundry / Bluemix tutorials, compressed in 4 Hours
Cloudfoundry / Bluemix tutorials, compressed in 4 Hours
Romeo Kienzler
 

More from Romeo Kienzler (20)

Parallelization Stategies of DeepLearning Neural Network Training
Parallelization Stategies of DeepLearning Neural Network TrainingParallelization Stategies of DeepLearning Neural Network Training
Parallelization Stategies of DeepLearning Neural Network Training
 
Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Cognitive IoT using DeepLearning on data parallel frameworks like Spark & FlinkCognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
 
Love & Innovative technology presented by a technology pioneer and an AI expe...
Love & Innovative technology presented by a technology pioneer and an AI expe...Love & Innovative technology presented by a technology pioneer and an AI expe...
Love & Innovative technology presented by a technology pioneer and an AI expe...
 
Blockchain Technology Book Vernisage
Blockchain Technology Book VernisageBlockchain Technology Book Vernisage
Blockchain Technology Book Vernisage
 
IBM Middle East Data Science Connect 2016 - Doha, Qatar
IBM Middle East Data Science Connect 2016 - Doha, QatarIBM Middle East Data Science Connect 2016 - Doha, Qatar
IBM Middle East Data Science Connect 2016 - Doha, Qatar
 
Apache SystemML - Declarative Large-Scale Machine Learning
Apache SystemML - Declarative Large-Scale Machine LearningApache SystemML - Declarative Large-Scale Machine Learning
Apache SystemML - Declarative Large-Scale Machine Learning
 
Intro to DeepLearning4J on ApacheSpark SDS DL Workshop 16
Intro to DeepLearning4J on ApacheSpark SDS DL Workshop 16Intro to DeepLearning4J on ApacheSpark SDS DL Workshop 16
Intro to DeepLearning4J on ApacheSpark SDS DL Workshop 16
 
DeepLearning and Advanced Machine Learning on IoT
DeepLearning and Advanced Machine Learning on IoTDeepLearning and Advanced Machine Learning on IoT
DeepLearning and Advanced Machine Learning on IoT
 
Geo Python16 keynote
Geo Python16 keynoteGeo Python16 keynote
Geo Python16 keynote
 
Real-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor DataReal-time DeepLearning on IoT Sensor Data
Real-time DeepLearning on IoT Sensor Data
 
Cloud scale predictive DevOps automation using Apache Spark: Velocity in Amst...
Cloud scale predictive DevOps automation using Apache Spark: Velocity in Amst...Cloud scale predictive DevOps automation using Apache Spark: Velocity in Amst...
Cloud scale predictive DevOps automation using Apache Spark: Velocity in Amst...
 
Scala, Apache Spark, The PlayFramework and Docker in IBM Platform As A Service
Scala, Apache Spark, The PlayFramework and Docker in IBM Platform As A ServiceScala, Apache Spark, The PlayFramework and Docker in IBM Platform As A Service
Scala, Apache Spark, The PlayFramework and Docker in IBM Platform As A Service
 
IBM Watson Technical Deep Dive Swiss Group for Artificial Intelligence and Co...
IBM Watson Technical Deep Dive Swiss Group for Artificial Intelligence and Co...IBM Watson Technical Deep Dive Swiss Group for Artificial Intelligence and Co...
IBM Watson Technical Deep Dive Swiss Group for Artificial Intelligence and Co...
 
TDWI_DW2014_SQLNoSQL_DBAAS
TDWI_DW2014_SQLNoSQL_DBAASTDWI_DW2014_SQLNoSQL_DBAAS
TDWI_DW2014_SQLNoSQL_DBAAS
 
Cloudant Overview Bluemix Meetup from Lisa Neddam
Cloudant Overview Bluemix Meetup from Lisa NeddamCloudant Overview Bluemix Meetup from Lisa Neddam
Cloudant Overview Bluemix Meetup from Lisa Neddam
 
The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...
The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...
The European Conference on Software Architecture (ECSA) 14 - IBM BigData Refe...
 
DBaaS Bluemix Meetup DACH 26.8.14
DBaaS Bluemix Meetup DACH 26.8.14DBaaS Bluemix Meetup DACH 26.8.14
DBaaS Bluemix Meetup DACH 26.8.14
 
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichData Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
 
Cloud Databases, Developer Week Nuernberg 2014
Cloud Databases, Developer Week Nuernberg 2014Cloud Databases, Developer Week Nuernberg 2014
Cloud Databases, Developer Week Nuernberg 2014
 
Cloudfoundry / Bluemix tutorials, compressed in 4 Hours
Cloudfoundry / Bluemix tutorials, compressed in 4 HoursCloudfoundry / Bluemix tutorials, compressed in 4 Hours
Cloudfoundry / Bluemix tutorials, compressed in 4 Hours
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Research Zurich

  • 1. Architecture of the Hyperledger Blockchain Fabric Christian Cachin IBM Research – Zurich & many others at IBM, IBM Research, and Hyperledger November 2016
  • 2. 2 What is a blockchain?
  • 3. 3 A state machine § Functionality F – Operation o transforms a state s to new state s' and may generate a response r (s', r) ← F(s, o) § Validation condition – Operation needs to be valid, in current state, according to a predicate P() o s s' / r o s s' / r P(s,o) = TRUE
  • 4. 4 Blockchain state machine § Append-only log – Every operation o appends a "block" of valid transactions (tx) to the log § Log content is verifiable from the most recent element § Log entries form a hash chain ht ← Hash( [tx1, tx2, ... ] || ht-1 || t) . o s s'
  • 5. 5 Distributed p2p protocol to create a ledger o1 o2 o3 s0 s1 s2 s3 Nodes run a protocol to construct the ledger Nodes produce transactions
  • 6. 6 Blockchain protocol features § Only "valid" operations (transactions) are "executed" § Transactions can be simple – Bitcoin tx are statement of ownership for coins, digitally signed "This bitcoin now belongs to K2" signed by K1 § Transactions can be complex (smart contracts = arbitrary code) – Embody logic that responds to events (on blockchain) and may transfer assets in response – Auctions, elections, investment decisions, blackmail ...
  • 7. 7 Security and privacy § Transactional privacy – Anonymity or pseudonymity through cryptographic tools – Some is feasible today (e.g., anonymous credentials in IBM Identity Mixer) § Contract privacy – Distributed secure cryptographic computation on encrypted data § Accountability & non-repudiation – Identity and cryptographic signatures § Auditability & transparency – Cryptographic hash chain § Many of these need advanced cryptographic protocols
  • 9. 9 Decentralized – Nakamoto consensus/Bitcoin § Nodes prepare blocks – List of transactions (tx) – All tx valid § Lottery race – Solves a hard puzzle – Selects a random winner/leader – Winner's operation/ block is executed and "mines" a coin § All nodes verify and validate new block – "Longest" chain wins
  • 10. 10 Decentralized = permissionless § Survives censorship and suppression – No central entity § Nakamoto consensus requires proof-of-work (PoW) – Original intent: one CPU, one vote – Majority of hashing power controls network – Gives economic incentive to participate (solution to PoW is a newly "mined" Bitcoin) § Today, total hashing work consumes a lot of electricity – Estimates vary, 250-500MW, from a major city to a small country ... § Protocol features – Stability is a tradeoff between dissemination of new block (10s-20s) and mining rate (new block on average every 10min) – Decisions are not final ("wait until chain is 6 blocks longer before a tx is confirmed")
  • 11. 11 Consortium consensus (BFT, Hyperledger) § Designated set of homogeneous validator nodes § BFT/Byzantine agreement – Tolerates f-out-of-n faulty/ adversarial nodes – Generalized quorums § Tx sent to consensus nodes § Consensus validates tx, decides, and disseminates result
  • 12. 12 Consortium consensus = permissioned § Central entity controls group membership – Dynamic membership changes in protocol – Membership may be decided inline, by protocol itself § Features – BFT and consensus are very-well understood problems ● Clear assumptions and top-down design ● 700 protocols and counting [AGK+15] ● Textbooks [CGR11] ● Open-source implementations (BFT-SMaRT) – Many systems already provide crash tolerant consensus (Chubby, Zookeeper, etcd ...) – Requires Ω(n2) communication (OK for 10-100 nodes, not > 1000s) § Revival of research in BFT protocols – Focus on scalability and communication efficiency
  • 13. 13 Consortium consensus – under development § Hyperledger fabric (originated from IBM's contribution to Hyperledger) – Includes PBFT protocol [CL02] § Tendermint and others § HoneyBadgerBFT [MXC+16] – Revisits practical randomized BFT [CKPS01], including amoritzation § Many existing BFT libraries predate blockchain – BFT-SMaRT, Univ. Lisbon (github.com/bft-smart/library) – Prime, Johns Hopkins Univ. (www.dsn.jhu.edu/byzrep/prime.html)
  • 14. 14 More variations of consensus § Bitcoin-NG [EGS+16] – Bitcoin PoW elects a leader, it is responsible for ordering the next K tx § Proof-of-stake (explored by Ethereum) – Voting power relative to asset holdings (through cryptocurrency held by blockchain) § Hybrid PoW (PeerCensus [DSW16]) – PoW protocol to elect nodes in one consensus group – Group runs ordinary BFT consensus § Hierarchical & partitioned, randomized [LNB+15] – Random sub-groups, nodes and tx assigned randomly to sub-groups – Each sub-group runs ordinary BFT consensus
  • 15. 15 Scalability–performance tradeoff M. Vukolic: The Quest for Scalable Blockchain Fabric: Proof-of-Work vs. BFT Replication. Proc. iNetSeC 2015, LNCS 9591.
  • 17. 17 Hyperledger Project § Open-source collaboration under Linux Foundation – www.hyperledger.org – Hyperledger unites industry leaders to advance blockchain technology (Dec. '15) – 50+ members in July '16 § Develops an enterprise-grade, open source distributed ledger framework § Code contributions from several members § IBM's contribution – github.com/hyperledger/fabric/ – Security architecture and consensus protocols from IBM Research - Zurich
  • 18. 18
  • 19. 19 Hyperledger fabric § Enterprise-grade blockchain fabric and distributed ledger framework – A blockchain implementation in the Hyperledger Project § Developed open-source, by IBM and others (DAH, LSEG ...) – github.com/hyperledger/fabric – Initially called 'openblockchain' – Donated by IBM to Hyperledger project – Actively developed § Technical details – Implemented in GO – Runs smart contracts ("chaincode") within Docker containers – Implements consortium blockchain using BFT consensus
  • 21. 21 Hyperledger fabric details (v0.6-preview) / 1 § Platform-agnostic – GO, gRPC over HTTP/2 § Peers – Validating peers (all running consensus) and non-validating peers § Transactions – Deploy new chaincode / Invoke an operation / Read state – Chaincode is arbitrary GO program running in a Docker container § State is a key-value store (RocksDB) – Put, get ... no other state must be held in chaincode – Non-validating peers store state and execute transactions
  • 22. 22 Hyperledger fabric details / 2 § Consensus in BFT model – Modular architecture supports other consensus protocols – Currently, PBFT [CL02] – Non-determinism addressed by Sieve protocol [CSV16] – Static membership in consensus group § Hash chain computed over state and transactions
  • 23. 23 Hyperledger fabric details / 3 § Membership service issues certificates to peers – Enrollment certificates (E-Cert, issued by E-CA) ● Assign identity to node, gives permission to join and issue transactions – Transaction certificates (T-Cert, issued by T-CA) ● Capability to issue one transaction (or more) ● Unlinkable to enrollment certificate, for anyone except for transaction CA § Pseudonymous transaction authorization – Controlled by peer, how many Transaction-Signatures with same T-Cert
  • 24. 24 Non-determinism in BFT replication [CSV16] § Service-replication paradigm needs deterministic operations – Agree on order of operations, then every node executes § What if application is given as black-box? Deterministic? ... undecidable! § Our approach – filter out inadvertent non-determinism – Execute operation, compare results, and revert it if "too much" divergence is evident – When "enough" nodes arrive at the same result, accept it § If application is randomized – For algorithmic purpose (Monte Carlo): use master-slave approach – For cryptography and security functions: cryptographic verifiable random functions (VRF)
  • 25. 25 Towards Hyperledger fabric v1.0 § Separate the functions of nodes into endorsers and consensus nodes – Every chaincode may have different endorsers – Endorsers have state, run tx, and validate tx for their chaincode – Consensus nodes order already-validated tx § Scales better, computation effort can be distributed § Permits confidential state on blockchain (seen only by endorsers)
  • 26. 26 Separation of endorsement from consensus § Validation is by chaincode § Dedicated endorsers per chaincode § Consensus service – Only communication – Pub/sub messaging – Ordering for endorsed tx § State and hash chain are common – State may be encrypted Consensus service only orders tx Per-chaincode endorsers
  • 28. 28 Conclusion § Blockchain combines many interesting techniques – Distributed computing for consensus – Cryptography for integrity, privacy, anonymity § Blockchain = Distributing trust over the Internet § Hyperledger Fabric – Open-source platform for permissioned ledger (so far, consortium consensus) – GO, gRPC, HTTP/2, Docker, RocksDB ... – Modular consensus (PBFT so far) – Pseudonymous authorization
  • 29. 29 References www.hyperledger.org github.com/hyperledger/fabric hyperledger-fabric.readthedocs.io/ [AGK+15] P.-L. Aublin, R. Guerraoui, N. Knezevic, V. Quéma, M. Vukolic: The Next 700 BFT Protocols. ACM TOCS, 32(4), 2015. [BCG+14] E. Ben-Sasson, A. Chiesa, C. Garman, M. Green, I. Miers, E. Tromer, M. Virza: Zerocash: Decentralized Anonymous Payments from Bitcoin. IEEE S&P 2014. [CKPS01] C. Cachin, K. Kursawe, F. Petzold, V. Shoup: Secure and Efficient Asynchronous Broadcast Protocols. CRYPTO 2001. [CGR11] C. Cachin, R. Guerraoui, L. Rodrigues: Introduction to Reliable and Secure Distributed Programming (2. ed.). Springer, 2011. [CSV16] C. Cachin, S. Schubert, M. Vukolic: Non-determinism in Byzantine Fault-Tolerant Replication. OPODIS 2016.
  • 30. 30 References [CL02] M. Castro, B. Liskov: Practical Byzantine fault tolerance and proactive recovery. ACM TOCS, 20(4), 2002. [DSW16] C. Decker, J. Seidel, R. Wattenhofer: Bitcoin meets strong consistency. ICDCN 2016. [EGS+16] I. Eyal, A. Gencer, E.G. Sirer, R. van Renesse: Bitcoin-NG: A Scalable Blockchain Protocol. NSDI 2016. [KMS+16] A. Kosba, A. Miller, E. Shi, Z. Wen, C. Papamanthou: Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts. IEEE S&P 2016. [LNB+15] L. Luu, V. Narayanan, K. Baweja, C. Zheng, S. Gilbert, P. Saxena: A Secure Sharding Protocol For Open Blockchains. ACM CCS 2016. [MR98] D. Malkhi, M. Reiter: Byzantine Quorum Systems. Distributed Computing, 1998. [MXC+16] A. Miller, Y. Xia, K. Croman, E. Shi, D. Song: The Honey Badger of BFT Protocols. ACM CCS 2016. [V16] M. Vukolic: The Quest for Scalable Blockchain Fabric: Proof-of-Work vs. BFT Replication. LNCS 9591, Proc. iNetSeC 2015.