(easy to build Uber, Airbnb, etc.) 1. What is a Blockchain? ... Blockchain. Front-End. JS wired. Smart. Contract functio
Drupal and the Blockchain by Thorsten Krug - Front-end Drupal Developer Eva Shon - UX Developer
Bitcoin 2010 First commercial bitcoin transaction: to buy a pizza for 10.000 BTC Value of "the pizza" today is 7 000 000 euros!
Current value of all Bitcoin: ~12 Billion €
Agenda 1. What is a Blockchain? 2. Blockchain Applications 3. What Role Drupal Could Play
Why I like it? Remove the Middle man we require for trust (Music Industry, Airbnb, Ueber, Western Union, Banks, corrupt money systems... ) Get everyone in the World a bank account Regain control / own your data Trust layer for cooperative business models (DAO's) Reinvent democracy Don Tapscott: "How the Blockchain is changing money and business"
Who cares? Banks trying to improve their interbank trade Governments research how to digitalize ledger Healthcare Sector (e.g. validated recipes) Lawyers think about implementation between "smart contracts" and the implementation in law systems Energy companies how to optimize energy efficiency and trading
1. What is a Blockchain?
Blockchain Hype
Every major bank in the world has a blockchain strategy... 1. What is a Blockchain?
What can be built Music Rights & Payments The DAO Largest crowdfund in history: € 150 million Digital Identity
P2P Solar Energy Markets
Blockchain in Government
UK Gov 1. What is a Blockchain?
Blockchain Hype "Drupal" "blockchain"
Google Zeitgeist 1. What is a Blockchain?
Blockchain Use Cases I. Financial
A LOT!
Currency Private equities Public equities Bonds
V. Other
Derivatives
Coupons
Voting rights
III. Public Records
Commodities
Land titles
Spending records
Vehicle registries
Trading records
Business license
Mortgage / loan records
Business incorporation records
Servicing records
Business ownership records
Crowd-funding
Regulatory records
Micro-finance
Criminal records
GPS trails (personal)
Micro-charity
Passports
Degree
Birth certificates
Certifications
Death certificates
Learning Outcomes
Voter IDs
Home / apartment keys
Grades
Voting
Vacation home / timeshare keys
HR records
Health / Safety Inspections
Hotel room keys
Medical records
Building permits
Car keys
Accounting records
Gun permits
Rental car keys
Business transaction records
Forensic evidence
Leased cars keys
Genome data
Court records
Locker keys
GPS trails (institutional)
Voting records
Safety deposit box keys
Delivery records
Non-profit records
Package delivery (split key between
Arbitration
Government/non-profit accounting
II. Physical Asset Keys
delivery firm and receiver) Betting records Fantasy sports records (!)
IV. Private Records Contracts Signatures Wills Trusts Escrows
Vouchers Reservations Movie tickets Patents Copyrights Trademarks Software licenses Videogame licenses Music/movie/book licenses (DRM) Domain names Online identities Proof of authorship / Proof of prior art Documentary records Data records (sports scores, temperature, etc) Sim Cards GPS network identity Gun unlock codes Weapons unlock codes Nuclear launch codes (!) Spam control (micro-payments for posting)
From http://ledracapital.com/blog/2014/3/11/bitcoin-series-24-the-mega-master-blockchain-list
How it can change the world Internet of Information
Internet of Value
"Sharing Economy" of Uber, Airbnb
Reduce Middleman
Centralized User Data, Facebook, Google
Self-sovereign user identity (Selbstbestimmte Identitaet)
Promises greater transparency, efficiency
What is a Blockchain? "Next-generation of the database or internet"
Network
1. What is a Blockchain?
Database
What is a Blockchain?
Network
1. What is a Blockchain?
Database
Currency
Public-Private Keys
What is a Blockchain?
P2P Consensus
Global History (No one can change)
1. What is a Blockchain?
Programmable Money
Digital Signatures
Bitcoin Various Drupal modules for Bitcoin
Open Source P2P Currency
1. What is a Blockchain?
Bitcoin vs. Ethereum
Open Source
2nd biggest after Bitcoin
P2P Currency
launched July 31, 2015
1. What is a Blockchain?
Bitcoin vs. Ethereum
Turing-complete Programming Language:
Smart Contracts
1. What is a Blockchain?
Smart Contracts Code deployed to the Ethereum blockchain Programmable money: Escrow (Schief) User-Signed Transactions (Unwiderruflich)
= Kickstarter.com in simple lines of code (easy to build Uber, Airbnb, etc.) 1. What is a Blockchain?
Ethereum Building Blocks
Blockchain
Ethereum Building Blocks
Timestamps
Currency
Digital Signatures
Blockchain
Accounts
Immutable Ledger
Ethereum Building Blocks Transaction from: to: nonce: data:
Timestamps
Currency
Digital Signatures
Blockchain
Accounts
Immutable Ledger
Ethereum Building Blocks
Smart Contracts
Tokens
Multi-Signatures
Registries
Oracles (from real-world)
Timestamps
Currency
Digital Signatures
Accounts
Immutable Ledger
Blockchain
Ethereum Building Blocks
Notary
Equity
Voting
Boards
Reputation
Licenses
Bounties
Identity
Smart Contracts
Tokens
Multi-Signatures
Registries
Oracles (from real-world)
Timestamps
Currency
Digital Signatures
Accounts
Immutable Ledger
Blockchain
Ethereum Building Blocks Martketplaces
Crowdfunding
Loans
Insurance
Name Services
Auctions
Smart IoT
... and more
Notary
Equity
Voting
Boards
Reputation
Licenses
Bounties
Identity
Smart Contracts
Tokens
Multi-Signatures
Registries
Oracles (from real-world)
Timestamps
Currency
Digital Signatures
Accounts
Immutable Ledger
Blockchain
2. Building Blockchain Applications
Blockchain Applications Applications and "Platforms" Core Components Developer Tools Infrastructure
2. Building Blockchain Apps
Blockchain Applications Applications and "Platforms" Across various domains
Core Components Identity, Registries, Libraries for Tokens, etc.
Developer Tools Coding + deploying smart contracts, convenience tools
Infrastructure Client Nodes, APIs 2. Building Blockchain Apps
Blockchain Applications Businesses want to explore putting processes on blockchain What this means: Encoding business logic in Ethereum Smart Contracts + webapps Building Decentralized Systems (harder to hack)
2. Building Blockchain Apps
Current Ecosytem Proof of Concept Prototypes
- Asset Tracking - Land Registry - Solar Energy Market - Derivatives
2. Building Blockchain Apps
Current Ethereum Ecosytem Proof of Concept Prototypes
2. Building Blockchain Apps
Real Production Systems
Current Ethereum Ecosytem Proof of Concept Prototypes
Real Production Systems
Production Workflows: e.g. Content-Management Systems! 2. Building Blockchain Apps
Ethereum Blockchain Stack
Blockchain + File Storage
Blockchain
Decentralized File Storage (IPFS.io)
Ethereum Blockchain Stack
JavaScript Interfaces Blockchain + File Storage
2. Building Blockchain Apps
Ethereum Blockchain Stack
Front-End JavaScript Interfaces Blockchain + File Storage
2. Building Blockchain Apps
Ethereum Blockchain Stack Smart Contract function calls
Blockchain
2. Building Blockchain Apps
Front-End JS wired
Web UI
Ethereum Blockchain Stack Smart Contract function calls
Blockchain
2. Building Blockchain Apps
Front-End JS wired How to add flexibility for production systems where workflows can change?
Web UI
Blockchain Application Challenges Core components still being developed for: identity privacy developer tools APIs
(fully decentralized means having a local copy of the
blockchain but not always possible)
2. Building Blockchain Apps
Blockchain Application Challenges Hard to decentralize 100% Scalability: blockchains can be slow for UX & big (60 GB+) Security: hacks, developer community still growing
2. Building Blockchain Apps
User-friendly Web Tools Identity & Accounts uPort
(Digital signing via TouchID)
MyEtherWallet, JAXX, Metamask Semi-decentralized APIs
e.g. Metamask Chrome Plugin: - No need to install Ethereum
(browser wallets)
Drupal x Blockchain Strategies
Drupal x Blockchain Strategies ... Fully decentralized CMS?
Drupal x Blockchain Strategies ... Fully decentralized CMS?
DB dumps & changesets on blockchain
Drupal x Blockchain Strategies ... Fully decentralized CMS?
Pub-sub Microservice for some Tx's
Drupal x Blockchain Strategies ... Fully decentralized CMS? Versioned Smart Contract Registries & Hooks
Drupal x Blockchain Strategies ... Fully decentralized CMS? Versioned Smart Contract Registries & Hooks Pubsub Microservice for some Tx's DB dumps & changesets on blockchain
?
Private vs. Public Blockchains
Private Consortium Blockchain (permissions, privacy)
2. Building Blockchain Apps
Global Public Blockchain
No need to put everything on a blockchain! What requires an audit trail (Buchungskontrolle)?
2. Building Blockchain Apps
3. What role could Drupal play
3. What role could Drupal play?
Is it a nerds-only thing?
Blockchains currently require more than 60GB of disc space Hard to set up and use for non-developers I am: 0xd62e7da1d30af2abed70f0ec677fefe0a0db5774
MetaMask Chrome Plugin No full Blockchain (API) Sign transactions in Chrome Metamask works on porting to other browsers Coming soon: JS developer library
"Transaction signers" Ethereum wallets, Identity providers ... there are different scopes and naming Mist browser (Full Blockchain) Metamask (Browser extension) uPort (Identity provider) MyEthereumWallet (Online or Offline browser) Jaxx (Mobile App & Browser extension) ...
Semidecentralization
How to connect Drupal and Ethereum?
current web
ideal decentralisation
Semi-decentralization Server just pulls data (no private key on Server)
Clients use JavaScript- based signing tools
Semi-decentralization: Verify and Sign Locally
Submit already-signed Tx's to a central Server
Workflows for decentralization Most data does not have to be fully trusted Drupal can provide editorial workflows and presentation layers to blockchain apps Ledger Signing official documents requires a lot of back and forward, sending emails, revisiting, revisioning, user management, roles, permissions, views ... Asset tracking Quality control signed digitally Supply chain tracking and visualization
Drupal Ethereum Module Ideas Frontend side Pluggable Transaction signer libraries e.g Metamask Backend side Guzzle JSON-RPC calls to any Ethereum Node Pull data
+ pull data
push signed data
Identity
Drupal has Identity Drupal user accounts Limited number of known participants Connect: Drupal UID
Blockchain ID
Optionally charge sign up fees Optionally create a validity period No Auto-renewal (sorry marketers)
Login Smart Contract 1. User adds their Ethereum address 2. Drupal generates a hash Store it with address Generates a transaction, which will store the hash to a registry in a smart contract 3. User Signs transactions with their private key (uPort, Metamask ... ) → Hash will actually be stored 4. Drupal verifies that the hash was stored and takes some action e.g. assigning a role to the user
Drupal Ethereum Module
Roadmap for Drupal Ethereum Module Connect Drupal/Ethereum on API level Pluggable Transaction signers Drupal Backend Data pulling Identity for Drupal (connect accounts) Field based voting system Store Hashes of the voting issues and let user vote Pull Blockchain Data to Drupal to make it searchable Integrate IPFS Field (decentralized file storage)
Ethereum based voting with Drupal
Ethereum based voting with Drupal Target Group NGO's "trusted organisations" Drupal-Based User management with Etherum-Drupal account connection Creating custom smart contracts Goal: UI to create Smart Contract and deploy them from Drupal admin-backend "Freeze a set of fields" to provide a time consistent content users vote on. Revisioning integration= Store a hash of the content in Blockchain Provide a UI to sign a vote using a transaction signer See my Blog post: http://bit.ly/drupalvoting
Looking at the future Editorial workflows integrating Smart Contract deployment Integrate smart contract libraries for digital autonomous organisations, DAO distribution Signed files, Signed Software releases Trusted peer to peer reviews Evaluate, mirror and search Blockchain content Pull Data from Blockchain categorize, search display, make accessible Trusted authors: Connect Posts and Blockchain Identity
Live list: http://bit.ly/drupal-blockchain-brainstorm
Why Drupal should care about Ethereum? Blockchain technology will change how things work We are experienced in open source sharing culture: we can help connecting Ethereum technology to end-users, our customers, startups, DIY nerds ... Drupal can provide Identity in the context of limited user groups We have the technology and experience to provide enterprise level workflows which might include signing transactions for "official publishing"
Questions? Join discussion https://groups.drupal.org/ethereum Tweet about #drupal-ethereum
Eva Shon http://beluga8.com @ohmu808
Thorsten Krug http://donkeymedia.eu @digitaldonkey09