Transactions Between Distributed Ledgers

Similar documents
Data Consistency and Blockchain. Bei Chun Zhou (BlockChainZ)

BlockFin A Fork-Tolerant, Leaderless Consensus Protocol April

Viewstamped Replication to Practical Byzantine Fault Tolerance. Pradipta De

Practical Byzantine Fault Tolerance Consensus and A Simple Distributed Ledger Application Hao Xu Muyun Chen Xin Li

Parallel Data Types of Parallelism Replication (Multiple copies of the same data) Better throughput for read-only computations Data safety Partitionin

CS /15/16. Paul Krzyzanowski 1. Question 1. Distributed Systems 2016 Exam 2 Review. Question 3. Question 2. Question 5.

CONSENSUS PROTOCOLS & BLOCKCHAINS. Techruption Lecture March 16 th, 2017 Maarten Everts (TNO & University of Twente)

Consensus in Distributed Systems. Jeff Chase Duke University

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf

Coordination 1. To do. Mutual exclusion Election algorithms Next time: Global state. q q q

Introduction to Distributed Systems Seif Haridi

Exam 2 Review. Fall 2011

Consensus, impossibility results and Paxos. Ken Birman

CS 138: Practical Byzantine Consensus. CS 138 XX 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

Consensus a classic problem. Consensus, impossibility results and Paxos. Distributed Consensus. Asynchronous networks.

Cryptocurrency and Blockchain Research

Alternative Consensus

SCP: A Computationally Scalable Byzantine Consensus Protocol for Blockchains

Robust BFT Protocols

Distributed Systems 11. Consensus. Paul Krzyzanowski

Practical Byzantine Fault Tolerance (The Byzantine Generals Problem)

Consensus Problem. Pradipta De

Consensus and related problems

Today: Fault Tolerance

Recovering from a Crash. Three-Phase Commit

Practical Byzantine Fault

To do. Consensus and related problems. q Failure. q Raft

Recap. CSE 486/586 Distributed Systems Paxos. Paxos. Brief History. Brief History. Brief History C 1

CSE 486/586 Distributed Systems

Distributed Consensus: Making Impossible Possible

Hyperledger Fabric v1:

Hyperledger fabric: towards scalable blockchain for business

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson

Fault Tolerance. Distributed Software Systems. Definitions

Byzantine Fault Tolerant Raft

Blockchain for Enterprise: A Security & Privacy Perspective through Hyperledger/fabric

Chapter 8 Fault Tolerance

Practical Byzantine Fault Tolerance. Miguel Castro and Barbara Liskov

Today: Fault Tolerance. Fault Tolerance

or? Paxos: Fun Facts Quorum Quorum: Primary Copy vs. Majority Quorum: Primary Copy vs. Majority

PBFT: A Byzantine Renaissance. The Setup. What could possibly go wrong? The General Idea. Practical Byzantine Fault-Tolerance (CL99, CL00)

Distributed Consensus: Making Impossible Possible

EECS 498 Introduction to Distributed Systems

Distributed Systems Consensus

arxiv: v2 [cs.dc] 12 Sep 2017

Don t Give Up on Serializability Just Yet. Neha Narula

CS October 2017

Paxos Made Simple. Leslie Lamport, 2001

CS505: Distributed Systems

Failures, Elections, and Raft

Distributed Systems. 09. State Machine Replication & Virtual Synchrony. Paul Krzyzanowski. Rutgers University. Fall Paul Krzyzanowski

ABOUT SOME OF THE BLOCKCHAIN PROBLEMS

Distributed Systems. Day 13: Distributed Transaction. To Be or Not to Be Distributed.. Transactions

Semi-Passive Replication in the Presence of Byzantine Faults

Concepts. Techniques for masking faults. Failure Masking by Redundancy. CIS 505: Software Systems Lecture Note on Consensus

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

Coordination and Agreement

CS State Machine Replication

A definition. Byzantine Generals Problem. Synchronous, Byzantine world

Exam 2 Review. October 29, Paul Krzyzanowski 1

Paxos and Raft (Lecture 21, cs262a) Ion Stoica, UC Berkeley November 7, 2016

Distributed Consensus Protocols

Fault Tolerance. Basic Concepts

Two-Phase Atomic Commitment Protocol in Asynchronous Distributed Systems with Crash Failure

Fast Paxos. Leslie Lamport

Fault Tolerance via the State Machine Replication Approach. Favian Contreras

Recall our 2PC commit problem. Recall our 2PC commit problem. Doing failover correctly isn t easy. Consensus I. FLP Impossibility, Paxos

Assignment 12: Commit Protocols and Replication

Lecture 3. Introduction to Cryptocurrencies

Middleware and Distributed Systems. System Models. Dr. Martin v. Löwis

Byzantine Fault Tolerance and Consensus. Adi Seredinschi Distributed Programming Laboratory

Practical Byzantine Fault Tolerance Using Fewer than 3f+1 Active Replicas

Transactum Business Process Manager with High-Performance Elastic Scaling. November 2011 Ivan Klianev

Modern Database Concepts

Today: Fault Tolerance. Failure Masking by Redundancy

Proseminar Distributed Systems Summer Semester Paxos algorithm. Stefan Resmerita

Exercise 12: Commit Protocols and Replication

Recall: Primary-Backup. State machine replication. Extend PB for high availability. Consensus 2. Mechanism: Replicate and separate servers

Practical Byzantine Fault Tolerance. Castro and Liskov SOSP 99

Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms

Distributed Systems. Multicast and Agreement

Fault Tolerance. Distributed Systems IT332

Distributed Systems 24. Fault Tolerance

arxiv: v3 [cs.dc] 4 Dec 2018

Distributed Algorithms Reliable Broadcast

Security (and finale) Dan Ports, CSEP 552

Assignment 12: Commit Protocols and Replication Solution

Accountable SDNs for Cyber Resiliency UIUC/R2 Monthly Group Meeting. Presented by Ben Ujcich March 31, 2017

Distributed Systems. Day 9: Replication [Part 1]

Distributed Systems. 19. Fault Tolerance Paul Krzyzanowski. Rutgers University. Fall 2013

PARALLEL CONSENSUS PROTOCOL

CSE 5306 Distributed Systems

Distributed Systems. replication Johan Montelius ID2201. Distributed Systems ID2201

Efficient and Scalable Replication of Services over Wide-Area Networks

Linearizability CMPT 401. Sequential Consistency. Passive Replication

PROCESS SYNCHRONIZATION

CSE 5306 Distributed Systems. Fault Tolerance

BigchainDB: A Scalable Blockchain Database. Trent McConaghy

Reducing the Costs of Large-Scale BFT Replication

Transcription:

Transactions Between Distributed Ledgers Ivan Klianev Transactum Pty Ltd High Performance Transaction Systems Asilomar, California, 8-11 October 2017

The Time for Distributed Transactions Has Come Thanks to the Possibility of Leaderless Byzantine Consensus

Safety of Byzantine Consensus Unlike Two Phase Commit Does Not Depend Critically on Assumptions About: Trust Liveness Connectivity Adversary Attacks Random Behavior

Cross-Blockchain Transactions Architecture Two Connected Permissioned Blockchain Networks Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Via - a business entity, which operates nodes in both networks

Cross-Blockchain Transactions Architecture Network-executed Escrow Contract TIMEOUT Escrow OR Escrow Sender Ledger A RECEIPT from RECIPIENT LEDGER Sender Ledger A On Timeout: Return the tokens Back On Receipt: Move the tokens Forward

Cross-Blockchain Transactions Step 1 Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Account Sender transfers X tokens to account Escrow and starts an Escrow contract

Cross-Blockchain Transactions Step 2 Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Account on ledger A transfers X tokens to account on ledger B

Cross-Blockchain Transactions Step 3 Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Account on ledger B transfers X tokens to account Recipient

Cross-Blockchain Transactions Step 4 Blockchain Network A Send a Receipt Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Network B sends a Receipt to network A

Cross-Blockchain Transactions Step 5 Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Network A transfers the tokens on escrow to account

Cross-Blockchain Transactions Final State Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Account on ledger A contains X tokens as before the transaction

Cross-Blockchain Transactions Spoiled Safety - a Trigger Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Transfer to account Recipient is successful but delayed by a Byzantine-faulty Leader

Cross-Blockchain Transactions Spoiled Safety - Response TIMEOUT Blockchain Network A Blockchain Network B Escrow Sender Ledger A Recipient Ledger B The delay triggers a Timeout event: The Escrow contract returns the tokens back to account Sender

Cross-Blockchain Transactions Spoiled Safety - Outcome Blockchain Network A Send a Receipt Blockchain Network B Escrow Sender Ledger A Recipient Ledger B Account on ledger A has lost X tokens Account Sender has incorrectly received a Receipt

Classic Distributed vs.cross-blockchain What May Spoil the Safety In a Byzantine consensus network only the Protocol Leader does not tolerate any fault Possible Fault / Problem Tolerance by Protocol Roles 2PC 2PC PBFT Participants Coordinator All Replicas PBFT The Leader Process Crash-Fail YES Network Partition YES Hardware-Caused Random Behavior YES Software-Caused Random Behavior YES Operator Dishonesty to Another Operator YES Operator Dishonesty to Account Holder N/A YES Operator Dishonesty to Any Other Party N/A YES DDoS Attack on Process YES Process Hack YES

Leaderless Byzantine Consensus Reinforces the Liveness It has not been seen in practice, but it is not a fiction In 2010, Leslie Lamport was granted a patent for Synchronous Leaderless Byzantine Consensus We devised an environment and algorithm for Asynchronous Leaderless Byzantine Consensus

Asynchronous Consensus Contradicts CAP Theorem Bitcoin Network Workaround Utilizes the existence of multple communication paths Ensures consistency and availability regardless of partitions CAP Theorem still applies to Bitcoin Network A lasting partition of Internet between the two hemispheres would let spend each bitcoin once in each hemisphere

Asynchronous Consensus Contradicts CAP Theorem Our Workaround Circumvention of network partition between two nodes combining: Prevented stop-faults Use of indirect routes Use of signed messages Node 1 Example: Partition between Node 1 and Node 2 Byzantine nodes: Node 3 and Node 5 Network Behavior: Node 2 multicasts a message Missing Message Node 3 and Node 5 do not respond Node 4 responds sending the missed Message Node 2 Node 3 Node 5 Node 4

Asynchronous Consensus Contradicts the FLP Result Our Workaround Step 1: Eliminate the need of Proposer Fact: Consensus in FLP theorem is about the value of 1 bit It requires: Non-deterministic choice Proposer making the choice In contrast: Outcome of transactions ordering is a composite value It allows: Deterministic composition Consensus without a Proposer

Asynchronous Consensus Contradicts the FLP Result Our Workaround Step 2: Prevent Stop-faults of a Node Node as Cluster of Highly Available Functional Groups Client Communication Group Consensus Communication Group Consensus & Transaction Manager Group Data Partition Group 1... Data Partition Group N

Asynchronous Consensus Contradicts the FLP Result Our Workaround Step 2: Prevent Stop-faults of a Node Node as Cluster of Highly Available Functional Groups It ensures that a Stop-faulty process cannot prevent: Sending of consensus protocol messages High availability of transactions inside the node It implements ACID transactions with NoSQL engines, where: Replication of data does not affect the throughput¹ Multi-shard transactions improve the throughput² ¹,² http://www.hpts.ws/papers/2015/lightning/highly_available_atomic_consistency.pdf

Asynchronous Leaderless Byzantine Consensus Protocol Works in Two Phases and needs N = 2F + 1 Prologue Phase One Phase Two Epilogue Receiving Tx Requests Distribution of Received Tx Requests Distribution of Proposals for Tx Commits Transmitting Tx Responses Client 1 Client 2 Client 3 Node 1 Node 2 Node 3 Asynchronous Leaderless Byzantine Consensus Protocol Phases

Conclusion We presented Cross-Blockchain Transactions that guarantee both Safety and Liveness using Architecture for Leaderless Consensus

Thank You Ivan Klianev Transactum Pty Ltd