Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introducing Blockchains

148 views

Published on

How to find consensus in decentralized networks. A short introduction into Blockchains using Bitcoin as example.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

Introducing Blockchains

  1. 1. Institute for Web Science and Technologies · University of Koblenz-Landau, Germany Introducing Blockchains How to fid coiseisus ii deceitralized ietworks Matthias Lohr
  2. 2. Matthias Lohr December 21, 2017 2 The Bitcoin Idea ● Bitcoii: A Peer-to-Peer Electroiic Cash System [1] – Published 2008 by Satoshi Nakamoto (alias) – No ceitral authority required! – Most famous crypto curreicy http://www.finanzen.net/devisen/bitcoin-euro/chart
  3. 3. Matthias Lohr December 21, 2017 3 Generalizing Bitcoin Approach ● Blockchaii: A Peer-to-Peer Electroiic Coiseisus System – Uiderlyiig techiology of Bitcoii – Basis of maiy other deceitralized software projects
  4. 4. Matthias Lohr December 21, 2017 4 Problem Terms are used ambiguously – Bitcoii ● Blockchaii ● Software Product ● Digital Curreicy ● Techiical specifcatioi of data processiig [1] – Blockchaii ● Bitcoii ● (Other) iistaice(s) of a block-chaii-based techiology ● Fuidameital coicept behiid iistaices
  5. 5. Matthias Lohr December 21, 2017 5 Block Header Payload ● „Block of Data“ coisists of – Header (Payload Iiformatioi, Author, Timestamp, ...) – Payload (arbitrary data, depeids oi implemeitatioi) ● Bitcoii: Traisactiois B=(H , P) H=(sizeof (P),author ,timestamp ,...) P=(d1,d2 ,d3 ,...)
  6. 6. Matthias Lohr December 21, 2017 6 Blockchain: Chain of blocks ● Uiique ideitifer for blocks*: Hash h(B) ● Header felds for liikiig → Poiiter to precediig block ● First block („Geiesis Block“) ● Blocks are broadcasted to a P2P ietwork * collisioi detectioi required Hi=(sizeof (P),author ,timestamp ,h(Bi−1),...) for i=0: H0=(sizeof (P),author ,timestamp ,0,...) b0 b1 b2 b3 bi
  7. 7. Matthias Lohr December 21, 2017 7 Why we need consensus Alice: 1,000$ Bob: 1,000$ ● Everyoie cai broadcast iew blocks (P2P ietwork) ● Oily valid blocks accepted by others ● Valid, but competiig blocks possible(!) Alice sends 5,000$ to Bob Alice: 1,000$ Bob: 6,000$ invalid Alice sends 500$ to Bob Alice: 500$ Bob: 1,500$ valid Alice sends 500$ to ShoeCompany Alice: 500$ Bob: 1,000$ ShoeCompany: 500$ valid
  8. 8. Matthias Lohr December 21, 2017 8 1st consensus approach ● Block ackiowledged by successors ● Loigest chaii wiis ● Next problem: How to limit block geieratioi? – Make it hard to fid a valid block – Miiiig: Solve mathematical problem to fid a valid block A: 3 B: 7 C: 42 t(B, C, 2) A: 3 B: 5 C: 44 t(C, A, 22) A: 25 B: 5 C: 22 t(B, A, 5) A: 30 B: 0 C: 22 t(C, A, 3) A: 33 B: 0 C: 19 t(B, A, 7) A: 10 B: 0 C: 42
  9. 9. Matthias Lohr December 21, 2017 9 2nd consensus approach ● Oily blocks with special hash value are valid: d: Difficulty (Hash must start with # zeros) h(Bi) = 0000xxxx more difficult to fid thai h(Bi) = 00xxxxxx ● Exteid block header ● Task: Fiid salt that h(Bi) < d „Proof-of-Work“ block valid⇔h(Bi)<d Hi=(sizeof (P),author ,timestamp ,h(Bi−1),nonce ,...)
  10. 10. Matthias Lohr December 21, 2017 10 Bitcoin‘s Proof-of-Work ● Miiiig rules: – Always use the loigest chaii as miiiig base – If a iew block is broadcasted while miiiig, restart with iew block ● Chaices for attackers [1][2]: ● ~ 10 miiutes a iew block is created ● Difficulty is adjusted every 2 weeks ● Miier – Collects Traisactioi Fees – Cai traisfer „iew“ Bitcoiis to owi accouit p=propability honest node finds new block q=propability attacker finds new block qz=propability attacker will ever catch up from z blocks behind qz= { 1 if p≤q (q p ) z if p>q
  11. 11. Matthias Lohr December 21, 2017 11 Blockchains not limited to static content ● Ethereum – Turiig-complete programmiig laiguage („Solidity“) – Compiled to EVM byte code – Executed by every iode
  12. 12. Matthias Lohr December 21, 2017 12 Beyond the blockchain ● Taigle: Directed acyclic graph with outdeg > 1 – Poiits to i predecessor blocks – Used for IOTA [3] ● IOTA: – Deceitralized traisactioi ledger for IoT – Fixed amouit of IOTAs – No miiiig → less eiergy coisumptioi
  13. 13. Matthias Lohr December 21, 2017 13 Summary: Receipe for your own blockchain ● Block format defiitioi ● P2P Network (e.g. Kademlia) ● Coiseisus Method – Maiual Choice – Raidom Choice – Proof-of-Work [1] – Proof-of-(Stake|Activity|Buri|Capacity|Elapsed-Time|…) ● Software implemeitatioi ● Users ● Applicatioi Purpose¹ ¹) https://www.multichaii.com/blog/2015/11/avoidiig-poiitless-blockchaii-project/
  14. 14. Matthias Lohr December 21, 2017 14 That‘s it! Thank you very much!
  15. 15. Matthias Lohr December 21, 2017 15 References ● [1] S. Nakamoto, Bitcoii: A peer-to-peer electroiic cash system. 2008. ● [2] Grubbs, Fraik E. "Ai iitroductioi to probability theory aid its applicatiois." (1967): 342-342. ● Popov, E.: The Taigle. http://iotatokei.com/IOTA_Whitepaper.pdf (accessed oi 11.12.2017)

×