Blockchain Systems Dennis Przytarski Agenda Motivation Our - - PowerPoint PPT Presentation

blockchain systems
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

IPVS/AS

Dennis Przytarski

Using Triples as the Data Model for Blockchain Systems

slide-2
SLIDE 2

Agenda

  • Motivation
  • Our approach
  • Evaluation
  • Example

2

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-3
SLIDE 3

Motivation

  • 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

3

Blockchain Systems

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-4
SLIDE 4

Motivation

Blockchain Block n-1 Block n Block n-2

Header

TRXN

...

Header

TRXN

...

Header

TRXN

...

Key-value store (Document store)

World State

queries

Query Engine

Transaction

Key Value

... ...

latest application state Ledger

key value CAR0 {color:“blue“,make:“Ford“} Example

is derived from

  • Key-value data model
  • Simple query engine
  • World state
  • Scenarios
  • Transportation/Trucking
  • Tracking journey stops,

parcel service

  • Supply Chain Integrity
  • Food chain,

waste management

  • Requirements
  • Flexible information model
  • Query engine for
  • World state
  • History (analytics, audit trails)

4

Blockchain Systems

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

based on [1]

slide-5
SLIDE 5

BLOCKCHAIN SYSTEMS

  • immutability
  • tamper-resistance

5

DATABASE SYSTEMS

  • generic but flexible data model
  • powerful query engine

Merge Blockchain and Database Systems

  • 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)

DESIGN REQUIREMENTS

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-6
SLIDE 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

6

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-7
SLIDE 7

Merkle B-Tree

7

[2]: The Merkle B-Tree: Li, Feifei, et al. "Dynamic authenticated index structures for outsourced databases." SIGMOD 2006.

Pointer Pointer Pointer Hash B Hash C Hash D

Data Data Data

Hash A

Root node Node

  • Pointer: Memory address
  • Hash: Hash over the node’s data

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

Hash B Hash C Hash D’

slide-8
SLIDE 8

Architecture

Blockchain Block n-1 Block n Block n-2

Header

TRXN

...

Header

TRXN

...

Header

TRXN

...

Key-value store (Document store)

World State

Block n-1 Block n Block n-2

queries

Query Engine Query Engine

Transaction

Key Value

... ...

latest application state

queries latest application state Merkle B-tree

<Triple>

...

Ledger

key value CAR0 {color:“blue“,make:“Ford“} entity attribute value CAR0 car/color blue CAR0 car/make Ford Example Example

queries historical application state is derived from Header Header Header

latest application state Blockchain

8

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-9
SLIDE 9

Advantage (1/2) Replace three data stores by one

Blockchain Block n-1 Block n Block n-2 Block n-3 Key-value store (Document store)

World State

Graph database Relational database

Analytics

is exported from is derived from

Transaction log

  • n file system

Blockchain Ledger

Header

TRXN

...

Header

TRXN

...

Header

TRXN

...

Header

TRXN

...

replaced by Storage Architecture Triplestore

Blockchain

9

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-10
SLIDE 10
  • The database systems ‚Analytics‘ and ‚World State‘ are not aware of the blockchain‘s

data structure  data integrity checks must be done manually

Advantage (2/2) Built-in Data Integrity Checks (Tamper-resistance)

10

if needed data integrity checks are done manually if needed data integrity checks are done manually built-in data integrity checks (tamper-resistance) Query Engine Query Engine Query Engine Key-value store (Document store)

World State

Graph database Relational database

Analytics

is exported from is derived from

Transaction log

  • n file system

Blockchain

Triplestore

Blockchain Ledger

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-11
SLIDE 11

Problem

  • High storage requirements
  • Optimization mechanisms ( efficient storage techniques)
  • data compression
  • data encoding
  • reuse of already stored data structures

11

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-12
SLIDE 12

Example

12

<B9F, name, „Pluto“>

<B9F, type, „planet“>

AEV A <= name

Transaction 1 <B9F, name, „Pluto“> <B9F, type, „planet“>

Hash FC8 Hash E87 Block 1

<B9F, name, „Pluto“> <B9F, type, „dwarf_planet“>

… …

AEV A <= name

Transaction 2 <B9F, type, „dwarf_planet“>

Hash 2F7 Hash E87 Hash C29 Block 2

1 2 4 2 5

Query SELECT ?type ASOF n WHERE [?object name „Pluto“] [?object type ?type] Node

Key Value FC8 E87 FAA 2F7 C29 1 2 3 4 5

Nodes are stored in a key-value store after Block 1 after Block 2 Query result for n=1: ?type is planet for n=2: ?type is dwarf_planet Root of second block identical node

Hash FAA

3

The query engine uses the Merkle B-trees of a block to compute the result of a query Root of first block

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-13
SLIDE 13

Contact Details

Thank you! University of Stuttgart IPVS/AS Dennis Przytarski Email: Dennis.Przytarski@ipvs.uni-stuttgart.de

13

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems

slide-14
SLIDE 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)

14

Dennis Przytarski • Using Triples as the Data Model for Blockchain Systems