The document provides a jargon-free introduction to bitcoin and blockchain technology. It discusses wallets, where bitcoins come from through the mining process, and examines a crypto transaction step-by-step. It explains that wallets contain private and public keys, not actual coins. It describes how bitcoins are generated through mining by solving math problems, and how difficulty targets ensure blocks are added every 10 minutes on average. It also shows how transactions are grouped into a Merkle tree and included in blocks along with other data like timestamps and hashes.
13. Where do bitcoins come from?
Fiat Currency Crypto-currency
Controlled by Central Authority (Governments) No Central Authority
Printed when Government decides to print more Miners (human) use special software to solve math
problems are issued new bitcoins in exchange
The special software is called Miner (software)
This special software can be run on specialized hardware
to speed up mining and generate more bitcoins.
This specialized hardware is called Miner (hardware)
24. Cryptographic Hash Functions
â The qualifier âCryptographicâ implies that the hash function
â is computationally efficient - apply transformation quickly,
â is collision resistant - hard to find 2 inputs that result in the
same output
â hides information - hard to infer the input by examining the
output
â looks random - well-distributed output - should look random
â Sometimes referred to as a mathematical meat grinder
â Examples include MD5 (Message Digest 5), SHA-256 (Secure HAsh
256)
â Applications include - Digital Signatures, Cryptocurrencies
31. Transaction Workflow â Everybody can see the ledger
â No one knows your name
â Your identity is represented by your
public key / verification key
â This is what a network looks like,
except...
BTC LEDGER (State of the Network / Account of all Coins)
MIIBOQIBAAJAT+qwrlMhJOkn3VSQQK... 10
FsPkKavfDcE19SFZnuJ4HHA0XMn3xD... 12
TtWttB/pfSh5FT/Wr6B3bRoM7nzWpeq... 13
AiEAnnIGwnywSjvpsecRrp9RTpVqgirn... 50
DesPyX5YO5eXSieI8cV5xs+nDsz6KwIh... 26
WdqKfiE5+YcBAiBP0aaBTe8xk5TNW0hâŠ. 70
wi4V/2ZlZnl6kn+QgtKx+hQC8ZWKvBcb... 123
32. Transaction Workflow â Everybody can see the ledger
â No one knows your name
â Your identity is represented by your
public key / verification key
â No one knows who you are unless they
transact with you in person
Governments and Financial Institutions do not
like this.
BTC LEDGER (State of the Network / Account of all Coins)
MIIBOQIBAAJAT+qwrlMhJOkn3VSQQK... 10
FsPkKavfDcE19SFZnuJ4HHA0XMn3xD... 12
TtWttB/pfSh5FT/Wr6B3bRoM7nzWpeq... 13
AiEAnnIGwnywSjvpsecRrp9RTpVqgirn... 50
DesPyX5YO5eXSieI8cV5xs+nDsz6KwIh... 26
WdqKfiE5+YcBAiBP0aaBTe8xk5TNW0hâŠ. 70
wi4V/2ZlZnl6kn+QgtKx+hQC8ZWKvBcb... 123
40. Whatâs in a block?
â List of Transactions
â Merkle Root
â Timestamp
â Difficulty Target
â Nonce
â Hash of previous block
41. Difficulty Target
â Difficulty target is a number that regulates how long it takes for miners to
add new blocks to transactions to the blockchain
â The difficulty target adjusts every 2016 blocks (roughly 2 weeks)
Why is Difficulty Target important?
â It ensures that blocks of transactions are added to the blockchain at regular
intervals, even as more miners join the network
42. 1. Difficulty adjusts every 2016 blocks. Letâs assume it takes 2 weeks
(20160 minutes) to add 2016 blocks. This means that each block is
expected to be added in 10 min.
TExpected = 10
2. Letâs say more miners joined the network and it took miners, an average
of 9 min per block.
TActual = 9
3. Calculate (TExpected /TActual) = 1.1
4. New Difficulty (DNEW) = DCURRENT X 1.1
Difficulty Target Calculation
43. How does Difficulty control time between
blocks?
Letâs play a simple math game.
Assumptions:
â You are given a range of numbers 1-100 where 100 is the RANGEMAX
â You randomly generate a number between 1 and 100 every minute
Objective:
â Generate a number below my TARGET
48. If instead of providing you the TARGET, I provided you ANOTHER_NUMBER by which
to divide the RANGEMAX , we would get the the same result
This ANOTHER_NUMBER is called DIFFICULTY_TARGET
ANOTHER_NUMBER TARGET
(RANGEMAX/ANOTHER_NUMBER)
Time to reach objective
2 50 2 min
5 20 5 min
10 10 10 min
How does Difficulty control time between
blocks?
49. â Our assumptions from previous activity are ridiculous for real-world
implementations
â Miners are able to generate thousands of numbers (hash values) per minute
as opposed to our measly 1 per minute
â To make things worse, there are many miners working on the problem
concurrently
â To make DIFFICULTY_TARGET work, MAX_RANGE needs to be big
â Real world MAX_RANGE looks more like:
8972345609248750982347034985702348957202938547029438750928349847
Real World Numbers
50. â Real world DIFFICULTY_TARGET looks something like this: 13498.928322
â Since MAX_RANGE is a big number, we use hexadecimal system to
represent numbers as opposed to decimal. In reality, MAX_RANGE range
looks more like this:
000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506
Real World Numbers
51. â Difficulty targets control the time it takes to add a block
â Miners are tasked with finding a hash lower than TARGET, as calculated
based upon the MAX_RANGE and DIFFICULTY_TARGET
â Hashes are just numbers represented in Hexadecimal
Summarizing Difficulty Targets
52. Whatâs in a block?
â List of Transactions
â Merkle Root
â Timestamp
â Difficulty Target
â Nonce
â Hash of previous block
54. How is a block made?
Hash of the previous block
(publicly known)
+
Current transactions
+
Nonce
(randomly selected)
HASH IT
Miners are expected to
get a valid hash for
their candidate block
such that the hash of
their block headers is
below the TARGET
55. Revisiting Nonce
âą Nonce is a random integer between 0 and 4,294,967,296
âą Miners have to âguessâ the nonce when theyâre trying to get the hash of
their block headers below a TARGET
âą Typically they do this brute force by incrementing the nonce until they get
a valid hash
59. Transaction Workflow Transaction, once verified, will change the
ledger state to below.
BTC LEDGER (State of the Network / Account of all Coins)
MIIBOQIBAAJAT+qwrlMhJOkn3VSQQK... 10
FsPkKavfDcE19SFZnuJ4HHA0XMn3xD... 22
TtWttB/pfSh5FT/Wr6B3bRoM7nzWpeq... 13
AiEAnnIGwnywSjvpsecRrp9RTpVqgirn... 50
DesPyX5YO5eXSieI8cV5xs+nDsz6KwIh... 26
WdqKfiE5+YcBAiBP0aaBTe8xk5TNW0hâŠ. 70
wi4V/2ZlZnl6kn+QgtKx+hQC8ZWKvBcb... 113
10