EECS 498 Introduction to Distributed Systems

Similar documents
Problem: Equivocation!

Blockchain. CS 240: Computing Systems and Concurrency Lecture 20. Marco Canini

Bitcoin and Blockchain

Bitcoin. CS6450: Distributed Systems Lecture 20 Ryan Stutsman

ENEE 457: E-Cash and Bitcoin

Chapter 13. Digital Cash. Information Security/System Security p. 570/626

SpaceMint Overcoming Bitcoin s waste of energy

Smalltalk 3/30/15. The Mathematics of Bitcoin Brian Heinold

Computer Security. 14. Blockchain & Bitcoin. Paul Krzyzanowski. Rutgers University. Spring 2019

Bitcoin, Security for Cloud & Big Data

Ensimag - 4MMSR Network Security Student Seminar. Bitcoin: A peer-to-peer Electronic Cash System Satoshi Nakamoto

CS 4770: Cryptography. CS 6750: Cryptography and Communication Security. Alina Oprea Associate Professor, CCIS Northeastern University

Formally Specifying Blockchain Protocols

Lecture 3. Introduction to Cryptocurrencies

Security (and finale) Dan Ports, CSEP 552

CS 4770: Cryptography. CS 6750: Cryptography and Communication Security. Alina Oprea Associate Professor, CCIS Northeastern University

P2P BitCoin: Technical details

University of Duisburg-Essen Bismarckstr Duisburg Germany HOW BITCOIN WORKS. Matthäus Wander. June 29, 2011

BBc-1 : Beyond Blockchain One - An Architecture for Promise-Fixation Device in the Air -

Who wants to be a millionaire? A class in creating your own cryptocurrency

Introduction to Bitcoin I

Biomedical Security. Cipher Block Chaining and Applications

Security Analysis of Bitcoin. Dibyojyoti Mukherjee Jaswant Katragadda Yashwant Gazula

Bitcoin (Part I) Ken Calvert Keeping Current Seminar 22 January Keeping Current 1

Hyperledger fabric: towards scalable blockchain for business

ICS 421 & ICS 690. Bitcoin & Blockchain. Assoc. Prof. Lipyeow Lim Information & Computer Sciences Department University of Hawai`i at Mānoa

EECS 498 Introduction to Distributed Systems

Radix - Public Node Incentives

Biomedical Security. Some Security News 10/5/2018. Erwin M. Bakker

Proof of Stake Made Simple with Casper

SCP: A Computationally Scalable Byzantine Consensus Protocol for Blockchains

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

Biomedical and Healthcare Applications for Blockchain. Tiffany J. Callahan Computational Bioscience Program Hunter/Kahn Labs

Bitcoin (and why it uses SO much energy)

Bitcoin. Arni Par ov. December 17, 2013

Bitcoin, a decentralized and trustless protocol

Blockchain, Cryptocurrency, Smart Contracts and Initial Coin Offerings: A Technical Perspective

Introduc)on to Bitcoin

A HASH-CASH BASED MUSIC STREAMING PAYMENT SYSTEM. Timothy Chen San Jose State University Fall 2014

Jan Møller Co-founder, CTO Chainalysis

Reliability, distributed consensus and blockchain COSC412

How Bitcoin achieves Decentralization. How Bitcoin achieves Decentralization

Alternative Consensus Algorithms. Murat Osmanoglu

Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts. Yashar Dehkan Asl

The Blockchain. Josh Vorick

BITCOIN MECHANICS AND OPTIMIZATIONS. Max Fang Philip Hayes

Distributed Algorithms Bitcoin

CS 161 Computer Security

Bitcoin. Tom Anderson

Consensus & Blockchain

Proof-of-Work & Bitcoin

BITCOIN PROTOCOL & CONSENSUS: A HIGH LEVEL OVERVIEW

Privacy Enhancing Technologies CSE 701 Fall 2017

Data Consistency and Blockchain. Bei Chun Zhou (BlockChainZ)

Blockstack, a New Internet for Decentralized Apps. Muneeb Ali

BlockFin A Fork-Tolerant, Leaderless Consensus Protocol April

CSE 5852, Modern Cryptography: Foundations Fall Lecture 26. pk = (p,g,g x ) y. (p,g,g x ) xr + y Check g xr +y =(g x ) r.

TOPPERCASH TOPPERCASH WHITEPAPER REFORM THE BEST OF BLOCKCHAIN

DAVID ANDREWS, FOUNDER RYATTA BLOCKCHAIN FOUNDATIONS

The power of Blockchain: Smart Contracts. Foteini Baldimtsi

Algorand: Scaling Byzantine Agreements for Cryptocurrencies

Using Chains for what They re Good For

Transactions as Proof-of-Stake! by Daniel Larimer!

Crypto tricks: Proof of work, Hash chaining

CS 251: Bitcoin and Crypto Currencies Fall 2015

Cryptography and Cryptocurrencies. Intro to Cryptography and Cryptocurrencies

On the impact of propogation delay on mining rewards in Bitcoin. Xuan Wen 1. Abstract

Upgrading Bitcoin: Segregated Witness. Dr. Johnson Lau Bitcoin Core Contributor Co-author of Segregated Witness BIPs March-2016

Part 2. Use Cases (40 points). Consider examples of such signed records R (as in Part 1) from systems we discussed.

Anupam Datta CMU. Fall 2015

Burstcoin Technical information about mining and block forging

Securing Bitcoin wallets: A new DSA threshold signature scheme that is usable in the real world

Introduction to Cryptography in Blockchain Technology. December 23, 2018

Alternatives to Blockchains. Sarah Meiklejohn (University College London)

What is Bitcoin? How Bitcoin Works. Outline. Outline. Bitcoin. Problems with Centralization

Keychat: Secure Messaging via Bitcoin. Robert Chen, John Kuszmaul, Yiming Zheng Mentored By Alin Tomescu

EECS 498 Introduction to Distributed Systems

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz II

SmartPool: practical decentralized pool mining. Loi Luu, Yaron Velner, Jason Teutsch, and Prateek Saxena August 18, 2017

Whitepaper Rcoin Global

Zero-Knowledge proof of knowledge transfer. Perm summer school on blockchain 2018

WOLFCOIN MASTERNODE MANUAL

Hyperledger Fabric v1:

Radix - Tempo. Dan Hughes Abstract

Blockchains & Cryptocurrencies

Let's build a blockchain!

Lecture 12. Algorand

CS 251: Bitcoin and Cryptocurrencies Fall 2016

Applied cryptography

GRADUBIQUE: AN ACADEMIC TRANSCRIPT DATABASE USING BLOCKCHAIN ARCHITECTURE

CS /29/18. Paul Krzyzanowski 1. Question 1 (Bigtable) Distributed Systems 2018 Pre-exam 3 review Selected questions from past exams

BLOCKCHAIN Blockchains and Transactions Part II A Deeper Dive

REM: Resource Efficient Mining for Blockchains

hard to perform, easy to verify

Table of contents. Technical Features. Our approach. Technical Overview. Stage 1 (Using Ethereum blockchain) Participants. Data Owner.

WHITEPAPER 1.0 Boostx, Lead Developer BoxyCoin

Distributed Systems Pre-exam 3 review Selected questions from past exams. David Domingo Paul Krzyzanowski Rutgers University Fall 2018

P2_L8 - Hashes Page 1

CS 161 Computer Security

Blockchain, cryptography, and consensus

Transcription:

EECS 498 Introduction to Distributed Systems Fall 2017 Harsha V. Madhyastha

Today Bitcoin: A peer-to-peer digital currency Spark: In-memory big data processing December 4, 2017 EECS 498 Lecture 21 2

December 4, 2017 EECS 498 Lecture 21 3

Digital Currency Say Bob pays for purchase with digital coins What properties must seller check about coins? Valid (i.e., not forged) Not already spent Owned by Bob (i.e., not stolen) How do shopping portals check these today? Rely on bank, Visa, Mastercard, December 4, 2017 EECS 498 Lecture 21 4

Eliminating Centralized Trust Imagine public ledger of transactions Every transaction ( A paid $X to B ) in ledger Benefits: Any user cannot spend more money than earned How to achieve such a public ledger? Paxos log? Any user can propose transaction between any pair of users! December 4, 2017 EECS 498 Lecture 21 5

Encryption and Hashing Every user has (public key, private key) pair Enc(m, pub u ): can decrypt only with priv u Sign(m, priv u ): can use pub u to verify signature Cryptographic hash function: Hard to infer value given hash(value) December 4, 2017 EECS 498 Lecture 21 6

Preventing Theft Represent coin transfer from Alice to Bob as: T = pub Bob, sign(hash(t ), priv Alice ) T is transaction via which Alice acquired this coin When Bob transfers coin to Charlie later: T = pub Charlie, sign(hash(t), priv Bob ) Anyone can use pub Bob from T to verify signature What would it take to spend another user s cash? December 4, 2017 EECS 498 Lecture 21 7

Public Ledger Distributed system comprising 1000s of nodes Broadcast transactions;; valid if majority report No money stolen unless private key leaks How to identify majority? Majority of IP addrs? What can Mallory do if she controls majority? Export different views of ledger to different users Double spending! Sybil attack: Same user runs many nodes December 4, 2017 EECS 498 Lecture 21 8

Desired Properties of Ledger Strongly consistent All users must see the same set of transactions Append-only Can only add transactions Cannot remove transactions December 4, 2017 EECS 498 Lecture 21 9

Bitcoin: Key Idea Every node must do work to participate Called mining To double spend, need to control majority of CPU resources in system December 4, 2017 EECS 498 Lecture 21 10

Structure of Bitcoin Ledger Each miner picks a set of transactions for new block Links to previous block by including its hash Pick nonce for header December 4, 2017 EECS 498 Lecture 21 11

Bitcoin: Proof of work Find nonce such that hash (nonce prev_hash block data) < target i.e., hash has certain number of leading 0 s At any time, all nodes in race to identify nonce for next block Target set such that new block every 10 minutes Incentive for any node to participate? December 4, 2017 EECS 498 Lecture 21 12

Coping with Forks prev: H( ) prev: H( ) prev: H( ) prev: H( ) prev: H( ) txn 5 txn 6 txn 7 txn 8 txn 9 prev: H( ) txn 6 Correct nodes accept longest chain Older a block, the safer it is from being deleted Common practice: Transaction 6 blocks deep committed December 4, 2017 EECS 498 Lecture 21 13

Randomized leader election Each time a nonce is found: New leader elected for past epoch (~10 min) Leader decides which transactions comprise block Probability of a node selected as leader? Proportional to node s % of global hashing power December 4, 2017 EECS 498 Lecture 21 14

Scaling Bitcoin Scaling limitations 1 block = 1 MB max (~ 2000 transactions) 1 block every 10 mins à 3-4 txns / sec Visa peak load comparison Typically 2,000 txns / sec Peak load in 2013: 47,000 txns / sec Joining requires full download of ledger High energy consumption December 4, 2017 EECS 498 Lecture 21 15

Impact of Bitcoin Idea of public ledger (called blockhain) widely applicable Remove dependence on centralized trust Impact of using blockchain to create digital currency Time will tell December 4, 2017 EECS 498 Lecture 21 16

Reminders Take sample exam before lecture next Monday Submit teaching evaluation Email me about concepts that you would like me to review on Wednesday December 4, 2017 EECS 498 Lecture 21 17

MapReduce Programming Model Partition input data Execute Map function on each partition Map(key, value) à {(key, value )} Coalesce results to get list of values for each key Execute Reduce function for final output Reduce(key, {value}) à (key, value ) December 4, 2017 EECS 498 Lecture 21 18

Problems with MapReduce Too slow for iterative computations PageRank Machine learning workloads Too slow for interactive queries Analyzing error logs Select errors, Focus on errors of a specific type, At what times did errors occur? Root cause: Disk I/O at start and end of job December 4, 2017 EECS 498 Lecture 21 19

MapReduce Execution December 4, 2017 EECS 498 Lecture 21 20

In-Memory Data Processing Load input data into memory Run several iterations of processing on data Write output data to disk What s so hard about this? Failures! Key ideas in Spark: Track transformation lineage for each data partition Given programmer control to persist intermediate data December 4, 2017 EECS 498 Lecture 21 21

Inter-Partition Dependencies Narrow dependencies (e.g., map, filter) Wide dependencies (e.g., sort, join) December 4, 2017 EECS 498 Lecture 21 22

Spark Performance December 4, 2017 EECS 498 Lecture 21 23

Impact of Spark Popular alternative to Hadoop Spark Summit held every few months Commercialized by Databricks December 4, 2017 EECS 498 Lecture 21 24