Campbell R. Harvey Duke University and NBER

Slides:



Advertisements
Similar presentations
Solution of Equations Example Problem Desire to find the temperature (T) that corresponds to a desired pressure, P.
Advertisements

Multiplication Practice Do you know how to multiply with double digits?
FACTORS.
COMS 486 Iowa State University Introduction to Bitcoin A P2P Electronic Cash System.
Routegadget analysis By: Matt Radford. Course information - The controls are labelled as if doing course A. - Control codes are next to the controls.
Bitcoin Double Spending Attack Karame, Androulaki & Capkun Presented by Subhro Kar CSCE 715, Fall 2013.
Bitcoins and the Digital Economy Presented By: Matt Blackman.
Operations on Bits Arithmetic Operations Logic Operations
1 Bitcoin A Digital Currency. Functions of Money.
1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6.
Chapter 2 Number Systems: Decimal, Binary, and Hex.
Objective Students will add, subtract, multiply, divide, and simplify radicals.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
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.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Simplifying Radicals. You’ve already done some work with radicals and square roots such as: Finding the square root of perfect squares Estimate the square.
Block Chain 101 May 2017.
The Essentials of Alice (Bunny)
Getting Started With Alice: The Basics
SCIENTIFIC NOTATION.
What to do when a test fails
Bitcoin - a distributed virtual currency system
Sight Word Lists (141 words)
Distributed Systems for Information Systems Management
MATHS Week 8 Geometry.
Campbell R. Harvey Duke University and NBER
So what is Blockchain anyway?
These 19 words are given and fixed
Warm Up Write each expression using an exponent • 2 • 2
Technical Overview of Bitcoin
Transaction Mechanics
Keys Campbell R. Harvey Duke University, NBER and
Campbell R. Harvey Duke University and NBER
Using manipulatives in math
Transaction Mechanics
Duke University and NBER
Transaction Mechanics
Campbell R. Harvey Duke University and NBER
Binary Lesson 3 Hexadecimal
Credit Cards Campbell R. Harvey Duke University, NBER and
Campbell R. Harvey Duke University and NBER
Addresses Campbell R. Harvey Duke University, NBER and
Repeating Actions (Loops)
Bitcoin: Data flow.
BEGINNER PROGRAMMING LESSONS
Campbell R. Harvey Duke University and NBER
COMS 161 Introduction to Computing
Campbell R. Harvey Duke University and NBER
Objective Use multiplication properties of exponents to evaluate and simplify expressions.
Addresses Campbell R. Harvey Duke University, NBER and
BEGINNER PROGRAMMING LESSONS
3.8 Newton’s Method How do you find a root of the following function without a graphing calculator? This is what Newton did.
Data Structures and Analysis (COMP 410)
Campbell R. Harvey Duke University and NBER
Zero Knowledge Proofs Campbell R. Harvey Duke University, NBER and
Binary Lesson 4 Hexadecimal and Binary Practice
Getting Started With Alice: The Basics
First Grade Sight Words
More Strings.
Faculty Seminar Series Blockchain Technology
Campbell R. Harvey Duke University and NBER
Duke University and NBER
Cryptographic Hashing Special Session
Campbell R. Harvey Duke University and NBER
Campbell R. Harvey Duke University and NBER
Campbell R. Harvey Duke University and NBER
Bitcoin and Blockchain
Campbell R. Harvey Duke University and NBER
Explore Txs, block, blockchain in Bitcoin
Presentation transcript:

Campbell R. Harvey Duke University and NBER Innovation and Cryptoventures Mining Simulation Campbell R. Harvey Duke University and NBER February 7, 2018 Campbell R. Harvey 2018

Campbell R. Harvey 2018

The Plan Dummy transactions will be hashed to constitute a Merkle tree root The root will be copied into the common (read only) Google doc You copy all the information from the doc into the hashing program and vary the nonce (Do not run the Python program) The maximum nonce size is 232 which is approximately 109 Everyone should start at a different number (say 100, 200, 300..) and then increment by one number at a time. Once you have a leading zero, raise your hand and shout “got it” and let me know the number. Campbell R. Harvey 2018

The Plan I will copy your nonce and winning hash into the Google doc We will verify the solution Add you email to the reward doc I pay the winner 0.001BTC I then start a new block with The winning hash New Merkle root New time Repeat. If blocks are mined too quickly, we will adjust the difficulty Campbell R. Harvey 2018

The Mechanics 80 bytes 4 bytes: version number (same for all miners) 32 bytes: previous block (same for all miners) 32 bytes: hash of the transactions in the candidate block 4 bytes: time stamp (in seconds since 1970-01-01T00:00 UTC) 4 bytes: difficulty of task (same for all miners) 4 bytes: nonce Campbell R. Harvey 2018

The Mechanics Hash of the transactions is a Merkle tree (or hash tree) which includes multiple hashes Merkle root Campbell R. Harvey 2018 HA represents a hash of transaction A

The Mechanics Let’s start with four simplified transactions, and hash each one Marcela pays Camille 1BTC Aaron pays Lee 0.5BTC Rashid pays Soo 0.75BTC Kristen pays Austin 5BTC Campbell R. Harvey 2018

The Mechanics Let’s start with four simplified transactions, and hash each one Marcela pays Camille 1BTC f2bde94f2799978fafd424d815740978ed8903135deec99d85be394214c9bf30 Aaron pays Lee 0.5BTC 4b7f76675d1a597d4e72112b2b547af233c70404816459cdd80a76ccb4ace23f Rashid pays Soo 0.75BTC 63c21062934916398929a1cce7882b15ffc52f828cff9ff957e71f61e8620036 Kristen pays Austin 5BTC 470a8a8aca43f256f603f86ac46947b34a01399109e90c32dc9b91aa1ccee528 Campbell R. Harvey 2018

The Mechanics Hash the two red transactions and the two green transactions 2 Pinks result in 01c3098ca5081a5c63bc62c564497476bb7675a825842490cfa44d4f08dde3d8 2 Blues result in 716916c89f172e3cb340bf244f9917a70c504ae78ffcc0ef542acef5c260fb2e Campbell R. Harvey 2018

The Mechanics Hash the last two hashes Merkle root b236b03111580819a1f5dddf37af5769063f055cd9a8167946bfeb3c095be5da Campbell R. Harvey 2018

The Mechanics 80 bytes: Version: (fixed) 3 Previous block hash: (fixed) 0000000000000000051f5de334085b92ce27c03888c726c9b2bb78069e55aeb6 Merkle root: (variable) b236b03111580819a1f5dddf37af5769063f055cd9a8167946bfeb3c095be5da Time: (variable) 1442663985 Difficulty: (fixed) 403867578 Nonce: (variable) ? Campbell R. Harvey 2018

The Mechanics Blockheader (simplified) 30000000000000000051f5de334085b92ce27c03888c726c9b2bb78069e55aeb6b236b03111580819a1f5dddf37af5769063f055cd9a8167946bfeb3c095be5da 1442663985403867578000001 I added a nonce. I will give you access to a read only Google doc You will copy this into http://www.xorbin.com/tools/sha256-hash-calculator You will then vary the hash. Campbell R. Harvey 2018

The Mechanics Blockheader simplification: All fields are in hex All fields are little endian There is a double hash done – not a single hash The final hash is little endian Note: Miners hashing 80 bytes = 160 hexadecimal = 640 bits Campbell R. Harvey 2018

The Mechanics Other Merkle roots to be used in simulation f8e7aca1004d73a4301fe83e04eb9253307450a2316672d1d763a52c400d9cab 2b83643feafa3e7fa56402b494cb03f11a5057d42c2bbe92e0a3356f89b652f8 cf36545c255be251f22b25a2511c88626d154ba76ac653ea8c80ff4b8d9996e1 c1a35c8516e2ac146e3d15c83ab557b8374e1627b3e5d432a9dee9bd634b4788 9ba5678e7b4cc513f5055c26b63f53a085eabd447dfb13bed05fab4f79067d90 55034981fe26bb64900572f9ab366fc2f152968724d11efda77946b7ebc14682 ba4385a7b0c34656a6628f83572c763d4cae38ce63c9dd89e46a7085aea10e02 ed6c5395ad449613717234e4e3411aa71405309cea108134b2f0fb864327efc5 f6ff2e2618a68b4c76908dd97a054c403647f4f20eba4c233476c1378e9ff6d4 Campbell R. Harvey 2018