SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Blockchain Technology
What is Blockchain:
Blockchain is a decentralized and distributed digital ledger to record transactions across the many nodes in the network, which cannot be
altered retroactively without the altering the subsequent blocks and the collusion with other nodes on the network.
Despite its apparent complexity, a blockchain is just another type of database for recording transactions – one that is copied to all of the
computers in a participating network, making changes to recorded/verified transactions at one node makes irrelevant as the blocks are
added by consensus of nodes
There are huge expectations on Blockchain technology and no one knows really what are the cost impacts, in which domains and precisely
how to implement.
Gartner Hype Cycle for Emerging Technologies – blockchain still has to reach the
peak of inflated expectations – Copyright Gartner all rights reserved – read full article
and view full chart on Forbes
If you see Gartner Hype for emerging technologies
published in 2016, blockchain is still an innovation trigger
and reaching the peak of inflated expectations
Proves that the signer had access to the private key
Sender can encrypt a message using Receiver’ public key and send it to Receiver over an untrusted network so
that Receiver can then decrypt the message using his private key
Hash functions take input data of arbitrary size and deterministically map it to an output of fixed size (typically
smaller than the input size) that resembles random data. SHA256 generates 256 bits
Data structure takes a list of transactions and combines them using a binary tree structure, where the root
node is called the Merkle Root
In order to prevent double-spends, you have to be able to quickly perform the following two database
operations: Lookup if a transaction has already been spent and Insert a new valid transaction
Having nodes communicate directly with one another (as opposed to using a trusted third-party) is unlike
most applications we use on a daily basis.
Works by calculating the hash of a message, along with many different nonces, until you find a resulting digest
that meets a rare criteria.
Blockchain Technology – Technologies
Let us examine Blockchain from Technology perspective. Most Blockchains use six major technologies
Asymmetric Encryption
Transaction Signing
HASH Function – SHA256
Transaction/Block hashing
Merkel Trees
Efficient way to package Txns.
Key-Value Database
Look up previous Txns.
P2P Communication Protocol
Sharing Txns. and Blocks
Proof Of Work
Method to achieve Consensus
Blockchain Technology – Life Cycle
Couple of examples explaining end to end Life Cycle of Blockchain Technology
Courtesy from http://insurancefunda.in/bitcoin-cryptocurrency/
The steps identified here are
• Someone requests a transaction
• Transaction broadcasted to P2P computers (nodes).
• Validation, miners verify the transaction.
• Transactions combined to form a data block.
• New block added to existing Blockchain.
• The transaction is complete.
This image is a cut out from a larger infographic created by Accenture.
The steps identified here are
• Request of transaction is submitted to the network.
• The transaction is validated by the network.
• The verified transaction is combined with other verified transactions into a block in the
blockchain.
• Transaction is complete.
Blockchain Technology - Components
What is Blockchain:
Basic Components in Blockchain architecture are (TXN/Block structure differs between Bitcoin and Ethereum and to avoid
confusion, here I am focusing on Bitcoin)
Decentralized Nodes Distributed LedgerTransaction
TECHNICAL DATA
VERSION
Lock Time (delay)
Number of Inputs
Number of Outputs
INPUTS
Previous TXN Hash/Output Index
Private Unlock Script Script Length
OUTPUT
Amount
Public Locking Script Script Length
Block
TRANSACTION COUNT
Previous TXN Hash/Output Index
Private Unlock
Script
Script Length
BLOCK CONTENT
Coinbase TX Bitcoin TX
HEADER
VERSION
Merkel Root
Previous Block Hash
Timestamp
Difficulty
Nonce
Blockchain Technology – what is what
Hash – SHA-256 • SHA-256 is one of the number of Cryptographic hash functions available
• Hash is like a signature for text or data file
• As the name suggests it generates 256 bits signature irrespective of text size/file size. If you are using an hexadecimal representation, each digit
codes for 4 bits ; so you need 64 digits to represent 256 bits
• Same Hash will be generated every time for the same text.
• Hash cannot be translated back to initial text just due to the fact that there are 2^256 combinations of 256 bits signatures should be tried. To have a
little more illustration, if you take fastest Super computer available today which has 10.5 Petaflops, it takes a little over Billion years to guess the
string that generated the HASH
• User Selects a string of letters/numbers and Special characters as a key
to Initiate transaction. This is Private key.
• Using this Private Key, user generates Public Key (SHA256 hash),
which can be shared across the network to receive the funds, records,
transactions, files etc..
• So in other words your Security key/text hash itself is your Public Key.
For instance If A would like to send amount to B.
• If A has no public key or lost the Public key, generates Public key with
Secret key. If A’s secret key is (I am A), public key will be generated as
(7170DE91DAD405CEE38CFE24DDE3F686B7EE37198A466E6DD6226CBD84E4E
457)
• A requests Public key of B
• If B has public key, logs into the system, with the name B is
comfortable (bob_played_baseball) will generates Public
Key(1FAE99945313EE181FBC3FBAC5C2C5887334F807B0AEC85566715237DBF
429C6) and share the Public key with A
• A logs into system and with Public key of A initiates transaction to send
information/money to B’ Public Key
Here is the html link to see how the hash SHA256 will be generated. Try it your self (probably you might
have to adjust the viewing area
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
Blockchain Technology - what is what
Transactions • Transaction is basically an entry in the ledger having details no more than Originator, Receiver, details related to transfer and timestamp
• Transactions are signed by the Originator with his/her Secret Key, part of Public key
• Transactions from Multiple users are bundled and distributed to the different nodes (decentralized) periodically as unconfirmed blocks
• Each node validates and authenticates the transactions in the block against the distributed databases existing with each of the node
• Transactions get accepted in the ledger when a sufficiently large number of parties reach a consensus on a batch of transactions or block being
valid.
• If you think of blockchain as a ledger book, then each block is a page in the ledger and each transaction is an individual asset transfer on a ledger page.
• Data within the blockchain is actually not encrypted and at the same time cannot be altered.
Format of Transaction:
Transactions contain one-or-more inputs and one-or-more outputs.
• An input is a reference to always output from a previous transaction
• An output specifies an amount and a address .
Input
0.75
Input
2.25
Output
3.00
Input
3.00
Output
1.00
Output
1.25
Output
0.75
Linked Transactions
Transaction
TECHNICAL DATA
VERSION
Lock Time (delay)
Number of Inputs
Number of Outputs
INPUTS
Previous TXN Hash/Output Index
Private Unlock Script Script Length
OUTPUT
Amount
Public Locking Script Script Length
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
Blockchain Technology - what is what
Block Blocks are data structures whose purpose is to bundle transactions and distribute to all nodes in the network
Block are created by process called Mining, Mining is the process of adding transaction records to public ledger of past transactions
Users create transactions and submit them to the network, where they sit in a pool waiting to be included in a block.
Blocks contain a block header, which is the metadata that helps to verify the validity of a block.
Block
TRANSACTION COUNT
Previous TXN Hash/Output Index
Private Unlock Script Script Length
BLOCK CONTENT
Coinbase TX Bitcoin TX
HEADER
VERSION
Merkel Root
Previous Block Hash
Timestamp
Difficulty
Nonce
Typical block metadata contains:
 version - the current version of the block structure
 previous block header hash - the reference this block's parent block
 Merkle Root hash - a cryptographic hash of all of the transactions included in this
block
 time - the time that this block was created
 nBits - the current difficulty that was used to create this block
 nonce ("number used once") - a random value that the creator of a block is
allowed to manipulate however they so choose
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
Blockchain Technology - what is what
Block
Merkle Root hash - a cryptographic hash of all of the transactions included in this block
Merkel Root
HABCD
Hash (HAB + HCD)
HAB
HA (Hash of Txn. A)
HB (Hash of Txn. B)
HCD
HC (Hash of Txn. C)
HD (Hash of Txn. D)
An arbitrary number miners change to modify the header hash in order to produce a hash less
than or equal to the target threshold.
Target threshold is defined in the block header as
Merkel Root Hash
nonce
nbits
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
Blockchain Technology - what is what
Key-Value Base • In the entire Blockchain, miners will not have a clue whether the sender has sufficient funds/inputs to transfer to the receiver.
• Key-Value base or Coinbase maintains the transactions value of each transaction between two parties
• Miner system checks the last block where in Sender received the currency/asset to validate whether Sender has sufficient assets to transfer
• Coinbase blocks are distributed across all the nodes in the network
• As these are distributed across and validations basically results creation of Block in Blockchain, any change in any block will be rejected due to
confirmation of Block by consensus
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
Blockchain Technology - what is what
Mining
Is a process by which transactions are verified and added to the public ledger, known as the block chain.
Key component that need to be met by Miner to make a Block valid and added to Block chain is Target Difficulty, defines proof of work.
Target is generated by Network and defines what makes Black’ hash Valid or not
If the Hash of block is higher than Target, it is not valid.
For instance if Target is 1,931,136,454,487.72, combined hash of block (including all the contents in block like txns, header etc..) will be
00000000000000000020c60222099aaebc6e7795784f74628ec640b223d3d339
Miner needs to keep changing nonce (number used once) to arrive at the Hash for the black less than Target hash and should contain same leading zeros (18 here)
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
InsertingNewBlocktoBlockchain
Combined Hash <
Target Hash
Start Proposed New Block
Hash of most recent Block
Combined Hash
SHA 256
nonce
Nonce + 1No
Combined Hash will be Block Hash and
Block is update to local Block Chain
Yes
Block is distributed to Peers in the
network
Block is validated by peers
Block Valid
Yes
Other Miners update their local
copy
No
Block Rejected
Is Block Valid?
Blockchain Technology - what is what
Blockchain Miner creates a block by
1. Gathering a set of pending transactions, prioritizing those with transaction fees
2. Verifying the transactions
3. Solving a hashing problem
4. Validating the block with peers
Verification of Block by peers
• Miner distributes completed block among peers for validation and acceptance
• Miners validates blocks
 Block header hash is less than the target
 Block size is within acceptable limits
 Block timestamp is less than two hours in the future.
 The first transaction is a coinbase transaction ( and only the first )
 The coinbase transaction has a valid reward.
 All transactions within the blocks are valid ( also have a checklist on their own )
Every node validates independently new blocks following the exact same rules. This assures that miners cannot cheat. This is a key component of the decentralized consensus.
If the block is valid, the other miners will update their own copy of the blockchain with the new block.
Hash of this newly created Block will be used as an Input to the Next Block
Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
Distributed

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectIntroduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger Project
Manuel Garcia
 

Was ist angesagt? (20)

J.burke HackMiami6
J.burke HackMiami6J.burke HackMiami6
J.burke HackMiami6
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
 
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
 
IDC - Blockchain Threat Model
IDC - Blockchain Threat ModelIDC - Blockchain Threat Model
IDC - Blockchain Threat Model
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Weaving the ILP Fabric into Bigchain DB
Weaving the ILP Fabric into Bigchain DBWeaving the ILP Fabric into Bigchain DB
Weaving the ILP Fabric into Bigchain DB
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorial
 
How to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumHow to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on Ethereum
 
Developing Business Blockchain Applications on Hyperledger
Developing Business  Blockchain Applications on Hyperledger Developing Business  Blockchain Applications on Hyperledger
Developing Business Blockchain Applications on Hyperledger
 
Front-End Development for dApps on Tezos
Front-End Development for dApps on TezosFront-End Development for dApps on Tezos
Front-End Development for dApps on Tezos
 
POA based Side-Chain Architecture
POA based Side-Chain ArchitecturePOA based Side-Chain Architecture
POA based Side-Chain Architecture
 
20190606 blockchain101
20190606 blockchain10120190606 blockchain101
20190606 blockchain101
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus Algorithms
 
Introduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger ProjectIntroduction to Blockchain and the Hyperledger Project
Introduction to Blockchain and the Hyperledger Project
 
Blockchain On Azure
Blockchain On AzureBlockchain On Azure
Blockchain On Azure
 
Hyperledger fabric 3
Hyperledger fabric 3Hyperledger fabric 3
Hyperledger fabric 3
 
Technical Overview of Tezos
Technical Overview of TezosTechnical Overview of Tezos
Technical Overview of Tezos
 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618
 

Ähnlich wie Blockchain Demystified

BlockChain Techonology - Unit 1.pptx
BlockChain Techonology   -   Unit 1.pptxBlockChain Techonology   -   Unit 1.pptx
BlockChain Techonology - Unit 1.pptx
os3558995
 

Ähnlich wie Blockchain Demystified (20)

blockchain class 3.pdf
blockchain class 3.pdfblockchain class 3.pdf
blockchain class 3.pdf
 
Chapter 2.pptx
Chapter 2.pptxChapter 2.pptx
Chapter 2.pptx
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain Fundamental_KIPMI_2022.02.26.pdf
Blockchain Fundamental_KIPMI_2022.02.26.pdfBlockchain Fundamental_KIPMI_2022.02.26.pdf
Blockchain Fundamental_KIPMI_2022.02.26.pdf
 
blockchain.pptx
blockchain.pptxblockchain.pptx
blockchain.pptx
 
Blockchain ppt
Blockchain pptBlockchain ppt
Blockchain ppt
 
Architecture and operations.pptx
Architecture and operations.pptxArchitecture and operations.pptx
Architecture and operations.pptx
 
Blockchain Fundamentals
Blockchain FundamentalsBlockchain Fundamentals
Blockchain Fundamentals
 
Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rez
 
BlockChain Techonology - Unit 1.pptx
BlockChain Techonology   -   Unit 1.pptxBlockChain Techonology   -   Unit 1.pptx
BlockChain Techonology - Unit 1.pptx
 
Blockchain_TezosDeveloperCommunitySNSCE.pdf
Blockchain_TezosDeveloperCommunitySNSCE.pdfBlockchain_TezosDeveloperCommunitySNSCE.pdf
Blockchain_TezosDeveloperCommunitySNSCE.pdf
 
Introduction to Blockchain Web3 Session
Introduction to Blockchain Web3 SessionIntroduction to Blockchain Web3 Session
Introduction to Blockchain Web3 Session
 
Blockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency RegulationsBlockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency Regulations
 
Blockchain Corporate Style
Blockchain Corporate StyleBlockchain Corporate Style
Blockchain Corporate Style
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Blockchain data structures and fundamental
Blockchain data structures and fundamentalBlockchain data structures and fundamental
Blockchain data structures and fundamental
 
Blockchain - Things you need to know
Blockchain - Things you need to knowBlockchain - Things you need to know
Blockchain - Things you need to know
 
Introduction to Blockchain
Introduction to Blockchain Introduction to Blockchain
Introduction to Blockchain
 
Blockchain tutorial
Blockchain tutorial Blockchain tutorial
Blockchain tutorial
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

Blockchain Demystified

  • 1. Blockchain Technology What is Blockchain: Blockchain is a decentralized and distributed digital ledger to record transactions across the many nodes in the network, which cannot be altered retroactively without the altering the subsequent blocks and the collusion with other nodes on the network. Despite its apparent complexity, a blockchain is just another type of database for recording transactions – one that is copied to all of the computers in a participating network, making changes to recorded/verified transactions at one node makes irrelevant as the blocks are added by consensus of nodes There are huge expectations on Blockchain technology and no one knows really what are the cost impacts, in which domains and precisely how to implement. Gartner Hype Cycle for Emerging Technologies – blockchain still has to reach the peak of inflated expectations – Copyright Gartner all rights reserved – read full article and view full chart on Forbes If you see Gartner Hype for emerging technologies published in 2016, blockchain is still an innovation trigger and reaching the peak of inflated expectations
  • 2. Proves that the signer had access to the private key Sender can encrypt a message using Receiver’ public key and send it to Receiver over an untrusted network so that Receiver can then decrypt the message using his private key Hash functions take input data of arbitrary size and deterministically map it to an output of fixed size (typically smaller than the input size) that resembles random data. SHA256 generates 256 bits Data structure takes a list of transactions and combines them using a binary tree structure, where the root node is called the Merkle Root In order to prevent double-spends, you have to be able to quickly perform the following two database operations: Lookup if a transaction has already been spent and Insert a new valid transaction Having nodes communicate directly with one another (as opposed to using a trusted third-party) is unlike most applications we use on a daily basis. Works by calculating the hash of a message, along with many different nonces, until you find a resulting digest that meets a rare criteria. Blockchain Technology – Technologies Let us examine Blockchain from Technology perspective. Most Blockchains use six major technologies Asymmetric Encryption Transaction Signing HASH Function – SHA256 Transaction/Block hashing Merkel Trees Efficient way to package Txns. Key-Value Database Look up previous Txns. P2P Communication Protocol Sharing Txns. and Blocks Proof Of Work Method to achieve Consensus
  • 3. Blockchain Technology – Life Cycle Couple of examples explaining end to end Life Cycle of Blockchain Technology Courtesy from http://insurancefunda.in/bitcoin-cryptocurrency/ The steps identified here are • Someone requests a transaction • Transaction broadcasted to P2P computers (nodes). • Validation, miners verify the transaction. • Transactions combined to form a data block. • New block added to existing Blockchain. • The transaction is complete. This image is a cut out from a larger infographic created by Accenture. The steps identified here are • Request of transaction is submitted to the network. • The transaction is validated by the network. • The verified transaction is combined with other verified transactions into a block in the blockchain. • Transaction is complete.
  • 4. Blockchain Technology - Components What is Blockchain: Basic Components in Blockchain architecture are (TXN/Block structure differs between Bitcoin and Ethereum and to avoid confusion, here I am focusing on Bitcoin) Decentralized Nodes Distributed LedgerTransaction TECHNICAL DATA VERSION Lock Time (delay) Number of Inputs Number of Outputs INPUTS Previous TXN Hash/Output Index Private Unlock Script Script Length OUTPUT Amount Public Locking Script Script Length Block TRANSACTION COUNT Previous TXN Hash/Output Index Private Unlock Script Script Length BLOCK CONTENT Coinbase TX Bitcoin TX HEADER VERSION Merkel Root Previous Block Hash Timestamp Difficulty Nonce
  • 5. Blockchain Technology – what is what Hash – SHA-256 • SHA-256 is one of the number of Cryptographic hash functions available • Hash is like a signature for text or data file • As the name suggests it generates 256 bits signature irrespective of text size/file size. If you are using an hexadecimal representation, each digit codes for 4 bits ; so you need 64 digits to represent 256 bits • Same Hash will be generated every time for the same text. • Hash cannot be translated back to initial text just due to the fact that there are 2^256 combinations of 256 bits signatures should be tried. To have a little more illustration, if you take fastest Super computer available today which has 10.5 Petaflops, it takes a little over Billion years to guess the string that generated the HASH • User Selects a string of letters/numbers and Special characters as a key to Initiate transaction. This is Private key. • Using this Private Key, user generates Public Key (SHA256 hash), which can be shared across the network to receive the funds, records, transactions, files etc.. • So in other words your Security key/text hash itself is your Public Key. For instance If A would like to send amount to B. • If A has no public key or lost the Public key, generates Public key with Secret key. If A’s secret key is (I am A), public key will be generated as (7170DE91DAD405CEE38CFE24DDE3F686B7EE37198A466E6DD6226CBD84E4E 457) • A requests Public key of B • If B has public key, logs into the system, with the name B is comfortable (bob_played_baseball) will generates Public Key(1FAE99945313EE181FBC3FBAC5C2C5887334F807B0AEC85566715237DBF 429C6) and share the Public key with A • A logs into system and with Public key of A initiates transaction to send information/money to B’ Public Key Here is the html link to see how the hash SHA256 will be generated. Try it your self (probably you might have to adjust the viewing area Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
  • 6. Blockchain Technology - what is what Transactions • Transaction is basically an entry in the ledger having details no more than Originator, Receiver, details related to transfer and timestamp • Transactions are signed by the Originator with his/her Secret Key, part of Public key • Transactions from Multiple users are bundled and distributed to the different nodes (decentralized) periodically as unconfirmed blocks • Each node validates and authenticates the transactions in the block against the distributed databases existing with each of the node • Transactions get accepted in the ledger when a sufficiently large number of parties reach a consensus on a batch of transactions or block being valid. • If you think of blockchain as a ledger book, then each block is a page in the ledger and each transaction is an individual asset transfer on a ledger page. • Data within the blockchain is actually not encrypted and at the same time cannot be altered. Format of Transaction: Transactions contain one-or-more inputs and one-or-more outputs. • An input is a reference to always output from a previous transaction • An output specifies an amount and a address . Input 0.75 Input 2.25 Output 3.00 Input 3.00 Output 1.00 Output 1.25 Output 0.75 Linked Transactions Transaction TECHNICAL DATA VERSION Lock Time (delay) Number of Inputs Number of Outputs INPUTS Previous TXN Hash/Output Index Private Unlock Script Script Length OUTPUT Amount Public Locking Script Script Length Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
  • 7. Blockchain Technology - what is what Block Blocks are data structures whose purpose is to bundle transactions and distribute to all nodes in the network Block are created by process called Mining, Mining is the process of adding transaction records to public ledger of past transactions Users create transactions and submit them to the network, where they sit in a pool waiting to be included in a block. Blocks contain a block header, which is the metadata that helps to verify the validity of a block. Block TRANSACTION COUNT Previous TXN Hash/Output Index Private Unlock Script Script Length BLOCK CONTENT Coinbase TX Bitcoin TX HEADER VERSION Merkel Root Previous Block Hash Timestamp Difficulty Nonce Typical block metadata contains:  version - the current version of the block structure  previous block header hash - the reference this block's parent block  Merkle Root hash - a cryptographic hash of all of the transactions included in this block  time - the time that this block was created  nBits - the current difficulty that was used to create this block  nonce ("number used once") - a random value that the creator of a block is allowed to manipulate however they so choose Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
  • 8. Blockchain Technology - what is what Block Merkle Root hash - a cryptographic hash of all of the transactions included in this block Merkel Root HABCD Hash (HAB + HCD) HAB HA (Hash of Txn. A) HB (Hash of Txn. B) HCD HC (Hash of Txn. C) HD (Hash of Txn. D) An arbitrary number miners change to modify the header hash in order to produce a hash less than or equal to the target threshold. Target threshold is defined in the block header as Merkel Root Hash nonce nbits Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
  • 9. Blockchain Technology - what is what Key-Value Base • In the entire Blockchain, miners will not have a clue whether the sender has sufficient funds/inputs to transfer to the receiver. • Key-Value base or Coinbase maintains the transactions value of each transaction between two parties • Miner system checks the last block where in Sender received the currency/asset to validate whether Sender has sufficient assets to transfer • Coinbase blocks are distributed across all the nodes in the network • As these are distributed across and validations basically results creation of Block in Blockchain, any change in any block will be rejected due to confirmation of Block by consensus Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed
  • 10. Blockchain Technology - what is what Mining Is a process by which transactions are verified and added to the public ledger, known as the block chain. Key component that need to be met by Miner to make a Block valid and added to Block chain is Target Difficulty, defines proof of work. Target is generated by Network and defines what makes Black’ hash Valid or not If the Hash of block is higher than Target, it is not valid. For instance if Target is 1,931,136,454,487.72, combined hash of block (including all the contents in block like txns, header etc..) will be 00000000000000000020c60222099aaebc6e7795784f74628ec640b223d3d339 Miner needs to keep changing nonce (number used once) to arrive at the Hash for the black less than Target hash and should contain same leading zeros (18 here) Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed InsertingNewBlocktoBlockchain Combined Hash < Target Hash Start Proposed New Block Hash of most recent Block Combined Hash SHA 256 nonce Nonce + 1No Combined Hash will be Block Hash and Block is update to local Block Chain Yes Block is distributed to Peers in the network Block is validated by peers Block Valid Yes Other Miners update their local copy No Block Rejected Is Block Valid?
  • 11. Blockchain Technology - what is what Blockchain Miner creates a block by 1. Gathering a set of pending transactions, prioritizing those with transaction fees 2. Verifying the transactions 3. Solving a hashing problem 4. Validating the block with peers Verification of Block by peers • Miner distributes completed block among peers for validation and acceptance • Miners validates blocks  Block header hash is less than the target  Block size is within acceptable limits  Block timestamp is less than two hours in the future.  The first transaction is a coinbase transaction ( and only the first )  The coinbase transaction has a valid reward.  All transactions within the blocks are valid ( also have a checklist on their own ) Every node validates independently new blocks following the exact same rules. This assures that miners cannot cheat. This is a key component of the decentralized consensus. If the block is valid, the other miners will update their own copy of the blockchain with the new block. Hash of this newly created Block will be used as an Input to the Next Block Hash – SHA-256 BlockTransactions Key-Value Base Mining Blockchain Distributed Distributed

Hinweis der Redaktion

  1. How did it Start : In the beginning, there was one transaction. It had no inputs, it just had an output crediting an address (owned by Bob) some value. There were no inputs, because, well, an input references the output of a previous transaction. This is the first transaction. So no inputs. Eventually, Bob will want to spend that value by transferring it to someone else (Alice). So Bob creates a transaction. That transaction has one input, which is a reference to the output of that very first transaction - remember: Bob controls the keys to the address that the original output credits. That transaction has one output, which is some public address to which Alice holds the private key, and an amount of currency to be sent. Now Alice controls this value. By virtue of her private key, she is able to sign off on another transaction that sends up to the amount she received to a different address, controlled by some other entity. It is this simple value-transfer mechanism using "transactions" over time that create a blockchain. As each transaction occurs, it gets added to the blockchain ledger, leading us to the next topic: blocks, miners, and verification.