Blockchains (2) slides have been taken from:

Slides:



Advertisements
Similar presentations
Secure Multiparty Computations on Bitcoin
Advertisements

Bitcoin. What is Bitcoin? A P2P network for electronic payments Benefits: – Low fees – No middlemen – No central authority – Can be anonymous – Each payment.
Bitcoin Double Spending Attack Karame, Androulaki & Capkun Presented by Subhro Kar CSCE 715, Fall 2013.
BITCOIN An introduction to a decentralised and anonymous currency. By Andy Brodie.
The world’s first decentralized digital currency Meni Rosenfeld Bitcoil 29/11/2012Written by Meni Rosenfeld1.
Bitcoin (what, why and how?)
Bitcoins and the Digital Economy Presented By: Matt Blackman.
1 Bitcoin A Digital Currency. Functions of Money.
Bitcoin Tech Talk Zehady Abdullah Khan (Andy) Graduate Assistant, Computer Science Department, Purdue University.
Bitcoin is a cryptographic currency that has been in continuous operation over the last 3 years. It currently enjoys an exchange rate of $4.80 (as of April.
How Bitcoin Achieves Decentralization
First… What is Cryptocurrency? A Cryptocurrency is a digital currency that is created through mathematical engineering (algorithm). It is designed to.
Bitcoin Bitcoin is a cryptocurrency. The platform that hosts Bitcoin is a p2p system. Bitcoin can be abstracted as a digital file that records the account.
Block Chain 101 May 2017.
Motivation ✓ ✘ ? Bitcoin/Ideal Credit Card Works on Internet
CRYPTOCURRENCY Bitcoin,Ether & Beyond..
Symposium on Distributed Ledger Technology SDLT'2017
CSE 4095 Lecture 22 – BlockChain Slides adapted from Claudio Orlandi.
Bitcoin and the Blockchain
Evaluation Forms for Blockchain- Based System ver. 1.0
Blockchain Introduction
Virtual currency? Crypto-currency? Internet Money? Property?
Bitcoin - a distributed virtual currency system
Distributed Systems for Information Systems Management
Cryptocurrencies By Rui Sakurai and Shane Spears
Introduction to Blockchain & Ethereum
Blockchains and Cryptocurrencies: What Financial Planners Need to Know
CPS 512 midterm exam #1, 10/5/17 Your name please: NetID:_______ Sign for your honor:____________________________.
Bitcoin and the Blockchain
Ling Ren Joint work with Ittai Abraham, Dahlia Malkhi,
So what is Blockchain anyway?
Deanonymization of Clients in Bitcoin P2P Network

Zcash Mining – A Guide For Beginners. Zcash (also known as ZEC and seventeenth most valued cryptocurrency with market capitalization of $500 million)
CS898AT – Bitcoins and Cryptocurrencies
Rechtsanwältin – Germany Attorney at Law – New York
Advanced Cryptography Protocols
Data Structures and Analysis (COMP 410)
Nakamoto Consensus Marco Canini
EECS 498 Introduction to Distributed Systems Fall 2017
CS 240: Computing Systems and Concurrency Lecture 20 Marco Canini
Providing Secure Storage on the Internet
BLOCKCHAIN BASICS & LEGAL ISSUES
Bitcoin and the Blockchain
Bitcoin: A New Internet Currency
Blockchains slides have been taken from:
Blockchain technology
Distributed Ledger Technology (DLT) and Blockchain
Introduction to Blockchain
Blockchain Concepts RISK FORUM 2017 Hash function (e.g. SHA-256)
Swagatika (Jazz) Sarangi
Bitcoin & Blockchain Bina Ramamurthy 2/22/2019.
Data Structures and Analysis (COMP 410)
Consensus Algorithms.
FST Network All Rights Reserved
Kai Bu 04 Blockchain Kai Bu
Blockchains and Auditing
Blockchains and Smart Contracts for the Internet of Things
Ethereum Virtual Machine
TELE3119: Trusted Networks Week 5
Introduction to blockchain
Wokshop SAIS 2018 Dr. Meg Murray Kennesaw state university
Faculty Seminar Series Blockchain Technology
Κατανεμημένα Συστήματα
Distributed Computers and Web Technologies (3-0-6)
Campbell R. Harvey Duke University and NBER
Blockchain Tech Big Picture
Blockchain Tech Big Picture
Bitcoin and Blockchain
Explore Txs, block, blockchain in Bitcoin
Presentation transcript:

Blockchains (2) slides have been taken from: Intro to Crypto and Crypto Currencies by Arvind Narayanan

Recap Hash Pointer Data Data Data Data Data Data Data Pointer to Data hash stored in the hash pointer is the hash of the whole data of the previous block, which also includes the hash pointer to the block before that one.  Pointer to Data Hash of Data Data Data Pointer to Data Hash of Data Genesis Block Block 1 Block 2 Block 3 Block 4 Pointer to Data Hash of Data Pointer to Data Hash of Data Pointer to Data Hash of Data Pointer to Data Hash of Data Data Data Data Data Data

Questions Who maintains the ledger? Who has authority over which transactions are valid? Who creates a new coin? Who determines how the rules of the system change? How does bit coins acquire exchange value? Adapted from Arvind Narayanan

Distributed System Distributed Consensus Numerous applications Peer to Peer Network Mining Updates Distributed Centralised Distributed Consensus Fundamental problem is maintaining consistency Numerous applications DNS, Public Key Directory, …… Adapted from Arvind Narayanan

Consensus Definition P2P Bitcoin Protocol terminates all legitimate nodes decide on the same value The value has to have been proposed by a some legitimate node P2P Bitcoin Alice broadcasts the transaction to all nodes on P2P network The which transactions were broadcast and order in these transactions took place Signed by Alice Pay PKBob H( ) Bob’s machine does not need to be on the network Received form somebody else Adapted from Arvind Narayanan

Consensus – Bitcoin All nodes have Select any valid block TrA Tr TrA A Tr All nodes have A sequence of blocks of transactions that they have received consensus on A set of outstanding transactions they head about Select any valid block Really hard technical problem …. Tr TrB Tr B Tr …. Tr TrC Tr TrC C Tr TrC …. Tr Tr Tr Tr Adapted from Arvind Narayanan

Why Nodes may crash or be malicious Network is imperfect Not all pairs of nodes are connected Faults in the network Latency Many impossibility results Byzantine generals problem Fischer-Lynch-Paterson – consensus impossible with a single faulty node Some well known protocols Paxos: Never produces inconsistent results, but can get stuck (rarely) Adapted from Arvind Narayanan

Some Observations Models say more about the model than the problem Models were developed to study systems like distributed data bases Bitcoin is a practical solution Bitcoin Introduces the notion of incentives Embraces randomness No specific end-point Consensus happens over long time scales (~1 hour): as time goes on the probability increases Adapted from Arvind Narayanan

Consensus without Identities Identity is hard in P2P systems No central entities Pseudonmity is a goal Implicit Concensus Assume that it is possible to pick a random node In each round pick a node at random The selected ndoe proposes the next block in the chain Others nodes accepts the and extends the blockchain, if all transactions are valid(unspent, valid signature) or Reject this block extends the blockchain from an earlier block Adapted from Arvind Narayanan

Consensus Algorithm New transactions are broadcast to all nodes Each node collects new transactions into a new block In each round a random node gets to broadcast its block Other nodes accepts the block Nodes express their acceptance of the block by including its hash in the next block they create Extend the longest valid branch Adapted from Arvind Narayanan

Validation Stealing somebody else’s bit coins? Cannot because cannot forge signature Denial of service by not including any of the transactions from a give user Only an a delay Double spending Signed by PKAruna CreateCoin [uniqueCoinID] Pay to PKAlice H( ) Signed by PKAlice Pay to PKBob H( ) Adapted from Arvind Narayanan

Double Spend (1) Signed by PKAlice CA -> B Pay to PKBob H( ) Pay to PKA’ H( ) CA -> A’ Adapted from Arvind Narayanan

Bobs View 1 confirmation 3 confirmations CA -> B CA -> A’ Hears about CA ->B 0 confirmations Double spend probability decreases exponentially with the number of confirmations Common heuristic: 6 Adapted from Arvind Narayanan

Incentives not to act maliciously Reward the node that created these blocks Signed by PKAlice Pay to PKBob H( ) CA -> B Signed by PKAlice Pay to PKA’ H( ) CA -> A’ Punish the node that created this block Adapted from Arvind Narayanan

Incentive 1: Block Reward Creator of a block gets to: Include special con-creation transaction in the block Choose the recipient address of this transaction Block creator gets to to “collect” the reward only if the block ends up on the long-term concensus branch Value is fixed: currently 25BTC, halves every 4 years Adapted from Arvind Narayanan

Finite Supply Block reward is how new bit coins are created Total supply:21 million Block reward is how new bit coins are created Runs out in 2040 Adapted from Arvind Narayanan

Transaction Fee Creator of a transaction can choose to make output value less than the input value Like a tip – voluntary Problems How to pick a random node How to avoid a free for all How to prevent Sybil attacks Adapted from Arvind Narayanan

Proof of work Selecting a random node Select nodes in proportion to a resource that no one can monopolise In proportion to the computing power: proof of work In proportion to owership: proof of stake Let nodes compete for the right to create a block Make it difficult to create new identities Adapted from Arvind Narayanan

Puzzle Friendly For every possible output y, if k is chosen forma distribution with high minimum entropy, then it is not possible to find x such that H(k|x) = y Search Puzzle Given a “puzzle ID” and target set Y, find a solution x such that H(puzzle ID|x) ∈ Y Only way -> Try random values of x Adapted from Ed Felton

Has Puzzles To create a block, find a nonce such that H(nonce |prev_has|tx|…..|tx) is very small Output Space of hash nonce Target Space Signed by PKAlice Pay to PKA’ H( ) If the hash function is secure, the only way to find such a nonce keep trying until you get lucky Adapted from Arvind Narayanan

Some finer Details Nodes automatically re-calculate the target every two weeks Goal: average time between blocks ~10 mins. Attacks are infeasible if majority of miners weighted by has power follow the protocol Adapted from Arvind Narayanan

Summary Identities Transactions Peer to Peer Network No real-world ID any user can create an ID Transactions Messages that are broadcast to the P2P network giving instructions as to what to do with coins Coins are chain of transactions Peer to Peer Network Transfers the transactions to all the nodes in the network – best effort. Security coems form the blockchain and concensus protocol Blockchain and Concensus Transaction to be in a block cahin needs a number of confirmations (6 is the heuristic). Could have a orphan of blocks. Hash puzzles and mining Randomly finding nodes Adapted from Arvind Narayanan

Etherium Premise is that it can be used for number of other things tan just financial transactions Ethereum is an open-source, publicly distributed computing platform, that has the notion of smart contracts to build decentralised applications The value token of the Ethereum blockchain is an Ether Gas Ethereum Virtual Machine (EVM)

Ethereum v. Bitcoin Bit Coin Ethereum Concept Digital Currency World Computer Cyptocurrency Token BTC Ether Scripting Language Turing Incomplete Turing Complete Consensus Algorithm SHA256 Ethash Coin Release method Early Mining ICO Average Block Time ~10min 12-15sec

Types of Ethereum Accounts Two Types: Externally Owned & Contract Externally Owned Accounts Owned by people or ganisations Controlled by private keys Contract Accounts Autonomous Accounts Controlled by code Smart Contracts Computerised protocol Contract rules Immutable

Example Smart Contract Immutable pieces of code Self operating program Store and update information Executed when specific conditions are met Individual are anonymous Contract is public Solidity

Generality - IoT BoM Location

Ethereum Gas EVM is running code Gas Gas Limit Unit of for the amount of computational work done by the computer for one cycle of the contract Gas Limit Max. amount of gas the contract can use for it computations Gas Station