SlideShare a Scribd company logo
Intro to Blockchain
And, by the way, what the
heck is proof-of-work?
By Jim Flynn
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
About Jim Flynn
●
Started built & sold tech companies
●
Jobs:
– Software engineer
– Hardware engineer
– Sales executive, CEO, etc.
●
More at jamespflynn.com
●
www.linkedin.com/in/jamespeterf
Agenda
Blockchain Overview1 Blockchain/bitcoin Overview1
Blockchain Overview1 Understanding Proof of Work2
Blockchain Overview1 Proof of Work Demo3
In the beginning...
..or rather
2008
Bitcoin’s Techno-Libertarian Roots
●
Skeptical of authority
●
Dislike centralized power
●
Protective of privacy
●
Alarmed about surveillance
●
Oh yeah, hates taxes
Enter Satoshi Nakamoto
J
?
“A purely peer-to-peer version of electronic cash would
allow online payments to be sent directly from one party
to another without going through a financial institution.”
Satoshi’s Crypto-Currency Commandments
Thou Shalt NOT: Thou Shalt:
1. worship centralized authorities
2. covet they neighbor’s bitcoin
(except with the right private key)
3. alter completed transaction
4. inflate
5. double spend
1. govern thyselves by cons
2. rely’th on incentives
3. have faith in cryptograph
for the geeks shall inherit th
earth
Blockchain Defined
●
Distributed database
●
Good for time-ordered data
●
Not owned or controlled by one entity (bitcoin’s case)
●
Each block connected to previous block
●
Anyone can validate the ledger, which contains a
record of every transaction.
Traditional Way
Our
Business
Our
DB
We did pay!
Your
Business
Your
DB
They didn’t pay!
Bank
Bank
DB
Did they pay?
Blockchain Way
Our
Business
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
N
Blockchain - Distributed Ledger
Transaction Block
shows if they paid.
Your
Business
Blockchain Way
Our
Business
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
N
Your
Business
Business
1
Business
2
Business
3
Business
4
Business
5
Business
5
Business
6
Business
7
Business
8
Business
9
Business
10
Business
3 Business
Business
Business
Business
Business
Business
Business
Business
Business
Business
Business
Business
Business
Business
Business
Blockchain = Shared Distributed Truth
My database
says X.
My database
says Y.
Blockchain = Shared Distributed Truth
My database
says X.
My database
says Y.
The blockchain says Z.
What does “hash” mean to you?
●
Creates a “fingerprint” of data
– Ex: Hash(“123”) = c74b6bd9a2f7648a
●
SHA256 (used in bitcoin)
– Easily-verified from data
– Cannot recreate the data
Hashes Ensure Blockchain Integrity
TX
Block
0
hash
TX
Block
1
hash
TX
Block
2
hash ...
TX
Block
N
hash
2009 2017
hash hash hash
Hashes Ensure Blockchain Integrity
TX
Block
0
hash
TX
Block
1
hash
TX
Block
2
hash ...
TX
Block
N
hash
2009 2017
hash hash hash
Hashes Ensure Blockchain Integrity
TX
Block
0
hash
TX
Block
1
hash
TX
Block
2
hash ...
TX
Block
N
hash
2009 2017
hash hash hash
Bitcoin Identity
●
You get paid to your public key
– 02a1633cafcc01ebfb6d78e39f687a1f0995c62fc95f51ead10a02ee0be551b5dc
●
You pay with your private key
●
No issuing authority
Is Bitcoin Anonymous?
Dread Pirate Roberts
NobDeath from Above
French Maid
Flush
Number13
Is Bitcoin Anonymous?
Dread Pirate Roberts
NobDeath from Above
French Maid
Flush
Number13
Adding Blocks in Bitcoin
●
Uses “proof-of-work”
●
“Miners” compete to add blocks
– More hash power = higher probability to win
– Reward: 12.5 bitcoins and transaction fees
– Puzzle solved (new block) about every 10 minutes
– Puzzle difficulty adjusted ever two weeks
●
Nodes recognize the longest valid chain
Mining
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
Miner 1 Miner 2
Prop.
TX
Block
7
Prop.
TX
Block
7
1. Miners race to solve puzzle.
2. Whoever wins, gets to set the next
block & gets a reward.
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
Mining
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
Miner 1 Miner 2
Prop.
TX
Block
7
Prop.
TX
Block
7
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
Mining
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
Miner 1 Miner 2
Prop.
TX
Block
7
TX
Block
7
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
TX
Block
0
TX
Block
1
TX
Block
2
TX
Block
3
TX
Block
5
TX
Block
6
TX
Block
7
TX
Block
7
ASIC
Application Specific Integrated Circuit
Mining Pools
Bitcoin Mining Now
“On a high-end desktop...it would take you several hundred
thousand years on average at the early-2015 difficulty level (267
)
to find a valid block.”
Don’t try this at home.
Bitcoin and Cryptocurrency Technologies
Princeton University Press, 2016
Page 112
What the fork?
●
Forks happen when nodes disagree about the longest valid chain.
●
Forks can cause havoc.
●
Built-in incentives to discourage forks.
Scripting
●
Very basic in bitcoin
●
Far more advanced in Ethereum
Simplified Smart Contract Example
parentState = SSA.lookupState(‘055051805’)
kidMaried = MA.lookupMarriageLic(‘055051805’)
publicKey = ‘02a1633cafcc01ebfb6d78e39f6’
If parentState = “Dead” then
If kidMarried = “True” then
Pay(kid.publicKey)
Marriage
Licenses
Death
Records
Beyond Cryptocurrency
●
Supply chains
●
Decentralized organizations
●
Tracking physical assets
●
eVoting
●
Sharing economy – IoT & micropayments
Crypto-coins Galore
Bitcoin Ether Litecoin
Dogecoin
Dash
NEMPeercoin Primecoin Gridcoin
MoneroRipple
Ready to dive in?
Proof of Work
(POW)
●
Look at some code
●
Run some tests
POW = Solve a Puzzle
Find a number that, when combined with
the transaction data, hashes to a value
that’s less than a given tolerance.
1 10 trillion
Probability that a hash will be any one number
on continuum that is within the tolerance is 50%
of 1/10 trillion.
50% change of winning in one try.
Tolerance = 5T
Losing
hashes
Winning
hashes
Half the Time You’re a Winner!
Range of possible hash values
10% change of winning in one try.
10% of the Time You’re a Winner.
1 10 trillion
Losing
hashes
Winning
hashes
Range of possible hash values
Tolerance = 1T
for ( $nonce = 1; $nonce <= $maxTries; $nonce++ )
{
$hash = hash('sha256', $transaction . $nonce);
$start = substr($hash, 0, $zeros);
if ( $start === $lead )
{
echo "<br/>Success! Puzzle solved with nonce = $nonce $end";
echo "Try #" . number_format($nonce) . ": Hash("$transaction.09$nonce")=$hash $end";
break;
}
elseif ($details == "yes") echo "Try #" . number_format($nonce) . ": Hash("$transaction.$nonce")=$hash $end";
}
Solving the Puzzle in Php Code
Loop through nonce values from 1 to the max times you want to try
End Loop
Solving the Puzzle in Pseudo Code
Compute hash of transaction text concatenated with the nonce
If the hash starts with the minimum number of zeros then
Display a success message
Stop
Let’s play!
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
POW Alternative: Proof of Stake
●
Does not waste as much electricity
●
Vulnerable to a “rewriting history” attack
●
e.g., Peercoin
POW Alternative: Proof of Burn
●
Prove the you made coins unspendable
●
Sometimes used to transfer to new currency
https://assets.kpmg.com/content/dam/kpmg/pdf/2016/06/kpmg-blockchain-consensus-mechanism.pdf
Google: kpmg blockchain consensus
Thanks!
Don’t forget to check my blog
for code and this presentation.
http://jamespflynn.com

More Related Content

PPTX
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
PDF
Intro to Blockchain Slides
PDF
Economías criptográficas
PDF
Blockchain
PDF
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
PPTX
Best practices to build secure smart contracts
PDF
Vilnius blockchain club 20170413 consensus
PDF
Introduction to Ethereum
Consensus Algorithms - Nakov @ jProfessionals - Jan 2018
Intro to Blockchain Slides
Economías criptográficas
Blockchain
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
Best practices to build secure smart contracts
Vilnius blockchain club 20170413 consensus
Introduction to Ethereum

What's hot (20)

PDF
Boolberry reduces blockchain bloat
PDF
PPTX
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
PPTX
Overview of Blockchain Consensus Mechanisms
PDF
Bitcoin, Banking and the Blockchain
PPTX
The Blockchain and JavaScript
PDF
Blockchain overview, use cases, implementations and challenges
PPTX
Intro into blockchain
PPTX
Understanding blockchain
PPTX
Build your own block chain
ODP
CBGTBT - Part 2 - Blockchains 101
PPTX
Blockchains 101
PDF
Ethereum Blockchain explained
PPTX
Bitcoin, Blockchain and the Crypto Contracts - Part 2
PPTX
Blockchain Corporate Style
ODP
CBGTBT - Part 3 - Transactions 101
PDF
gething started - ethereum & using the geth golang client
PPTX
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
PDF
Metadata in the Blockchain: The OP_RETURN Explosion
PPTX
Blockchain and bitcoin fundamentals (usages and applications)
Boolberry reduces blockchain bloat
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Overview of Blockchain Consensus Mechanisms
Bitcoin, Banking and the Blockchain
The Blockchain and JavaScript
Blockchain overview, use cases, implementations and challenges
Intro into blockchain
Understanding blockchain
Build your own block chain
CBGTBT - Part 2 - Blockchains 101
Blockchains 101
Ethereum Blockchain explained
Bitcoin, Blockchain and the Crypto Contracts - Part 2
Blockchain Corporate Style
CBGTBT - Part 3 - Transactions 101
gething started - ethereum & using the geth golang client
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
Metadata in the Blockchain: The OP_RETURN Explosion
Blockchain and bitcoin fundamentals (usages and applications)
Ad

Similar to Intro to Blockchain - And, by the way, what the heck is proof-of-work? (20)

PPTX
IEEE ICDM 2018 Tutorial on Blockchain Data Analytics
PPTX
Introduction to Blockchain
PPTX
Fundamentals of Blockchain Technology
PDF
Blockchain and Formal verification (English)
PPTX
Bruno Lowagie (iText) #cfoconferenz
PPTX
SMART Seminar Series: "Blockchain and its Applications". Presented by Prof Wi...
PPTX
Introduction to Blockchain Web3 Session
PDF
Introduction to Blockchains
PPTX
The Blockchain
PPTX
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
PPTX
Bitcoin
PDF
Blockchain Fundamentals
PDF
Bitcoins: Application of blockchain technology
PPTX
Blockchain-Presentation.pptx
PPTX
The curious case of Blockchain Technology
PDF
Introduction to Blockchain
PDF
Bitcoin
PPTX
BLOCKCHAIN PPT.pptx
PPTX
Block chain and its basic terminology include mining
PPTX
A research-oriented introduction to the cryptographic currencies (starting wi...
IEEE ICDM 2018 Tutorial on Blockchain Data Analytics
Introduction to Blockchain
Fundamentals of Blockchain Technology
Blockchain and Formal verification (English)
Bruno Lowagie (iText) #cfoconferenz
SMART Seminar Series: "Blockchain and its Applications". Presented by Prof Wi...
Introduction to Blockchain Web3 Session
Introduction to Blockchains
The Blockchain
Cryptocurrencies for Everyone (Dmytro Pershyn Technology Stream)
Bitcoin
Blockchain Fundamentals
Bitcoins: Application of blockchain technology
Blockchain-Presentation.pptx
The curious case of Blockchain Technology
Introduction to Blockchain
Bitcoin
BLOCKCHAIN PPT.pptx
Block chain and its basic terminology include mining
A research-oriented introduction to the cryptographic currencies (starting wi...
Ad

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation theory and applications.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
Building Integrated photovoltaic BIPV_UPV.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Monthly Chronicles - July 2025
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation theory and applications.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx
The AUB Centre for AI in Media Proposal.docx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25 Week I
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)

Intro to Blockchain - And, by the way, what the heck is proof-of-work?