Drupal and the Ethereum Blockchain

#DrupalEthereum @digitaldonkey09

New York

About me

  • 20 years ​​web development  
  • 10 years with Drupal
  • 1.5 years in Ethereum 
  • Developer at ConsenSys 

Overview

  • What is a Blockchain
  • Ethereum Blockchain
  • Blockchain Applications
  • Drupal Ethereum Module & Roadmap

06/29/2016

  • Banks trying to improve their interbank settlement
  • Governments exploring paperless e-government and registries
  • Healthcare - sharing evidence, verified prescriptions
  • Law - investigating the legal side of "smart contracts"
  • Energy - incentivizing energy efficiency and trading
  • IoT - Internet of things, sensors, appliances
  • NGOs - transparency in international aid & outcomes

Who cares about Blockchain?

Blockchain Applications

Examples from ConsenSys projects

Authentick / VIANT

Asset tracking
https://supplychain.consensys.net

Peer-to-peer Music markets 

Decentralizing Energy infrastructure

Blockchain

Imagine the Blockchain as a
"Decentralized & Distributed Consensus Database"

"0xd62e7da1d30af2abed70f0ec677fefe0a0db5774  owns 5 Bitcoin"

agree
agree
agree
agree
agree
agree

Blockchain's promises

"Sharing Economy" of
Uber, Airbnb

Centralized User Data,
Facebook, Google

Reduce costs of
middlemen

Self-sovereign
user identity

Internet of
Information

Don Tapscott: "How the Blockchain is changing money and business"

Internet of
Trust and Value

Ethereum is an open-source, public, blockchain-based distributed computing platform featuring smart contract functionality

Ethereum Blockchain

Decentralized
P2P consensus

No central authority

 

Any state change requires a cryptographically signed Transaction

Global ledger with immutable records

Programmable money:
Smart Contracts

Ethereum

  • Ether is the currency in Ethereum
  • Programs cost ether to run - anti-spam and incentivizes miners in the network
  • Data changes to a blockchain create immutable audit trails
  • Blockchain data is public! (on public chains, if not encrypted)
  • Smart Contracts: Code deployed to the blockchain that can control funds
  • Private-/public key cryptography like in PGP 

Ethereum - Global or Private

Private Consortium
Blockchain
(permissions, privacy)

 

Global Public
Blockchain

Smart Contracts in Ethereum

  • can run automatically when certain conditions are met
  • Addressable, can handle money / escrow, Turing-complete
  • Crowd founding as a Smart Contract:
Contract crowdFound
 if (account_balance) > $10,000
   move account_balance to founded_account
 else
   move donation_account to original_donor

(pseudocode)

Smart contracts are programs with a state stored on the blockchain

Transactions, Blocks & chaining

Data on Blockchain is public.

 

"Writing to Blockchain" requires:

  • the private key of the from address to sign the transaction
  • some fee for computation/data storage in Ether (public chain)

time

Signing & Signatures

  • Public and private keys like in PGP
  • Signing requires user interaction (if you don't host the keys        )
  • Ethereum Address is derived from the private key
  • Signing Transactions (writing anything to the blockchain is a transaction, also sending money, deploying code)
  • Signing text (Signatures)
  • Encryption (Similar to PGP)

Transaction Signers

  • Mist browser   (Full Blockchain / Ethereum foundation)
  • Metamask   (Browser extension)
  • MetaMascara (Metamask in Browser)
  • uPort   (Identity provider)
  • MyEthereumWallet   (Online or Offline Browser)
  • Jaxx (Mobile App & Browser extension)
  • Hardware based signing (Ledger wallet)

Ethereum wallets, Identity providers ... 

Literally the key for the user 

Ethereum building blocks

Drupal Ethereum Module

  • Founded and abandoned in 2014
  • New approach started 2016
  • Ethereum PHP library abstraction
  • POC for signup with registry
  • Currently:
    Focus on infrastructure modules
  • Later:
    maybe out-of-the-box like
    http://bit.ly/drupalvoting

Drupal Ethereum Module

a few potential use cases

  • Identity provider for Ethereum 
  • Registries & Signing
    Editorial workflows and presentation for documents & signatures
  • Asset tracking
    Quality control signed digitally, Supply chain tracking, IOT
  • Trusted voting / budgeting for NGOs
    --> http://bit.ly/drupalvoting
  • Signed software releases
  • Trusted peer reviews ...
  • Paywall content

Current web

Ideal decentralization

How to connect Drupal and Ethereum?

Semi-decentralization

Client side signing using Transaction-signers

Server just pulls data

(no private key on Server)

Architecture challenges

Mapping Ethereum to Drupal

Infrastructure modules

Servers (Ethereum-nodes)

List Servers, gather information (Server Entity)


Accounts

Ethereum Addresses
Map Accounts to Drupal Accounts
➡ Identity for known user group

          Transactions

               Read (own contracts/known ABI)

               ​Log TX based on Contract interaction

               Process TX data in Drupal
 

          Smart Contracts

               Manage deploy as Drupal Admin

               Provide ABI to process data in Drupal

               Let Users interact (→ TX data)

Two signup modules?

Ethereum Signup

  • Challenge/response authentication
  • No Blockchain interaction - no fee
    Just Elliptic Curve cryptography

Ethereum user connector

  • Smart contract with registry
  • May be changed to a paywall
  • Transaction require little payment in Ether

State and Roadmap

Current: POC

Finalizing infrastructure modules (MVP)

  • PHP library support of complex data types
  • Testing framework for PHP library for various Ethereum clients
  • Make Transaction-signers pluggable & add more 
  • Contract management & deployment from Drupal backend            
  • Server Entities

Drupal Ethereum module

Reach out to end-users

  • Availability and acceptance of TX signers for all browsers
  • Identity attestation
    Trusted entities like banks or states confirm user data by signing
  • Regulatory, laws
    Legal entities start caring about crypto space

 

Why should Drupal care about Blockchain?

  • Blockchain provides adds a new trust layer to the internet
  • Drupal can provide Identity in context of limited user groups
  • Implement enterprise level workflows, required for Document signing, Peer-to-peer platforms, Asset tracking ...
  • Explore new ways of NGO founding, budgeting, voting.

Questions & Thank You

thorsten.krug@consensys.net
       @digitaldonkey09

The development of Drupal Ethereum Module
Has been sponsored by ConsenSys

       @ConsenSys

https://consensys.net

slides.com/digitaldonkey/drupal-ethereum-openCamp2017