Edited by Suneth Pathirana, PhD
1Edited by:
Dr. Suneth Pathirana, PhD
Department of Computer Science and Informatics
Uva Wellassa University
§ With knowledge contribution of the following Resource Persons:
§ Mr. Chim Hinidumage
§ CEO/Co-Founder Fidenz Technologies
§ Dr. Chandana Gamage
§ Senior Lecturer, Department of Computer Science &Engineering, University of Moratuwa
§ Dr. Srinath Perera
§ WSO2 Technologies
§ Dr. Kutila Gunasekara
§ Senior Lecturer, University of Moratuwa
§ Moderated by:
§ Dr. Chandra Embuldeniya
§ Chairman,Working Committee on Science Technology Engineering Mathematics Education
Edited by Suneth Pathirana, PhD 2
§Blockchain technology was created for the digital cryptocurrency
bitcoin in 2008
§ Bitcoin is a decentralized digital currency
§However, its applications are much wider than digital currency
§Probably “the next big thing” in applied sciences
§Will acquire the attention somewhat similar to:
§ Quantum Computers
§ IoT
§ AI
§Marc Andreessen called Blockchain “one of the most important
technologies since the advent of the Internet.”
Edited by Suneth Pathirana, PhD 3
§Blockchain is a distributed database that provides an
unalterable public record of digital transactions
§It can be viewed as a distributed digital ledger containing a
chain of blocks information, where each block is identified by
a cryptographic signature
§These blocks are all back-linked
§ They refer to the signature of the previous block in the chain, and that
chain can be traced all the way back to the very first block created
§As such, the Blockchain contains an un-editable record of all
the transactions made
Edited by Suneth Pathirana, PhD 4
§Foster Trust
§ Citizens do expect the trustworthiness from their government
§Avoid Coercion
§ Coercion is the action or practice of persuading someone to do something
by using force or threats
§Improve Efficiency
§ Example:Tracking the stages of S/W lifecycle (Cross-validate
Dependencies,Third-party Libraries, Frameworks, etc.)
§Collaboration
§ Example: A building construction (many parties have to collaborate)
Edited by Suneth Pathirana, PhD 5
§ A shop that sells Organic Foods
§ Has to ensure that each product supplied by different supplier is truly
organic
§ Means has not used any synthetic fertilizer / weedicide / pesticide during cultivation
§ And preserved quality without applying any artificial preservatives (chemicals)
§ Has to rely upon the trust on the each step of the supply chain
§ Therefore:
§ Supply chain visibility is important
Edited by Suneth Pathirana, PhD 6
§ As the background Knowledge, we need to understand Some technical terms…
§Hashing
§Transaction & Block
§Block Hash
§Blockchain Ledger
§Node
§Mining
Edited by Suneth Pathirana, PhD 7
§Output in Fixed Length
§Irreversible..!
§Examples of Hash Algorithms
§ MD5
Edited by Suneth Pathirana, PhD 8
§ Set of transactions performed during a time duration
Edited by Suneth Pathirana, PhD 9
Transactions
performed
by John Smith
during last 5
min.s
§Hash(“block_data” + Nonce) = 0xf47b123e67c…93d
§Nonce is nothing but, some Random bits
Edited by Suneth Pathirana, PhD 10
Hash of the
Previous
Block
Some
Transactions
Nonce+ +
Edited by Suneth Pathirana, PhD 11
Header
Transactions
Nonce
Prev. Block
Header
Edited by Suneth Pathirana, PhD 12
Ledger
§Private
§Public
§Hybrid
Edited by Suneth Pathirana, PhD 13
§In cryptocurrency networks, mining is a validation
of transactions
Edited by Suneth Pathirana, PhD 14
Edited by Suneth Pathirana, PhD 15Merkle root? See Next Slide
Edited by Suneth Pathirana, PhD 16
§A Merkle root is the hash of all the hashes of all the
transactions that are part of a block in a blockchain
network
§For the ease of understanding (only), just replace the
Merkle Root with some Transactions…
Edited by Suneth Pathirana, PhD 17
Transactions Transactions Transactions
§Consensus
§ Consensus a general agreement, somewhat like protocol
§No central authority
§ A computer program is responsible for authenticating
§No intermediaries
§No single-point failure
§Tampering (unauthorized altering of data) proof
§Low transaction cost
§Borderless transactions
Edited by Suneth Pathirana, PhD 18
§ Insurance
§ Finance
§ Fraud detection
§ Copyright protection
§ Smart contracts
§ Identity management
§ E-commerce
§ Healthcare
§ Higher education
§ Ex.Track student credentials and achievements in a cheap, secure, reliable and
public way
§ Applicable for Almost All Domains…! (No Limitations)
Edited by Suneth Pathirana, PhD 19
§ To check the originality of a document
§ Example: Passport
§ Each time you obtain new visa, travel abroad and accept foreign currency
from bank, the document is moderated
§ Land Registration
§ Owner / Boundaries might be changed, hence need to to be
updated
§ Registration of Motor Vehicle (RMV) / CR
§ Vehicle import docs (often subject to tamper in SL)
§ Public Beneficiaries i.e. Samurdhi, Mahapola, UPF, EPF/ETF
§ Certificate Verifications i.e Birth, Marriage, death
Edited by Suneth Pathirana, PhD 20
§Who accepts payments using Bitcoin?
§Microsoft
§AT & T
§Burger King
§KFC
§Subway
§Norwegian Airlines
§And many more…
Edited by Suneth Pathirana, PhD 21
Edited by Suneth Pathirana, PhD 22
Edited by Suneth Pathirana, PhD 23
Edited by Suneth Pathirana, PhD 24
§Healthcare
§ Examples: e-Estonia
§Land registration
§ Georgia
§ Andhra Pradesh, India
§ UK / Dubai
§Supply Chain Management
§ IBM Food Trust
§ Fish Industry
§ Example: Bait to Plate
§Many IoT apps
Edited by Suneth Pathirana, PhD 25
Edited by Suneth Pathirana, PhD 26
§Healthcare
§ Examples: e-Estonia
§ https://e-estonia.com/solutions/healthcare/e-health-record/
Edited by Suneth Pathirana, PhD 27
§Land registration
§ Georgia
§ They were not
happy with the
One-Day Service
§ What about Sri
Lanka?
§Digital Gift-Vouchers by Sampath Bank
§VirtualWallet by DFCC Bank (Not Sure!)
§Dynamic (Radio) Spectrum Allocation by University of
Moratuwa
§ Concept Somewhat Similar to Cognitive Radio
§ Cognitive Radio (CR) is an adaptive, intelligent radio and network
technology that can automatically sense (detect) available
channels in a wireless spectrum and change transmission
parameters enabling more communications to run concurrently and
also improve radio operating behavior
Edited by Suneth Pathirana, PhD 28
§Smart Contracts
§ A smart contract is a self-executing contract with the terms of the
agreement between buyer and seller being directly written into lines
of code
§ The code and the agreements contained therein exist across a
distributed, decentralized blockchain network
§ The code controls the execution, and transactions are trackable and
irreversible
§ Blockchain and distributed ledger solutions to address pain points
that include data reconciliation, clearance, and settlement
§ Major global banks and financial intermediaries are working closely
with blockchain companies using the new technology to revamp
legacy systems and infrastructure
Edited by Suneth Pathirana, PhD 29
§Note:This is NOT a Comprehensive Lecture Note
§Consult the Resource Persons who contributed to compile
this knowledge for further reference
§Or feel free to contact me on:
§suneth@uwu.ac.lk
§+94 777777682 (WhatsApp /Viber)
§+94 777170040
Edited by Suneth Pathirana, PhD 30

Introduction to Blockchain Technology

  • 1.
    Edited by SunethPathirana, PhD 1Edited by: Dr. Suneth Pathirana, PhD Department of Computer Science and Informatics Uva Wellassa University
  • 2.
    § With knowledgecontribution of the following Resource Persons: § Mr. Chim Hinidumage § CEO/Co-Founder Fidenz Technologies § Dr. Chandana Gamage § Senior Lecturer, Department of Computer Science &Engineering, University of Moratuwa § Dr. Srinath Perera § WSO2 Technologies § Dr. Kutila Gunasekara § Senior Lecturer, University of Moratuwa § Moderated by: § Dr. Chandra Embuldeniya § Chairman,Working Committee on Science Technology Engineering Mathematics Education Edited by Suneth Pathirana, PhD 2
  • 3.
    §Blockchain technology wascreated for the digital cryptocurrency bitcoin in 2008 § Bitcoin is a decentralized digital currency §However, its applications are much wider than digital currency §Probably “the next big thing” in applied sciences §Will acquire the attention somewhat similar to: § Quantum Computers § IoT § AI §Marc Andreessen called Blockchain “one of the most important technologies since the advent of the Internet.” Edited by Suneth Pathirana, PhD 3
  • 4.
    §Blockchain is adistributed database that provides an unalterable public record of digital transactions §It can be viewed as a distributed digital ledger containing a chain of blocks information, where each block is identified by a cryptographic signature §These blocks are all back-linked § They refer to the signature of the previous block in the chain, and that chain can be traced all the way back to the very first block created §As such, the Blockchain contains an un-editable record of all the transactions made Edited by Suneth Pathirana, PhD 4
  • 5.
    §Foster Trust § Citizensdo expect the trustworthiness from their government §Avoid Coercion § Coercion is the action or practice of persuading someone to do something by using force or threats §Improve Efficiency § Example:Tracking the stages of S/W lifecycle (Cross-validate Dependencies,Third-party Libraries, Frameworks, etc.) §Collaboration § Example: A building construction (many parties have to collaborate) Edited by Suneth Pathirana, PhD 5
  • 6.
    § A shopthat sells Organic Foods § Has to ensure that each product supplied by different supplier is truly organic § Means has not used any synthetic fertilizer / weedicide / pesticide during cultivation § And preserved quality without applying any artificial preservatives (chemicals) § Has to rely upon the trust on the each step of the supply chain § Therefore: § Supply chain visibility is important Edited by Suneth Pathirana, PhD 6
  • 7.
    § As thebackground Knowledge, we need to understand Some technical terms… §Hashing §Transaction & Block §Block Hash §Blockchain Ledger §Node §Mining Edited by Suneth Pathirana, PhD 7
  • 8.
    §Output in FixedLength §Irreversible..! §Examples of Hash Algorithms § MD5 Edited by Suneth Pathirana, PhD 8
  • 9.
    § Set oftransactions performed during a time duration Edited by Suneth Pathirana, PhD 9 Transactions performed by John Smith during last 5 min.s
  • 10.
    §Hash(“block_data” + Nonce)= 0xf47b123e67c…93d §Nonce is nothing but, some Random bits Edited by Suneth Pathirana, PhD 10 Hash of the Previous Block Some Transactions Nonce+ +
  • 11.
    Edited by SunethPathirana, PhD 11 Header Transactions Nonce Prev. Block Header
  • 12.
    Edited by SunethPathirana, PhD 12 Ledger
  • 13.
  • 14.
    §In cryptocurrency networks,mining is a validation of transactions Edited by Suneth Pathirana, PhD 14
  • 15.
    Edited by SunethPathirana, PhD 15Merkle root? See Next Slide
  • 16.
    Edited by SunethPathirana, PhD 16 §A Merkle root is the hash of all the hashes of all the transactions that are part of a block in a blockchain network
  • 17.
    §For the easeof understanding (only), just replace the Merkle Root with some Transactions… Edited by Suneth Pathirana, PhD 17 Transactions Transactions Transactions
  • 18.
    §Consensus § Consensus ageneral agreement, somewhat like protocol §No central authority § A computer program is responsible for authenticating §No intermediaries §No single-point failure §Tampering (unauthorized altering of data) proof §Low transaction cost §Borderless transactions Edited by Suneth Pathirana, PhD 18
  • 19.
    § Insurance § Finance §Fraud detection § Copyright protection § Smart contracts § Identity management § E-commerce § Healthcare § Higher education § Ex.Track student credentials and achievements in a cheap, secure, reliable and public way § Applicable for Almost All Domains…! (No Limitations) Edited by Suneth Pathirana, PhD 19
  • 20.
    § To checkthe originality of a document § Example: Passport § Each time you obtain new visa, travel abroad and accept foreign currency from bank, the document is moderated § Land Registration § Owner / Boundaries might be changed, hence need to to be updated § Registration of Motor Vehicle (RMV) / CR § Vehicle import docs (often subject to tamper in SL) § Public Beneficiaries i.e. Samurdhi, Mahapola, UPF, EPF/ETF § Certificate Verifications i.e Birth, Marriage, death Edited by Suneth Pathirana, PhD 20
  • 21.
    §Who accepts paymentsusing Bitcoin? §Microsoft §AT & T §Burger King §KFC §Subway §Norwegian Airlines §And many more… Edited by Suneth Pathirana, PhD 21
  • 22.
    Edited by SunethPathirana, PhD 22
  • 23.
    Edited by SunethPathirana, PhD 23
  • 24.
    Edited by SunethPathirana, PhD 24 §Healthcare § Examples: e-Estonia §Land registration § Georgia § Andhra Pradesh, India § UK / Dubai §Supply Chain Management § IBM Food Trust § Fish Industry § Example: Bait to Plate §Many IoT apps
  • 25.
    Edited by SunethPathirana, PhD 25
  • 26.
    Edited by SunethPathirana, PhD 26 §Healthcare § Examples: e-Estonia § https://e-estonia.com/solutions/healthcare/e-health-record/
  • 27.
    Edited by SunethPathirana, PhD 27 §Land registration § Georgia § They were not happy with the One-Day Service § What about Sri Lanka?
  • 28.
    §Digital Gift-Vouchers bySampath Bank §VirtualWallet by DFCC Bank (Not Sure!) §Dynamic (Radio) Spectrum Allocation by University of Moratuwa § Concept Somewhat Similar to Cognitive Radio § Cognitive Radio (CR) is an adaptive, intelligent radio and network technology that can automatically sense (detect) available channels in a wireless spectrum and change transmission parameters enabling more communications to run concurrently and also improve radio operating behavior Edited by Suneth Pathirana, PhD 28
  • 29.
    §Smart Contracts § Asmart contract is a self-executing contract with the terms of the agreement between buyer and seller being directly written into lines of code § The code and the agreements contained therein exist across a distributed, decentralized blockchain network § The code controls the execution, and transactions are trackable and irreversible § Blockchain and distributed ledger solutions to address pain points that include data reconciliation, clearance, and settlement § Major global banks and financial intermediaries are working closely with blockchain companies using the new technology to revamp legacy systems and infrastructure Edited by Suneth Pathirana, PhD 29
  • 30.
    §Note:This is NOTa Comprehensive Lecture Note §Consult the Resource Persons who contributed to compile this knowledge for further reference §Or feel free to contact me on: §suneth@uwu.ac.lk §+94 777777682 (WhatsApp /Viber) §+94 777170040 Edited by Suneth Pathirana, PhD 30