SlideShare a Scribd company logo
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

PPTX
Hyperledger Fabric
PDF
ただしくHTTPSを設定しよう!
 
PPTX
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
PDF
HyperLedger Fabric V2.5.pdf
PPTX
Get Hands-On with NGINX and QUIC+HTTP/3
PDF
君にもできる! にゅーとろん君になってみよー!! 「Neutronになって理解するOpenStack Net - OpenStack最新情報セミナー ...
PDF
WebRTC on Mobile
PDF
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...
Hyperledger Fabric
ただしくHTTPSを設定しよう!
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
HyperLedger Fabric V2.5.pdf
Get Hands-On with NGINX and QUIC+HTTP/3
君にもできる! にゅーとろん君になってみよー!! 「Neutronになって理解するOpenStack Net - OpenStack最新情報セミナー ...
WebRTC on Mobile
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...

What's hot (20)

PDF
Kubernetes Summit 2023: Head First Kubernetes
PDF
Introduction to FreeSWITCH
PDF
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
PPTX
Git in 10 minutes
PDF
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
PDF
How to run P4 BMv2
PDF
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
PDF
Hyperledger Fabric のプラットフォームおよびインフラ運用
PDF
KFServing - Serverless Model Inferencing
PDF
Knative, Serverless on Kubernetes, and Openshift
PDF
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
PDF
Automated CloudStack Deployment
PDF
Flow Base Programming with Node-RED and Functional Reactive Programming with ...
PPTX
VPP事始め
PDF
Smart contracts & dApps
PDF
データベース屋がHyperledger Fabricを検証してみた
PDF
OSC2011 Tokyo/Fall 濃いバナ(virtio)
PDF
How To Start A Career In The NFT Space?
PDF
Exploring the power of OpenTelemetry on Kubernetes
PDF
Virtualized network with openvswitch
Kubernetes Summit 2023: Head First Kubernetes
Introduction to FreeSWITCH
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
Git in 10 minutes
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
How to run P4 BMv2
SR-IOV Networking in OpenStack - OpenStack最新情報セミナー 2016年3月
Hyperledger Fabric のプラットフォームおよびインフラ運用
KFServing - Serverless Model Inferencing
Knative, Serverless on Kubernetes, and Openshift
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Automated CloudStack Deployment
Flow Base Programming with Node-RED and Functional Reactive Programming with ...
VPP事始め
Smart contracts & dApps
データベース屋がHyperledger Fabricを検証してみた
OSC2011 Tokyo/Fall 濃いバナ(virtio)
How To Start A Career In The NFT Space?
Exploring the power of OpenTelemetry on Kubernetes
Virtualized network with openvswitch
Ad

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

PPTX
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
PDF
Bitcoin Blockchain - Under the Hood
PPTX
Structured approach to blockchain and consensus techniques
PDF
Blockchain meets database
PDF
On Private Blockchains, Technically
PPTX
Blockchain Blockchain Blockchain Lec 1.pptx
PPTX
20190606 blockchain101
PDF
RSK (Rootstock) - Smarter Bitcoin
PDF
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
ODP
Fredericksburg LUG Bitcoin slides
PPTX
Introduction to Blockchain Technology
PDF
Introduction to Bitcoin for programmers
PDF
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
PDF
Bitcoin for programmers - part 1 version 2
PPTX
UNIT 1 (1).pptx of block chain technologies
PDF
Flowchain: A case study on building a Blockchain for the IoT
PPTX
01 what is blockchain
PDF
Blockchain - a formal introduction
PDF
This presentation detail concepts of cryptocurrency
PPTX
Blockchain
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
Bitcoin Blockchain - Under the Hood
Structured approach to blockchain and consensus techniques
Blockchain meets database
On Private Blockchains, Technically
Blockchain Blockchain Blockchain Lec 1.pptx
20190606 blockchain101
RSK (Rootstock) - Smarter Bitcoin
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Fredericksburg LUG Bitcoin slides
Introduction to Blockchain Technology
Introduction to Bitcoin for programmers
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Bitcoin for programmers - part 1 version 2
UNIT 1 (1).pptx of block chain technologies
Flowchain: A case study on building a Blockchain for the IoT
01 what is blockchain
Blockchain - a formal introduction
This presentation detail concepts of cryptocurrency
Blockchain
Ad

More from Romeo Kienzler (20)

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

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
Building Integrated photovoltaic BIPV_UPV.pdf
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

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.