BLOCKCHAIN TECHNOLOGY Harness the power of the most disruptive technology since the internet through real life examples! Dr. Jyoti Yadav Department of Computer Science Savitribai Phule Pune University 1
Plan of Attack History of Blockchain Applications of Blockchain Client Server Vs Peer to Peer Systems Centralized Vs Decentralized Vs Distributed Centralized Databases Vs Blockchain What is Blockchain? Understanding SHA256 Hash Immutable Ledger Distributed P2P Network How Mining Works? (The Nonce, Cryptographic Puzzle) Byzantine Fault Tolerance Consensus Protocol (Defense Against Attackers, Competing Chains)
Blockchain History
9 Verticals of Blockchain Transformation Technology Entertainment Media Law & Crime Transportation Government Services Contracts Finance Human Rights & Contributions
Blockchain – Foundational Concepts The Blockchain will do to the Financial System What the Internet did to the Media Harvard Business Review
Client Server System Vs Peer to Peer System 6
Centralized Vs Decentralized Vs Distributed N/W- An Overview
Blockchain Process 9
Inventers of Blockchain
What is Blockchain?
What are the Contents of a Block?
A Blockchain..
Components of Blockchain
Understanding SHA256 Hash Fingerprint is an identifier of a person
Understanding SHA256 Hash Fingerprint is an identifier of a person
Identifying Digital Documents A digital document can be anything from a video, audio, txt file, exe file or an entire OS
Identifying Digital Documents https://tools.superdatascience.com/blockchain/hash/
Passport 21
Inventers of Blockchain 22
23
What is Blockchain? 24
What are the contents of a Block? 25
A Blockchain.. 26
Components of Blockchain 27
Understanding SHA256 Hash 28 Fingerprint is an identifier of a person •https://tools.superdatascience.com/blockchain/hash/ •https://tools.superdatascience.com/blockchain/public-private-keys/signatures
Identifying Digital Documents 29 A digital document can be anything from a video, audio, txt file, exe file or an entire OS
Identifying Digital Documents 30
5 Requirements of a HASH 31
5 Requirements of a HASH 32
5 Requirements of a HASH 33
5 Requirements of a HASH 34
5 Requirements of a HASH 35
In case the collisions are forged 36
IMMUTABLE LEDGER 37
IMMUTABLE LEDGER
An Example 39
Contd. 40
Contd. 41
Components of Blockchain
Distributed P2P Network
Distributed P2P Network 44
A Block being added at every peer 45
If a Block is hacked at some peer 46
The subsequent blocks too are changed 47
The other peers in the network notify the hacked peer about its blockchain being different from theirs. 48
After getting consensus from majority of the peers the hacked peer updates its blockchain 49
What is Mining?
How Mining Works? Block: #3 Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs Prev. Hash : 67SFJK9SJF Hash: 78SD7FSDSD09
Is it so easy to generate the HASH?
Nonce Block: #3 Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs Prev. Hash : 67SFJK9SJF Hash: 78SD7FSDSD09 Nonce:
What controls/dictates the HASH? Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs
Changing Nonce changes the hash Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs
Changing Nonce changes the Hash Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs
Changing Nonce changes the hash dramatically demonstrating Avalanche Effect Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs
A Hash is a number !!! Decimal Equivalent Lowest hash value will contain all 0’s and highest hash value will contain all F’s
A Pool of HASHES
A Pool of HASHES
 The blockchain algorithm will set a target for the miners to accomplish a certain hash. Any hash above the target does not count. The target is set just to make it difficult for the miners or create a hurdle for them.  If a miner finds a hash above the target for the block, the block won’t be created.
Except Nonce nothing in the block can be changed Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs
How Mining Works? Data: X  Y 100 Rs X  Amazon 1000 Rs Y  Z 900 Rs
Contd.
Contd.
Contd.
Contd.
The Miners Win…as they find a hash within the target and the nonce is called the GOLDEN NONCE. The miners can then add the block to the blockchain. The miners also get a reward. The nonce are located randomly in the Hash Pool and are unpredictable.
70 The concept of finding the correct HASH is called the CRYPTOGRAPHIC PUZZLE.
Byzantine Fault Tolerance
One General is a Commander and one could be a traitor. The traitor is unknown and tries to add hurdles in their way so that consensus is not achieved.
A Pool of HASHES
Traitor Highlighted…The Commander can also be a traitor
The commander issues order to ATTACK
But the Traitor sends a message that the Commander told him to RETREAT
The other 2 generals say what the commander orders them
If the commander is a traitor, will the algorithm still work?
Contd.
This is Byzantine Fault Tolerance Applications: Blockchain Airplanes Nuclear Power Plants Rockets
The Consensus Protocol
Consensus Protocol : Defense Against Attackers 83
Attacker tries to attach a block at the end of the chain 84
Consensus Protocol 85
Simultaneously blocks getting added at different peers 86
Types of Consensus Protocols 87
Cracking Hash by guessing the Nonce 88
The miners are rewarded by the network / blockchain for successfully adding the block 89
Miners also get fees that are associated with the transactions in the block which is a monitory incentive 90
How will the network know that a malicious block is being added 91
Some of the checks.. 92
There is difference between mining and verifying things 93
How to resolve conflicts in the chain? 94
Byzantine General Problem 95
Conflicting messages: Use consensus protocol 96
One more block added by the node gets added to all other nodes too 97
Cracking Hash by guessing the Nonce 98
Orphaned blocks 99
Blocks added and consensus achieved 100
Blockchain Demo… 102
Before Mining the block (pink color) 103
After Mining (Green color) 104
Blockchain 105
Before Mining the blocks 106
Distributed Blockchain with Peer A and Peer B 107
Working of Tokens 108
Coinbase Transactions 109

Part 1: Introduction to Blockchain Fundamentals