law science and technology msca itn ejd n 814177 smart
play

+ Law, Science and Technology MSCA ITN EJD n. 814177 Smart - PowerPoint PPT Presentation

+ Law, Science and Technology MSCA ITN EJD n. 814177 Smart contracts and Proof of Location in Mirko Zichichi Smart Cities Outline Preliminaries Authentication Introduction to Distributed Systems Distributed systems


  1. + Digitally signed and time stamped Alice’s Certificate Alice Pub Document TSP SHA256( ) = Docu digest signature ment Alice Priv sign( + ) = signature digest Alice Priv TSP’s Certificate TSP Pub Docu Other SHA256( ) = digest signature ment Request TSP 2 signature TSP Priv signature to + Alice’s TSP Certificate date time

  2. + Digitally signed and time stamped Alice’s Certificate Alice Pub Document TSP SHA256( ) = Docu digest signature ment Alice Priv sign( + ) = signature digest digest sign( + + ) date 2 time Alice Priv TSP’s Certificate TSP Priv signature = TSP Pub 2 Docu Other SHA256( ) = digest signature ment Request TSP 2 signature TSP Priv signature to + Alice’s TSP Certificate date time

  3. + Digitally signed and time stamped Alice’s Certificate Alice Pub Document Docu Alice’s signature ment Certificate TSP SHA256( ) = Docu digest signature ment Alice date TSP’s signature Priv time Certificate 2 sign( + ) = signature digest digest sign( + + ) date 2 time Alice Priv TSP’s Certificate TSP Priv signature = TSP Pub 2 Docu Other SHA256( ) = digest signature ment Request TSP 2 signature TSP Priv signature to + Alice’s TSP Certificate date time

  4. Introduction to + Distributed Systems and Blockchains Mirko Zichichi

  5. + Client/Server Architecture A system architecture is the conceptual model that defines the structure , behavior , and more views of a system

  6. + Client/Server Architecture A system architecture is the conceptual model that defines the structure , behavior , and more views of a system Client Server

  7. + Client/Server Architecture A system architecture is the conceptual model that defines the structure , behavior , and more views of a system request Client Server

  8. + Client/Server Architecture A system architecture is the conceptual model that defines the structure , behavior , and more views of a system request response Client Server

  9. + Client/Server Architecture A system architecture is the conceptual model that defines the structure , behavior , and more views of a system request APP response Client Server

  10. + Client/Server Architecture A system architecture is the conceptual model that defines the structure , behavior , and more views of a system request APP response Client Server

  11. + Client/Server Architecture Alice pays Bob Example 5 euros DB Client Server

  12. + Client/Server Architecture Alice pays Bob Example 5 euros pay(Bob,5) 1° DB Client Server

  13. + Client/Server Architecture Alice pays Bob Example 5 euros pay(Bob,5) update(Alice,-5) 1° 2° update(Bob,+5) DB 3° Client Server

  14. + Client/Server Architecture Alice pays Bob Example 5 euros pay(Bob,5) update(Alice,-5) 1° 2° update(Bob,+5) DB ok 3° 4° Client Server

  15. + Client/Server Architecture request Client Server response

  16. + Peers are Client and Server simultaneously request Server Client response request Client Server response

  17. + Peer to Peer (P2P) Architecture Peers are Client and Server simultaneously request response request response Peer Peer Node Node

  18. + Peer to Peer (P2P) Architecture Peers are Client and Server simultaneously request APP response request APP response Peer Peer Node Node

  19. + 49 Distributed Systems Systems that don’t share memory (or clock) but connect and relay information over a communication medium. The different nodes in distributed system have their own memory, OS and local resources.

  20. + 50 Distributed Systems Systems that don’t share memory (or clock) but connect and relay information over a communication medium. The different nodes in distributed system have their own memory, OS and local resources. Centralized One node does everything Client Server DB

  21. + 51 Distributed Systems Systems that don’t share memory (or clock) but connect and relay information over a communication medium. The different nodes in distributed system have their own memory, OS and local resources. Centralized Semi-centralized One node does everything A node distribute work to sub-nodes Server Client Server Client DB Server DB

  22. + 52 Distributed Systems Systems that don’t share memory (or clock) but connect and relay information over a communication medium. The different nodes in distributed system have their own memory, OS and local resources. Centralized Semi-centralized Distributed system Non-centralized (P2P) One node does everything A node distribute work to sub-nodes Server Client Peer Server Peer Client DB DB DB Server DB

  23. BLOCKCHAIN + 53 A Distributed System based on a P2P network

  24. + Blockchain It is a technology which is part of the realm of the DLT: ■ Distributed Ledger Technologies

  25. + Blockchain It is a technology which is part of the realm of the DLT: ■ Distributed Ledger Technologies A ledger is distributed among nodes in a network, that update their ■ local copy following a unique consensus mechanism

  26. + Blockchain It is a technology which is part of the realm of the DLT: ■ Distributed Ledger Technologies A ledger is distributed among nodes in a network, that update their ■ local copy following a unique consensus mechanism A blockchain is a DLT where the ledger takes the form of a set of ■ block (relatively) chronologically ordered

  27. + Blockchain we can distinguish between

  28. + Blockchain we can distinguish between How the ledger is structured: chain of blocks ■

  29. + Blocks B i Content of B i : Transactions Others

  30. + Blocks B i Content of B i : Transactions Others SHA256( ) Content of B i-1

  31. + Blocks B i B i+1 Content of B i : Transactions Others SHA256( ) Content SHA256( ) Content of B i-1 of B i

  32. + Blocks B i B i+1 B i+2 Content of B i : Content of B i+1 : Content of B i+2 : Transactions Transactions Transactions Others Others Others SHA256( ) Content SHA256( ) Content SHA256( ) Content of B i-1 of B i of B i+1

  33. + Blocks B i B i+1 B i+2 Content of B i : Content of B i+1 : Content of B i+2 : Others Others Others

  34. + What is Mining? To solve a cryptographical puzzle, e.g. finding the 'needle in a haystack'

  35. + What is Mining? To solve a cryptographical puzzle, e.g. finding the 'needle in a haystack' Content of B i : Transactions 0000001 SHA256( ) Content of B i-1

  36. + What is Mining? To solve a cryptographical puzzle, e.g. finding the 'needle in a haystack' Content of B i : Puzzle : this digest must start with Transactions 9 zeros 0000001 SHA256( ) Content SHA256( ) = Content of B i-1 of B i

  37. + What is Mining? To solve a cryptographical puzzle, e.g. finding the 'needle in a haystack' Content of B i : Puzzle : this digest must start with Transactions 9 zeros 0000001 SHA256( ) Content SHA256( ) = 5AE3454B...9B8163F Content of B i-1 of B i

  38. + What is Mining? To solve a cryptographical puzzle, e.g. finding the 'needle in a haystack' Content of B i : Puzzle : this digest must start with Transactions 9 zeros 0000002 SHA256( ) Content SHA256( ) = 4DB6544...A12168D5 Content of B i-1 of B i

  39. + What is Mining? To solve a cryptographical puzzle, e.g. finding the 'needle in a haystack' Content of B i : Puzzle : this digest must start with Transactions 9 zeros 0000003 SHA256( ) Content SHA256( ) = 000000000...5BB589 Content of B i-1 of B i

  40. + Consensus: Proof of Work and propagation

  41. + Consensus: Proof of Work and propagation 1. Node solves PoW

  42. + Consensus: Proof of Work and propagation 1. Node solves PoW 2. Broadcasts block to neighbors

  43. + Consensus: Proof of Work and propagation 1. Node solves PoW 2. Broadcasts block to neighbors 3. Nodes check that: - PoW is valid - Block content is valid then they broadcast to their neighbors

  44. + Consensus: Fork

  45. + Consensus: Fork

  46. + Blockchain we can distinguish between How the ledger is structured: chain of blocks ■ What to write in the ledger: transactions ■

  47. + Transactions If the ledger maintains the state of the system, a transaction is the ■ operation that alters this state TX 1 TX 2 TX 3

  48. + Transactions If the ledger maintains the state of the system, a transaction is the ■ operation that alters this state TX 1 The state of the system at a certain time (snapshot) is a list of TX 2 ■ TX 3 transactions

  49. + Transactions If the ledger maintains the state of the system, a transaction is the ■ operation that alters this state TX 1 The state of the system at a certain time (snapshot) is a list of TX 2 ■ TX 3 transactions + A new transaction refers to a previous one and updates the ■ TX 4 state of the system

  50. + Transactions If the ledger maintains the state of the system, a transaction is the ■ operation that alters this state TX 1 The state of the system at a certain time (snapshot) is a list of TX 2 ■ TX 3 transactions + A new transaction refers to a previous one and updates the ■ TX 4 state of the system A valid transaction is signed using the digital signature of the ■ TX 1 TX 2 account that holds the previous one TX 3 TX 4

  51. + Alice Pub Transactions public keys Alice Priv TX 0 : --> 8A3..45 Wallet TX 1 : TX 0 --> 92E..12 --> A43..B3 TX 2 : TX 1 --> 532..AB TX 3 : TX 1 --> Alice Pub

  52. + Alice Pub Transactions public keys Alice Priv TX 0 : --> 8A3..45 Wallet TX 1 : TX 0 --> 92E..12 + TX 4 : TX 3 --> 6D5..34 --> A43..B3 TX 2 : TX 1 --> 532..AB sign(TX 4, ) TX 3 : TX 1 --> Alice Pub Alice Priv

  53. + Alice Pub Transactions public keys Alice Priv TX 0 : --> 8A3..45 Wallet TX 1 : TX 0 --> 92E..12 + TX 4 : TX 3 --> 6D5..34 --> A43..B3 TX 2 : TX 1 --> 532..AB sign(TX 4, ) TX 3 : TX 1 --> Alice Pub Alice Priv TX 0 : --> 8A3..45 TX 1 : TX 0 --> 92E..12 --> A43..B3 TX 2 : TX 1 --> 532..AB TX 3 : TX 1 --> Alice Pub TX 4 : TX 3 --> 6D5..34

  54. + In Italy «the storage of a digital document using technology based on ■ DLT produces legal effects of the time stamping of the article 41 of the regulation EU n. 919/2014….» «La memorizzazione di un documento informatico attraverso ■ l'uso di tecnologie basate su registri distribuiti produce gli effetti giuridici della validazione temporale elettronica di cui all'articolo 41 del regolamento (UE) n. 910/2014 del Parlamento europeo e del Consiglio, del 23 luglio 2014.»

  55. + Example comparison Alice pays Bob 5 euros pay(Bob,5) update(Alice,-5) 1° 2° update(Bob,+5) DB ok 3° 4° Client Server

  56. + Example comparison Alice pays Bob 5 bitcoin pay(Bob,5) 1° dAPP Blockchain Client Node

  57. + Example comparison Alice pays Bob It means to issue a new transaction in the blockchain, hence Alice 5 bitcoin must refer to a past TX were she received at least 5 bitcoin pay(Bob,5) 1° dAPP Blockchain Client Node

  58. + Example comparison Alice pays Bob It means to issue a new transaction in the blockchain, hence Alice 5 bitcoin must refer to a past TX were she received at least 5 bitcoin broadcastTX pay(Bob,5) (Alice,Bob,5) 1° 2° newBlock dAPP (Alice,Bob,5) ok 3° 4° Blockchain Blockchain Client Node Node

  59. + Example comparison Alice pays Bob It means to issue a new transaction in the blockchain, hence Alice 5 bitcoin must refer to a past TX were she received at least 5 bitcoin mineNewBlock andBroadcast pay(Bob,5) (Alice,Bob,5) 1° 2°/3° dAPP ok 4° Blockchain Blockchain Client Node Node

  60. + Smart Contracts Ethereum Mirko Zichichi

  61. + A Smart Contract is (simply) a program that is executed by all the nodes in a blockchain network

  62. + 92 Decentralized computing Data Center ISP ISP APP APP ISP ISP APP APP Traditional apps make requests that are processed by one or a few servers

  63. + 93 Decentralized computing Data Center ISP ISP ISP ISP ISP APP APP dAPP dAPP ISP ISP ISP ISP ISP APP APP dAPP dAPP ISP ISP ISP Traditional apps make requests that dApps make requests that are are processed by one or a few processed by all the nodes in the servers blockchain network (Ethereum)

  64. + 94 Decentralized Applications dAPP Smart Blockchain-based user-facing interfaces which Contracts Blockchain connect the end user to the technology through a combination of underlying Smart Contracts

  65. + 95 Decentralized Applications dAPP Smart Blockchain-based user-facing interfaces which Contracts Blockchain connect the end user to the technology through a combination of underlying Smart Contracts The relationship between dApps, Smart Contracts and the Blockchain is similar to traditional web applications. Client/server app interacts with a APP particular server to access its database. API DB Similarly, dApps use Smart Contracts in order to connect to the particular Blockchain upon which they are based (e.g. Ethereum).

  66. + 96 Trust without a third party If you have N independent nodes in a network and the majority 1. (⅔ + 1) of them follows the same “consensus mechanism”

  67. + 97 Trust without a third party If you have N independent nodes in a network and the majority 1. (⅔ + 1) of them follows the same “consensus mechanism” If you trust the consensus mechanism (including also the source 2. code it is built upon -> open source)

  68. + 98 Trust without a third party If you have N independent nodes in a network and the majority 1. (⅔ + 1) of them follows the same “consensus mechanism” If you trust the consensus mechanism (including also the source 2. code it is built upon -> open source) then you can trust the correct execution of the program

  69. + Practical example why you can trust a smart contract

  70. + Practical example why you can trust a smart contract Server Alice Bob Client Client

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend