Tutorial: Blockchain Technologies and the Semantic Web Blockchain meets Semantic Web … ·...

Preview:

Citation preview

Tutorial: Blockchain Technologies and the Semantic Web

Blockchain meets Semantic WebLuis-Daniel Ibáñez – University of Southamptonl.d.ibanez@soton.ac.uk

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebGoals – Review and Discuss

› Semantic Web for Blockchains– How Semantic Web could help Blockchains?

› Blockchains for Semantic Web– How Blockchains could help Semantic Web?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebAgenda (Approximate)

› Semantic Web for Blockchains– Knowledge Representation (15m)– Interoperability (15m)– Discussion (10m)

› Blockchains for Semantic Web– Trust & Proof layers (15min)– Data Marketplaces and incentives (15min)– Discussion (10min)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Distributed Systems

Cryptography

Game Theory

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebA Blockchain Ecosystem

Community (Users and/or miners)

Consensus protocol intransaction order and validity

Incentive

Blockchain (Database)

SemWeb for Blockchains

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebKnowledge Representation

› Blockchains started as very low level artefacts

› But now have several layers of information

› How to represent them and their contents?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

J. Pfeffer - Eth0n and Beyond – Keynote to International Workshop on Linked Data and Distributed Ledgers 2017

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

J. Pfeffer - Eth0n and Beyond – Keynote to International Workshop on Linked Data and Distributed Ledgers 2017

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● On statements about blockchains● On statements asserted inside blockchains

– Proof and Trust. We’ll see that later

Reasoning possibilities!

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Provide the right level of abstraction● Represent concepts that vary from blockchain to

blockchain– Consensus algorithm used– “Transaction”– Participant versus validator/miner

Challenges

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

H. Ugarte. A more pragmatic Web 3.0 – Linked Blockchain Data

● Aimed at describing Bitcoin and Ethereum● Account, Block, Transaction, Payload

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Ethereum specific

eth0n

https://ethon.consensys.net/

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

P. Tasca & C. Tessone Ontology of Blockchain Technologies, principles of Identification and Classificationhttps://dx.doi.org/10.2139/ssrn.2977811

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

http://www.untitled-inc.com/the-token-classification-framework-a-multi-dimensional-tool-for-understanding-and-classifying-crypto-tokens/

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebBlockchain Interoperability

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebBlockchain Interoperability

● Heterogeneity of– Data (Like in Linked Data)– Communities (Like in content production networks) – Protocols– Incentives

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebOne chain to rule them all...

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebNot happening...

● Throughput limits● Variety of use cases

– Miners or participants, privacy and cryptography requirements

● Natural competition● Fear of becoming centralized again

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebWhat happens though is...

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Data Silos

Blockhain Silos

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebQuestions...

● How to use RDF et al. as a mean for data interoperability for Blockchains?

● How to enable interoperation at transaction level?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebData Interoperability

● One half: Lifting blockchains● Other half: Put RDF inside blockchains

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebAdding data in Blockchains (1)

● Many Blockchains are space constrained– Most of them were not designed for this

● How to add data directly on them?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebAdding data in Blockchains (1)

Attaching Semantic Metadata to Cryptocurrency Transactions. Ibáñez et al. DeSemWeb 2017

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebComparison of compression approaches

Attaching Semantic Metadata to Cryptocurrency Transactions. Ibáñez et al. DeSemWeb 2017

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebAdding data in Blockchains (2)

● Hashing-out– Store a hash in the Blockchain, document somewhere else– Document can be verified against the hash.

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebAdding data in Blockchains (2)

hash#x9567hh31335

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebAdding data in Blockchains (2)

hash#x9567hh31335

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Substitute location-based addressing for content-based addressing.

● S/Kademlia DHT + Git + BitTorrent

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

https://medium.com/textileio/whats-really-happening-when-you-add-a-file-to-ipfs-ae3b8b5e4b0f

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Reconstruct document via Link Traversal

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● If not enough nodes hosting, no content● Incentives needed (more on that later)

Tradeoff

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebTransaction interoperability

Blockchain ABlockchain B

Transact asset

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebBlockchain Interoperability (BI)

Smart Contract@ Blockchain A

Smart Contract@ Blockchain B

Mutual call that preserves properties on both sides

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebBlockchain Interoperability (BI)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebCosmos

› “TCP for Blockchains”

› Zones are regular blockchains

› A Hub that uses a consensus protocol to connect them

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebPolka Dot

› Parachains, similar to hubs but market-controlled

› Special protocol to handle inter-consensus

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebCrosses the SemWeb boundary, but...

● Have we ever thought on transactions in Linked Data at web scale?

● What consistency guarantees beyond Eventual Consistency?

● LD-Scripts and services executing all over the place?

● This type of constructions could be used for “adding consistency to the Web”

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Some open problems

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Highlight Blockchains that are compatible/incompatible

● Explain possible property loss when plugging to other blockchains

Reasoning on Blockchain descriptions

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Given a collection of interdependent Smart Contracts and a set of Blockchain ecosystems, where to deploy each piece?

● Similar to Multi-Cloud deployment

Deployment of Smart Contracts

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● A Blockchain ecosystem may die● Or become too expensive● How to migrate to another ecosystem?

Migration of Blockchains

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Who decides on changes in the protocol● Two hackers in Zug sipping Chai Latte?● A Foundation incorporated in Singapore?● The community? How?

Governance

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Do you see any other problems?

Discussion

Blockchains for SemWeb

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Trust & Proof– Those layers of the Semantic Web cake…– We will see applications to Semantic Log Auditing and Scholar

Publication

● Incentives for publishing and maintaining data– Subsidies don’t scale

Problems of Semantic Web

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

“The Logic layer enables the writing of rules while the Proof layer executes the rules and evaluates together with the Trust layer mechanism for applications whether to trust the given proof or not.”

Trust & Proof

https://www.w3.org/2001/12/semweb-fin/w3csw

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebTrust and proof

Example applications

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Semantic Audit Logs

Use L2TAP ontology

Sutton & Samavi. Blockchain Enabled Privacy Audit Logs. ISWC 2017

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Semantic Audit Logs

How to protect against collusion to tampering?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebExperimental Evaluation

Bottomline: Linear in the size of the log

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Preserving Government Decisions

● Use case for Greek government decisions● Problem 1: They are not machine readable nor

easily verifiable– That is solved with Linked Data

● Problem 2: No one trust them, fear that decisions may be overruled unlawfully– Blockchains kick in

Beris & Koubarakis. Modeling and Preserving Greek Government Decisions using Semantic Web Technologies and Permissionless Blockchains. ESWC 2018

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Preserving Government Decisions

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Enabled provable checks

● A timestamp proves that a message existed prior to some point in time; is a “proof-of-existence”

● Input: a decision– It was stamped on date dt– Does not match anything stamped

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Decentralised Scholarly Communication● Scientific publishing is centralised

– Many researchers dislike that

● Decentralised models have been proposed– Authors self-publish articles– Articles are semantic entities (SPAR ontologies)– (Open) Reviews are also self-published and linked to articles

● Problem– We killed the monster… but we can be monsters too...

Hoffman et al. Smart Papers – Dynamic Publications on the Blockchain. ESWC 2018

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Collapse of Trust (1)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Collapse of Trust (2)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Collapse of Trust (3)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Collapse of Trust (3)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Approach – Papers as Smart Contract● A paper is a Ethereum Smart Contract● Functions for all paper interactions

– Publish– AddReview

● Statements about papers and their links are stored as transactions in Ethereum

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Evaluation● Time to commit

– Few minutes.

● Cost– Fluctuates according to Ethereum market– 2$ per call (when measured, nowadays is less)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Pattern for applications● Shift trust from a central entity to trust in a

Blockchain ecosystem [Protocol + Participants + Incentives + Crypto-primitives]

● Evaluate cost and risks– Public blockchains have more participants, but you have to pay in

cryptocurrency– Private blockchains require participants to put the resources to run

the protocol

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

P. Evans-Greenwood. Blockchains and Linked Data. Keynote to Workshop on Linked Data and Distributed Ledgers @ WWW2017

Pathways to trust

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Paid in Cryptocurrency Paid in your hardware running the protocol

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Some open problems

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

General RDF verification● Hands-on session!

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

What do we want when querying?● SELECT ?s ?o

WHERE { ?s ex:pred ?x SERVICE <A_Blockchain>{ ?x ex:other_pred ?s}

}● SELECT ?s ?o

WHERE { ?s ex:pred ?x . { ?x ex:other_pred ?s} IS VERIFIED

} (Output explains who verifies and where)

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Smart Contracts as Web Services● With very special properties (and costs) ● True or False?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Discussion● Any further problems● Questions?

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Incentives for a data economy

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebIn contrast to the traditional web where

advertisement fueled a lot of the growth. This raises the question how the WoD can

● (i) maintain its success when government subsidies disappear and

● (ii) convince commercial entities to share their wealth of data

T. Grubenmann et al. Decentralizing the Semantic Web: Who will pay to realize it? DeSemWeb 2017

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Storage Query Pricing Exchange

Steps of selling data

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Decentralising these steps● Adding trust/proof to these steps● Powering incentive mechanisms through

cryptocurrencies

Blockchains can help...

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● If not enough nodes hosting, no content● Incentives needed (more on that later)

Tradeoff

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● If not enough nodes hosting, no content● Incentives needed (more on that now)

FileCoin

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● A decentralized storage network that is auditable, publicly verifiable and designed on incentives.

● Clients pay a network of miners for data storage and retrieval; miners offer disk space and bandwidth in exchange of payments.

● Miners receive their payments only if the network can audit that their service was correctly provided.

FileCoin

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● An interactive proof system in which a prover defends a publicly verifiable claim that it is dedicating unique resources to storing one or more retrievable replicas of a data file

Proofs of replication

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● How to query a Web of Data stored in this?– Does querying like on P2P works?– Link Traversal?

● There are alternatives in the market (Sia,Storj)– Follow links across systems?

Querying is ongoing work

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Given a query on a database, put a price on it● It’s a hard problem

– If you want it arbitrage-free is very hard– Or you can leave everyone set their own price, but that has other

implications

Pricing

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

WebOcean Protocol

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

● Privacy (Multi-Party Computation Revival)● Data Protection

– Immutability vs right to be forgotten

● Sell processing without a middle man● Use a Smart Contract to deliver

– What should go on the Blockchain and what should not?

Some open problems

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Take-aways

● SemWeb technologies are already been used for interoperability by practitioners.– Let’s keep pushing that

● Blockchains provide decentralised “Trust & Proof” machinery– Trust the protocol/ecosystem/incentive in provide proof of something– An opportunity to re-decentralise the Web.

Blo

ckch

ain

Tech

nolo

gie

s and t

he S

em

an

tic

Web

Recommended