Mechanics of Bitcoin Part II

Slides:



Advertisements
Similar presentations
Nathan Krussel.  What is a Crypto Currency  Purpose of Crypto Currency  What is Bitcoin  How does Bitcoin work  Mining BTC  How people perceive.
Advertisements

COMS 486 Iowa State University Introduction to Bitcoin A P2P Electronic Cash System.
Bitcoin. What is Bitcoin? A P2P network for electronic payments Benefits: – Low fees – No middlemen – No central authority – Can be anonymous – Each payment.
BITCOIN – 2014 John BlackSpring Digital Currency  Chaum’s ideas in the 1980’s  All ideas required a central bank or single point of trust  Chaum.
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.
Defeating Vanish with Low-Cost Sybil Attacks Against Large DHTs The University of Michigan Scott Wolchok J. Alex Halderman The University of Texas at Austin.
Bitcoin (what, why and how?)
Bitcoins and the Digital Economy Presented By: Matt Blackman.
1 Bitcoin A Digital Currency. Functions of Money.
Bitcoin 101 and Beyond Jonathan Levin VP Business Development, Chainalysis GmbH.
Bitcoin today (October 2, 2015)
Intro to Block Chain Bitcoin. Blocks ●Ethereum - block chain ●Dogecoin - block chain ●Ripple - not a block chain ●Stellar - not a block chain ●Bitcoin.
Bitcoin Jeff Chase Duke University.
SCP: A Computationally Scalable Byzantine Consensus Protocol for Blockchains Loi Luu, Viswesh Narayanan, Kunal Baweja, Chaodong Zheng, Seth Gilbert, Prateek.
Bitcoin Tech Talk Zehady Abdullah Khan (Andy) Graduate Assistant, Computer Science Department, Purdue University.
Section #9: Bitcoins. Digital currency Unique string of bits Use cryptography for security and privacy Not tied to names: hard to trace Finite set of.
Bitcoin Based on “Bitcoin Tutorial” presentation by Joseph Bonneau, Princeton University Bonneau slides marked “JB”
Intro to Cryptocurrencies & Review of Relevant Crypto Tyler Moore, CS 7403, University of Tulsa Slides adapted from Arvind Narayanan, Joseph Bonneau, Edward.
How Bitcoin Achieves Decentralization
How to Store and Use Bitcoins Tyler Moore, CS 7403, University of Tulsa Slides adapted from Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller,
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.
Network Layer COMPUTER NETWORKS Networking Standards (Network LAYER)
Motivation ✓ ✘ ? Bitcoin/Ideal Credit Card Works on Internet
Improving Authenticated Dynamic Dictionaries
CSE 4095 Lecture 22 – BlockChain Slides adapted from Claudio Orlandi.
Bitcoin A Basic Tutorial on Decentralized money
Hijacking Bitcoin: Routing attacks on cryptocurrencies
Bitcoin and the Blockchain
Bitcoin Based on “Bitcoin Tutorial” presentation by
FileSystems.
Blockchains in 12 Easy Steps and Observations to Ponder…
Virtual currency? Crypto-currency? Internet Money? Property?
Bitcoin - a distributed virtual currency system
File System Structure How do I organize a disk into a file system?
Mechanics of Bitcoin Part I
Distributed Systems for Information Systems Management
Bitcoin and the Blockchain
So what is Blockchain anyway?
Deanonymization of Clients in Bitcoin P2P Network
protocollo e casi studio

CS898AT – Bitcoins and Cryptocurrencies
Technical Overview of Bitcoin
Nakamoto Consensus Marco Canini
Deanonymisation of clients in Bitcoin P2P network
EECS 498 Introduction to Distributed Systems Fall 2017
CS 240: Computing Systems and Concurrency Lecture 20 Marco Canini
Bitcoin and the Blockchain
Setting the Stage for a Community Blockchain Incubator
Blockchains (2) slides have been taken from:
Campbell R. Harvey Duke University and NBER
Bitcoin: Data flow.
Nonce Making Sense of Nonces.
D2VS A lightweight, distributed, differencing versioning system
Matthias Grundmann, Till Neudecker, Hannes Hartenstein
Kai Bu 04 Blockchain Kai Bu
Bitcoin Data Structures
Wokshop SAIS 2018 Dr. Meg Murray Kennesaw state university
Faculty Seminar Series Blockchain Technology
Campbell R. Harvey Duke University and NBER
Blockchain Tech Big Picture
Blockchain Tech Big Picture
Bitcoin and Blockchain
Explore Txs, block, blockchain in Bitcoin
Author: Satoshi Nakamoto
Presentation transcript:

Mechanics of Bitcoin Part II Tyler Moore, CS 7403, University of Tulsa Slides adapted from Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, Princeton University

3.4: Bitcoin blocks

Bitcoin blocks Why bundle transactions together? Single unit of work for miners Limit length of hash-chain of blocks Faster to verify history

Bitcoin block structure Hash chain of blocks trans: H( ) prev: H( ) trans: H( ) prev: H( ) trans: H( ) prev: H( ) H( ) H( ) Hash tree (Merkle tree) of transactions in each block H( ) H( ) H( ) H( ) transaction transaction transaction transaction

The real deal: a Bitcoin block { "hash":"00000000000000001aad2...", "ver":2, "prev_block":"00000000000000003043...", "time":1391279636, "bits":419558700, "nonce":459459841, "mrkl_root":"89776...", "n_tx":354, "size":181520, "tx":[ ... ], "mrkl_tree":[ "6bd5eb25...", "89776cdb..." ] } block header transaction data

The real deal: a Bitcoin block header { "hash":"00000000000000001aad2...", "ver":2, "prev_block":"00000000000000003043...", "time":1391279636, "bits":419558700, "nonce":459459841, "mrkl_root":"89776...", ... } mining puzzle information hashed during mining not hashed

The real deal: coinbase transaction "in":[ { "prev_out":{ "hash":"000000.....0000000", "n":4294967295 }, "coinbase":"..." }, "out":[ { "value":"25.03371419", "scriptPubKey":"OPDUP OPHASH160 ... ” } Null hash pointer redeeming nothing First ever coinbase parameter: “The Times 03/Jan/2009 Chancellor on brink of second bailout for banks” arbitrary block reward transaction fees

See for yourself! blockchain.info (and many other sites)

3.5: The Bitcoin network

Bitcoin P2P network Ad-hoc protocol (runs on TCP port 8333) Ad-hoc network with random topology All nodes are equal New nodes can join at any time Forget non-responding nodes after 3 hr

Joining the Bitcoin P2P network 5 1 Hello World! I’m ready to Bitcoin! 7 getaddr() 8 getaddr() 1, 7 getaddr() 3 6 2 4 No geographic topology Seed nodes No formal way of leaving

Transaction propagation (flooding) Already heard that! 5 1 7 8 A→B A→B A→B 3 6 New tx! A→B A→B 2 A→B A→B A→B 4 A→B A→B Transactions are propagated in the “pending transaction pool” A→B

Should I relay a proposed transaction? Transaction valid with current block chain (default) script matches a whitelist Avoid unusual scripts Haven’t seen before Avoid infinite loops Doesn’t conflict with others I’ve relayed Avoid double-spends Sanity checks only... Some nodes may ignore them!

Nodes may differ on transaction pool New tx! A→C 5 1 A→C A→B A→C A→C 7 A→C 8 A→C A→B A→B A→B 3 6 2 A→B A→B A→B 4 A→B

Race conditions Transactions or blocks may conflict Default behavior: accept what you hear first Network position matters Miners may implement other logic!

Block propagation nearly identical Relay a new block when you hear it if: Block meets the hash target Block has all valid transactions Run all scripts, even if you wouldn’t relay Block builds on current longest chain Avoid forks Sanity check Also may be ignored...

Source: Yonatan Sompolinsky and Aviv Zohar: “Accelerating Bitcoin’s Transaction Processing” 2014

How big is the network? Impossible to measure exactly Estimates-up to 1M IP addresses/month Only about 5-10k “full nodes” Permanently connected Fully-validate This number may be dropping!

Fully-validating nodes Permanently connected Store entire block chain Hear and forward every node/transaction

Storage costs 60 GB

Tracking the UTXO set Unspent Transaction Output Everything else can be stored on disk As of June 2015 ~70MB UTXOs Can easily fit into RAM

Thin/SPV clients (not fully-validating) Idea: don’t store everything Store block headers only Request transactions as needed To verify incoming payment Trust fully-validating nodes 1000x cost savings! (65 GB-70MB) Also called “lightweight nodes”

Software diversity About 90% of nodes run “Core Bitcoin” (C++) Some are out of date versions Other implementations running successfully BitcoinJ (Java) Libbitcoin (C++) btcd (Go) “Original Satoshi client” Core Bitcoin == “Satoshi “client Original Satoshi client=historical only