blockchain systems
play

Blockchain Systems Dennis Przytarski Agenda Motivation Our - PowerPoint PPT Presentation

IPVS/AS Using Triples as the Data Model for Blockchain Systems Dennis Przytarski Agenda Motivation Our approach Evaluation Example Dennis Przytarski Using Triples as the Data Model for Blockchain Systems 2 Motivation


  1. IPVS/AS Using Triples as the Data Model for Blockchain Systems Dennis Przytarski

  2. Agenda • Motivation • Our approach • Evaluation • Example Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 2

  3. Motivation Blockchain Systems • Initially designed for cryptocurrencies • Simple and fixed data model • Other scenarios • Automotive • Full history of a vehicle • Real Estate • Record of land titles • Voting • Reduce voter fraud Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 3

  4. Motivation Blockchain Systems • Key-value data model latest application state World State • Simple query engine queries Query • World state Key-value store Engine (Document store) • Scenarios is derived from • Transportation/Trucking Ledger • Tracking journey stops, Blockchain parcel service • Supply Chain Integrity Block n-2 Block n-1 Block n • Food chain, Header Header Header waste management TRXN TRXN TRXN ... ... ... • Requirements • Flexible information model • Query engine for Transaction • World state • History (analytics, audit trails) Key Value Example key value ... ... CAR0 {color :“ blue “, make :“Ford“} based on [1] Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 4

  5. Merge Blockchain and Database Systems BLOCKCHAIN SYSTEMS DATABASE SYSTEMS • immutability • generic but flexible data model • tamper-resistance • powerful query engine DESIGN REQUIREMENTS • maintain a flexible information model and an efficient data representation • support a powerful query engine • preserve the integrity of the blockchain‘s data structure (tamper-resistance) Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 5

  6. Data Model • Key-value • values are often serialized • if key is not known, a full scan is necessary • no powerful query engine, just get / set operations • Relational • too strict for immutable data • schemas evolve over time leading to schema changes • Triples • flexible schemas without maintaining an one-size-fits-all schema • triples are facts  data of interest are easier to extract Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 6

  7. Merkle B-Tree Hash A … Root node Pointer Hash B Pointer Hash C Pointer Hash D Data Data Data Node Hash B Hash C Hash D ’ • Pointer: Memory address • Hash: Hash over the node’s data [2]: The Merkle B-Tree: Li, Feifei, et al. "Dynamic authenticated index structures for outsourced databases." SIGMOD 2006. Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 7

  8. Architecture latest application state World State queries Query Query Key-value store Engine Engine queries queries (Document store) historical latest application application is derived from state state Ledger Blockchain Blockchain Block n-2 Block n-1 Block n Block n-2 Block n-1 Block n Header Header Header Header Header Header TRXN TRXN TRXN ... ... ... latest application state Transaction Merkle B-tree entity attribute value Example Key Value <Triple> Example key value CAR0 car/color blue ... ... ... CAR0 {color :“ blue “, make :“Ford“} CAR0 car/make Ford Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 8

  9. Advantage (1/2) Replace three data stores by one Blockchain Block n-3 Block n-2 Block n-1 Block n Header Header Header Header TRXN TRXN TRXN TRXN ... ... ... ... Storage Architecture Analytics World State Blockchain Blockchain Transaction log Graph database Key-value store Triplestore on file system is is Relational database (Document store) exported derived from from replaced by Ledger Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 9

  10. Advantage (2/2) Built-in Data Integrity Checks (Tamper-resistance) • The database systems ‚Analytics‘ and ‚World State‘ are not aware of the blockchain‘s data structure  data integrity checks must be done manually Query Query Query Engine Engine Engine if needed if needed built-in data data integrity data integrity integrity checks checks are checks are (tamper-resistance) done manually done manually Analytics World State Blockchain Blockchain Transaction log Graph database Key-value store Triplestore on file system is is Relational database (Document store) exported derived from from Ledger Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 10

  11. Problem • High storage requirements • Optimization mechanisms (  efficient storage techniques) • data compression • data encoding • reuse of already stored data structures Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 11

  12. Example Transaction 1 Transaction 2 <B9F, name , „Pluto“> <B9F, type, „ dwarf_planet “> <B9F, type, „planet“> Block 1 Block 2 The query engine uses Hash 2F7 the Merkle B-trees of a Hash FC8 4 1 block to compute the Node AEV AEV A <= name A <= name result of a query Nodes are Hash FAA Hash E87 Hash E87 Hash C29 2 2 5 3 stored in a <B9F, name , „Pluto“> <B9F, type, „planet“> <B9F, name , „Pluto“> <B9F, type, „ dwarf_planet “> … … … … key-value store Key Value Root of identical node after FC8 1 first block Query Block 1 E87 2 SELECT ?type ASOF n FAA 3 WHERE Query result Root of 4 2F7 [ ?object name „Pluto“] for n =1 : ?type is planet second block after C29 5 [ ?object type ?type ] for n =2 : ?type is dwarf_planet Block 2 Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 12

  13. Contact Details Thank you! University of Stuttgart IPVS/AS Dennis Przytarski Email: Dennis.Przytarski@ipvs.uni-stuttgart.de Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 13

  14. References • [1]: Androulaki, Elli, et al. "Hyperledger fabric: a distributed operating system for permissioned blockchains." Proceedings of the Thirteenth EuroSys Conference. ACM, 2018. • [2]: Li, Feifei, et al. "Dynamic authenticated index structures for outsourced databases." Proceedings of the 2006 ACM SIGMOD international conference on Management of data. ACM, 2006. • Merkle, Ralph C. "A digital signature based on a conventional encryption function." Conference on the theory and application of cryptographic techniques. Springer, Berlin, Heidelberg, 1987. • C. Mohan, Tutorial: Blockchains and Databases (VLDB 2017) Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems 14

Recommend


More recommend