SlideShare ist ein Scribd-Unternehmen logo
1 von 20
HYPERLEDGER
CONSENSUS
ALGORITHMS
Mabel Oza
Byzantine General’s Problem - 1982
Enemy City
Attack
Retreat
NOT!
Let’s
attack!
How does this relate to Blockchain?
Byzantine problem highlights the troubles of dealing
with a system filled with independent and
untrustworthy nodes that need to collaborate
together and come up with a…
Consensus
Where that leads us today?
Most blockchain systems are filled with malicious and faulty participants. How does it work?
Algorithms that aim to solve the Bzyantine’s General Problem, BFT (Byzantine FaultTolerant) consensus algorithms
*Not all blockchains systems use BFT consensus algorithms, just most of them in Hyperledger do
Consensus: Used to find agreement on the order and to validate the correctness of the transaction
Consensus Algorithms: Tells the system what to do to achieve consensus
• Tells us what steps will be needed to take place
• Ex. Proof of Stake
Consensus Protocols: Set of rules that determines how the system achieve consensus
• Tells us how the algorithm will be used
• Ex. Casper in Proof of Stake
1980 – 2000 (Internet) 2001 – 2015 (Distributed Systems) 2016 –Today (Blockchain)
Finding the Right Consensus
Consensus Goals
Basics in Evaluating a Consensus for your Project
1. How would you rank the following qualities?What are your tradeoffs?
• Speed, scalability, and trust
2. What solution are you replacing?What was the existing technology stack?
3. What type of blockchain are you going to use? Permissionless, Permissioned, Federation/Consortium
Liveness (Will it Deliver) Each non-faulty node will eventually receive every submitted transaction,
assuming communication doesn't fail
Safety (Consistency) Same results for same input, no two processes will decide differently
There isn’t one solution that fits all
Type of Blockchain Description Example
Blockchain Projects
Types of Consensus Used
Permissionless or Public Anyone can participate, so we
don’t know anything about the
nodes (generals) involved nor
have any control over their actions
Bitcoin
Ethereum
Proof ofWork
Proof of Stake
Federated or Consortium Chosen parties can only
participate, so know something
about the nodes (generals)
involved but we still can’t
influence their actions
R3 – Corda
EWF (EnergyWeb
Foundation)
Byzantine FaultTolerance
(BFT)
Permissioned Chosen parties can only
participate, so know something
about the nodes (generals)
involved but we still can influence
their actions
Projects that involve
sharing employee
information across a
large organization
Byzantine FaultTolerance
(BFT)
The Foundation: Practical Byzantine Fault
Tolerance (PBFT)
• Inspired several consensus algorithms, RBFT, dBFT, Plenum, etc.
• Provides liveness & safety as long as less than (n-1)/3 of the machines aren’t faulty
• Primary indicates to the other replicas the order to process requests
• Nodes can’t freely join or leave, so it’s not perfect for open blockchain
• All the nodes that aren’t participating in the pre-prepare phase are the faulty nodes
• How does it work?
1. Client sends a request to invoke a service operation to the primary (general)
2. The primary multicasts requests to replicas (other generals)
3. Replicas execute the request and send the reply to the client
4. Client waits for f + 1, f being # of faulty replicas, to reply with the same results
Primary
Faulty Replica
Client
The Foundation: PBFT – Phase 1: Pre-Prepare
Client
Sends REQUEST:{Operation to
perform, time stamp, client}
Using P2P messaging*
Assigns a sequence #
(Specifies the order)
Appends to the log
Primary
Sends PRE-PREPARE:{view*,
sequence #, message digest*}
to replicas
Replica 1 Replica 2 (f) Replica 3
*P2P Messaging: Messages can only be consumed
1 consumer
*View: Succession of configurations replicas move
through, each view has a primary replica and the
rest are backups
*Message Digest: the encrypted message
*Must be between h & H to prevent primary from
exhausting space of sequence # by selecting large
ones
The Foundation: PBFT – Phase 2: Prepare
Replica 1 Replica 2 (f) Replica 3
Replicas accept pre-prepare message if:
- Signature in request and pre-prepare message are correct
- It’s in the same view
- It hasn’t accepted message with the same view and sequence #
- Sequence # is between h and H* (Does the sequence # make sense?)
Waiting for
2f prepare
messages
Sends PREPARE:{message, view*,
sequence #, replica id} to each other
Appends messages
to the log
*P2P Messaging: Messages can only be consumed
1 consumer
*View: Succession of configurations replicas move
through, each view has a primary replica and the
rest are backups
*Message Digest: the encrypted message
*Must be between h & H to prevent primary from
exhausting space of sequence # by selecting large
ones
The Foundation: PBFT – Phase 3: Commit
Replica 1
SendsCOMMIT: {view*,
sequence #, message digest,
replica id} to each other
Replica 2 (f) Replica 3 Replica 0
Appends
messages to the
log
Each executes the
operations
requested,
ensures safety
Client
All replicas send a
digest of the results
and one replica sends
the actual request
*P2P Messaging: Messages can only be consumed
1 consumer
*View: Succession of configurations replicas move
through, each view has a primary replica and the
rest are backups
*Message Digest: the encrypted message
*Must be between h & H to prevent primary from
exhausting space of sequence # by selecting large
ones
Blockchain & Hyperledger Consensus
Redundant Byzantine FaultTolerance
(RBFT)
 Redundant (multiple) instances of a BFT protocol executed in parallel
 What if the primary in PBFT is malicious?
 They need to be accountable
 All instances order the request, but only the master orders are executed
 Every master has a replacement (backup) keeping them in check
 Performance for every master is closely monitored and compared to its backup
 Client requests go to all nodes, when a node receives 2f + 1 copies of the client request it knows that every correct
node will eventually receive the request
Latency X
Scalability X X
Trust X X X
Secure
Backup
Master
Confirming
Request
Plenum
 Based off of RBFT (Redundant Byzantine FaultTolerance)
 Used for Indy, Hyperledger’s identity management blockchain platform
 Difference between RBFT & Plenum:
RBFT Plenum
Communicates using MAC (Message
Authentication Code), fast and less
computationally expensive
Communicates usingCurve25519 (Elliptic
Curve Digital SignatureAlg.), highly secure
All nodes should receive the request Only faulty # of nodes + 1 should receive the
request
Implementation decides on the primary
election process
Provides a deterministic and non-
deterministic election process
Implementation decides on blacklisting
strategies
Provides blacklisting strategies
Each replica communicates its message in to
each other in a Point 2 Point fashion
Replicas can gossip their message
Latency X X
Scalability X X X
Trust X X X
Secure
Apache Kafka
• Publishing and Subscriber message queue architected as a distribution log
• It is crash fault tolerant but not Byzantine FaultTolerant, so we must trust all parties
• Used for Fabric, foundational blockchain framework and a plug and play implementation
• Has 3 phases endorsement, ordering and validation
• Follows an execute, order, validate, update state approach versus a traditional order,
execute, update state so transactions don’t have to execute sequentially
Latency X X X
Scalability X X
Trust X
Easy to Use
Kafka
Cluster
B-Chain & Sumeragi
• There’s an A team (2f + 1 replicas) and a B team (the other replicas), the A
team confirms the transaction and B team peers are the bench warmers
• Voting based consensus
• Self recovering, chain-based BFT protocol, where the replicas are
organized in a chain
• Used for Iroha, C++ mobile friendly blockchain platform
• The order of processing A verifies the transaction and orders it into the
queue nodes is determined by Hijiri, server’s reliability
• How does it work?
1) Client sends transaction
2) Leader validation peer signs it and broadcasts it other A replicas
3) A replicas validate the signature(s) and contents of transaction
4) Commits it to A & B after receiving 2f + 1 signs from A
5) Updates the merkle root of the global state
6) Broadcast an ordered list of transactions
7) Valid parts of the merkle tree are shared until the roots match,
when nodes are synced with each other
Latency X X X
Scalability X
Trust X
Mobile Friendly
Proof of ElapsedTime (PoET)
• Lottery based consensus
• Hardware based
• Used in Sawtooth Lake, a blockchain platform that can
accommodate several validators with minimal resource
consumption
• Uses aTEE (Trusted Execution Environment), i.e. Intel SGX
• App code can only be put into the enclave through an SDK
• How does it work?
1) Every validator requests a wait time from an enclave a
(trusted function)
• Validator with the shortest time wins, they’re chosen as the
leader
2) Enclave provides them with a timer
3) Enclave checks the timer, to see if they waited their
specified time, and if they did they can claim leadership Latency X
Scalability X XX
Trust X
Scalable
Opportunities
Evaluating consensus algorithms and finding the right ones to fulfill business needs
Managing Consensus algorithms, how do we know it’s doing it’s job?
Experiences and takeaways from working with these algorithms
Questions?
Appendix

Weitere ähnliche Inhalte

Was ist angesagt?

Distributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible PossibleDistributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible PossibleC4Media
 
Overview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsOverview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsJohannes Ahlmann
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisZak Cole
 
Hyperledger Fabric Architecture
Hyperledger Fabric ArchitectureHyperledger Fabric Architecture
Hyperledger Fabric Architecture상문 오
 
Blockchain Explored: A technical deep-dive
Blockchain Explored: A technical deep-diveBlockchain Explored: A technical deep-dive
Blockchain Explored: A technical deep-diveBinh Nguyen
 
Introduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectIntroduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectManuel Garcia
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and ToolsRihusoft
 
Introduction to Consensus techniques
Introduction to Consensus techniques Introduction to Consensus techniques
Introduction to Consensus techniques Vasiliy Suvorov
 
Getting started with quorum -101
Getting started with quorum -101  Getting started with quorum -101
Getting started with quorum -101 Chainstack
 
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 IPAudrius Ramoska
 
How to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with ChainstackHow to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with ChainstackChainstack
 
How do private transactions work on Quorum
How do private transactions work on QuorumHow do private transactions work on Quorum
How do private transactions work on QuorumChainstack
 
Front-End Development for dApps on Tezos
Front-End Development for dApps on TezosFront-End Development for dApps on Tezos
Front-End Development for dApps on TezosNeven6
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning NetworkShun Shiku
 
Technical Overview of Tezos
Technical Overview of TezosTechnical Overview of Tezos
Technical Overview of TezosTinaBregovi
 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Arnaud Le Hors
 

Was ist angesagt? (20)

Distributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible PossibleDistributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible Possible
 
Overview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsOverview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus Mechanisms
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & Analysis
 
Hyperledger Fabric Architecture
Hyperledger Fabric ArchitectureHyperledger Fabric Architecture
Hyperledger Fabric Architecture
 
Blockchain Explored: A technical deep-dive
Blockchain Explored: A technical deep-diveBlockchain Explored: A technical deep-dive
Blockchain Explored: A technical deep-dive
 
Introduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectIntroduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger Project
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain Introduction
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
 
Introduction to Consensus techniques
Introduction to Consensus techniques Introduction to Consensus techniques
Introduction to Consensus techniques
 
Getting started with quorum -101
Getting started with quorum -101  Getting started with quorum -101
Getting started with quorum -101
 
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
 
Hyperledger introduction
Hyperledger introductionHyperledger introduction
Hyperledger introduction
 
How to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with ChainstackHow to Build Your Blockchain Project with Chainstack
How to Build Your Blockchain Project with Chainstack
 
How do private transactions work on Quorum
How do private transactions work on QuorumHow do private transactions work on Quorum
How do private transactions work on Quorum
 
Front-End Development for dApps on Tezos
Front-End Development for dApps on TezosFront-End Development for dApps on Tezos
Front-End Development for dApps on Tezos
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
Hyperledger fabric
Hyperledger fabricHyperledger fabric
Hyperledger fabric
 
Technical Overview of Tezos
Technical Overview of TezosTechnical Overview of Tezos
Technical Overview of Tezos
 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618
 

Ähnlich wie Hyperledger Consensus Algorithms

Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications malikmayank
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsAya Mahmoud
 
Linux Inter Process Communication
Linux Inter Process CommunicationLinux Inter Process Communication
Linux Inter Process CommunicationAbhishek Sagar
 
unit3consesence.pptx
unit3consesence.pptxunit3consesence.pptx
unit3consesence.pptxGopalSB
 
Message queues
Message queuesMessage queues
Message queuesMax Bodnar
 
Beyond Off the-Shelf Consensus
Beyond Off the-Shelf ConsensusBeyond Off the-Shelf Consensus
Beyond Off the-Shelf ConsensusRebecca Bilbro
 
Network protocols
Network protocolsNetwork protocols
Network protocolsAbiud Orina
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3farshad33
 
UNIT IV DIS.pptx
UNIT IV DIS.pptxUNIT IV DIS.pptx
UNIT IV DIS.pptxSamPrem3
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2DBU
 
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 techniquesVasiliy Suvorov
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systemsSri Prasanna
 
OSI reference model
OSI reference modelOSI reference model
OSI reference modelshanthishyam
 

Ähnlich wie Hyperledger Consensus Algorithms (20)

FastBFT
FastBFTFastBFT
FastBFT
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
 
Cheapbft
Cheapbft Cheapbft
Cheapbft
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Linux Inter Process Communication
Linux Inter Process CommunicationLinux Inter Process Communication
Linux Inter Process Communication
 
unit3consesence.pptx
unit3consesence.pptxunit3consesence.pptx
unit3consesence.pptx
 
Message queues
Message queuesMessage queues
Message queues
 
Beyond Off the-Shelf Consensus
Beyond Off the-Shelf ConsensusBeyond Off the-Shelf Consensus
Beyond Off the-Shelf Consensus
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
UNIT IV DIS.pptx
UNIT IV DIS.pptxUNIT IV DIS.pptx
UNIT IV DIS.pptx
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
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
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
 
OSI reference model
OSI reference modelOSI reference model
OSI reference model
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Hyperledger Consensus Algorithms

  • 2. Byzantine General’s Problem - 1982 Enemy City Attack Retreat NOT! Let’s attack!
  • 3. How does this relate to Blockchain? Byzantine problem highlights the troubles of dealing with a system filled with independent and untrustworthy nodes that need to collaborate together and come up with a…
  • 5. Where that leads us today? Most blockchain systems are filled with malicious and faulty participants. How does it work? Algorithms that aim to solve the Bzyantine’s General Problem, BFT (Byzantine FaultTolerant) consensus algorithms *Not all blockchains systems use BFT consensus algorithms, just most of them in Hyperledger do Consensus: Used to find agreement on the order and to validate the correctness of the transaction Consensus Algorithms: Tells the system what to do to achieve consensus • Tells us what steps will be needed to take place • Ex. Proof of Stake Consensus Protocols: Set of rules that determines how the system achieve consensus • Tells us how the algorithm will be used • Ex. Casper in Proof of Stake 1980 – 2000 (Internet) 2001 – 2015 (Distributed Systems) 2016 –Today (Blockchain)
  • 6. Finding the Right Consensus Consensus Goals Basics in Evaluating a Consensus for your Project 1. How would you rank the following qualities?What are your tradeoffs? • Speed, scalability, and trust 2. What solution are you replacing?What was the existing technology stack? 3. What type of blockchain are you going to use? Permissionless, Permissioned, Federation/Consortium Liveness (Will it Deliver) Each non-faulty node will eventually receive every submitted transaction, assuming communication doesn't fail Safety (Consistency) Same results for same input, no two processes will decide differently
  • 7. There isn’t one solution that fits all Type of Blockchain Description Example Blockchain Projects Types of Consensus Used Permissionless or Public Anyone can participate, so we don’t know anything about the nodes (generals) involved nor have any control over their actions Bitcoin Ethereum Proof ofWork Proof of Stake Federated or Consortium Chosen parties can only participate, so know something about the nodes (generals) involved but we still can’t influence their actions R3 – Corda EWF (EnergyWeb Foundation) Byzantine FaultTolerance (BFT) Permissioned Chosen parties can only participate, so know something about the nodes (generals) involved but we still can influence their actions Projects that involve sharing employee information across a large organization Byzantine FaultTolerance (BFT)
  • 8. The Foundation: Practical Byzantine Fault Tolerance (PBFT) • Inspired several consensus algorithms, RBFT, dBFT, Plenum, etc. • Provides liveness & safety as long as less than (n-1)/3 of the machines aren’t faulty • Primary indicates to the other replicas the order to process requests • Nodes can’t freely join or leave, so it’s not perfect for open blockchain • All the nodes that aren’t participating in the pre-prepare phase are the faulty nodes • How does it work? 1. Client sends a request to invoke a service operation to the primary (general) 2. The primary multicasts requests to replicas (other generals) 3. Replicas execute the request and send the reply to the client 4. Client waits for f + 1, f being # of faulty replicas, to reply with the same results Primary Faulty Replica Client
  • 9. The Foundation: PBFT – Phase 1: Pre-Prepare Client Sends REQUEST:{Operation to perform, time stamp, client} Using P2P messaging* Assigns a sequence # (Specifies the order) Appends to the log Primary Sends PRE-PREPARE:{view*, sequence #, message digest*} to replicas Replica 1 Replica 2 (f) Replica 3 *P2P Messaging: Messages can only be consumed 1 consumer *View: Succession of configurations replicas move through, each view has a primary replica and the rest are backups *Message Digest: the encrypted message *Must be between h & H to prevent primary from exhausting space of sequence # by selecting large ones
  • 10. The Foundation: PBFT – Phase 2: Prepare Replica 1 Replica 2 (f) Replica 3 Replicas accept pre-prepare message if: - Signature in request and pre-prepare message are correct - It’s in the same view - It hasn’t accepted message with the same view and sequence # - Sequence # is between h and H* (Does the sequence # make sense?) Waiting for 2f prepare messages Sends PREPARE:{message, view*, sequence #, replica id} to each other Appends messages to the log *P2P Messaging: Messages can only be consumed 1 consumer *View: Succession of configurations replicas move through, each view has a primary replica and the rest are backups *Message Digest: the encrypted message *Must be between h & H to prevent primary from exhausting space of sequence # by selecting large ones
  • 11. The Foundation: PBFT – Phase 3: Commit Replica 1 SendsCOMMIT: {view*, sequence #, message digest, replica id} to each other Replica 2 (f) Replica 3 Replica 0 Appends messages to the log Each executes the operations requested, ensures safety Client All replicas send a digest of the results and one replica sends the actual request *P2P Messaging: Messages can only be consumed 1 consumer *View: Succession of configurations replicas move through, each view has a primary replica and the rest are backups *Message Digest: the encrypted message *Must be between h & H to prevent primary from exhausting space of sequence # by selecting large ones
  • 13. Redundant Byzantine FaultTolerance (RBFT)  Redundant (multiple) instances of a BFT protocol executed in parallel  What if the primary in PBFT is malicious?  They need to be accountable  All instances order the request, but only the master orders are executed  Every master has a replacement (backup) keeping them in check  Performance for every master is closely monitored and compared to its backup  Client requests go to all nodes, when a node receives 2f + 1 copies of the client request it knows that every correct node will eventually receive the request Latency X Scalability X X Trust X X X Secure Backup Master Confirming Request
  • 14. Plenum  Based off of RBFT (Redundant Byzantine FaultTolerance)  Used for Indy, Hyperledger’s identity management blockchain platform  Difference between RBFT & Plenum: RBFT Plenum Communicates using MAC (Message Authentication Code), fast and less computationally expensive Communicates usingCurve25519 (Elliptic Curve Digital SignatureAlg.), highly secure All nodes should receive the request Only faulty # of nodes + 1 should receive the request Implementation decides on the primary election process Provides a deterministic and non- deterministic election process Implementation decides on blacklisting strategies Provides blacklisting strategies Each replica communicates its message in to each other in a Point 2 Point fashion Replicas can gossip their message Latency X X Scalability X X X Trust X X X Secure
  • 15. Apache Kafka • Publishing and Subscriber message queue architected as a distribution log • It is crash fault tolerant but not Byzantine FaultTolerant, so we must trust all parties • Used for Fabric, foundational blockchain framework and a plug and play implementation • Has 3 phases endorsement, ordering and validation • Follows an execute, order, validate, update state approach versus a traditional order, execute, update state so transactions don’t have to execute sequentially Latency X X X Scalability X X Trust X Easy to Use Kafka Cluster
  • 16. B-Chain & Sumeragi • There’s an A team (2f + 1 replicas) and a B team (the other replicas), the A team confirms the transaction and B team peers are the bench warmers • Voting based consensus • Self recovering, chain-based BFT protocol, where the replicas are organized in a chain • Used for Iroha, C++ mobile friendly blockchain platform • The order of processing A verifies the transaction and orders it into the queue nodes is determined by Hijiri, server’s reliability • How does it work? 1) Client sends transaction 2) Leader validation peer signs it and broadcasts it other A replicas 3) A replicas validate the signature(s) and contents of transaction 4) Commits it to A & B after receiving 2f + 1 signs from A 5) Updates the merkle root of the global state 6) Broadcast an ordered list of transactions 7) Valid parts of the merkle tree are shared until the roots match, when nodes are synced with each other Latency X X X Scalability X Trust X Mobile Friendly
  • 17. Proof of ElapsedTime (PoET) • Lottery based consensus • Hardware based • Used in Sawtooth Lake, a blockchain platform that can accommodate several validators with minimal resource consumption • Uses aTEE (Trusted Execution Environment), i.e. Intel SGX • App code can only be put into the enclave through an SDK • How does it work? 1) Every validator requests a wait time from an enclave a (trusted function) • Validator with the shortest time wins, they’re chosen as the leader 2) Enclave provides them with a timer 3) Enclave checks the timer, to see if they waited their specified time, and if they did they can claim leadership Latency X Scalability X XX Trust X Scalable
  • 18. Opportunities Evaluating consensus algorithms and finding the right ones to fulfill business needs Managing Consensus algorithms, how do we know it’s doing it’s job? Experiences and takeaways from working with these algorithms

Hinweis der Redaktion

  1. Introduced in 1982 in a paper by Lamport, Shostak
  2. Byzantine General’s Problem - 1982 Practical Byzantine Fault Tolerance - 1999 Proof of Work (Bitcoin) – 2009 Apache Kafka - 2011 Redundant Byzantine Fault Tolerance – 2013 B-Chain 2014 Blockchain’s Popularity Exploded 2016 Proof of Stake – 2016
  3. By Barbara Liskov and Miguel Castro in 1999 Accepting client requests and ordering them isn’t separated, making it vunerable to DoS attacks by the client *DoS attacks = Denial of Service attacks where you flood the system to prevent legitimate users from entering
  4. By Barbara Liskov and Miguel Castro in 1999 a malicious client can trigger view changes at will that will stop the progression of the protocol. Second, from an implementation point of view it does not separate the logic of accepting client requests and ordering them, which leads to possible DoS attacks from the client. Third, a malicious primary can order requests at an arbitrary speed without being detected. Pre-Prepare and prepare are used to order requests *They’re done in the same view, even though the primary is faulty Prepare and commit ensure that requests are ordered across all views Accepting client requests and ordering them isn’t separated, making it vunerable to DoS attacks by the client *DoS attacks = Denial of Service attacks where you flood the system to prevent legitimate users from entering
  5. By Barbara Liskov and Miguel Castro in 1999 a malicious client can trigger view changes at will that will stop the progression of the protocol. Second, from an implementation point of view it does not separate the logic of accepting client requests and ordering them, which leads to possible DoS attacks from the client. Third, a malicious primary can order requests at an arbitrary speed without being detected. Pre-Prepare and prepare are used to order requests *They’re done in the same view, even though the primary is faulty Prepare and commit ensure that requests are ordered across all views Accepting client requests and ordering them isn’t separated, making it vunerable to DoS attacks by the client *DoS attacks = Denial of Service attacks where you flood the system to prevent legitimate users from entering
  6. By Barbara Liskov and Miguel Castro in 1999 a malicious client can trigger view changes at will that will stop the progression of the protocol. Second, from an implementation point of view it does not separate the logic of accepting client requests and ordering them, which leads to possible DoS attacks from the client. Third, a malicious primary can order requests at an arbitrary speed without being detected. Pre-Prepare and prepare are used to order requests *They’re done in the same view, even though the primary is faulty Prepare and commit ensure that requests are ordered across all views Accepting client requests and ordering them isn’t separated, making it vunerable to DoS attacks by the client *DoS attacks = Denial of Service attacks where you flood the system to prevent legitimate users from entering
  7. Now we have bad actors, malicious messages
  8. Uses multi-core architecture to run multiple instances of the same protocol in parralel
  9. Elliptic Curve Digital Signature algorithm (ECDSA), it offers elliptic curve cryptography Plenum uses RAET (Reliable Asynchronous event transport) protocol Communication protocol built on top of UDP (User Datagram protocol, similar to TCP) Election process in Plenum is pluggable with any strategy with different security