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 Currency A LOT! Private equities Public equities Bonds V. Other Derivatives Coupons Voting rights III. Public Records IV. Private Records Vouchers Commodities Land titles Reservations Spending records Vehicle registries Contracts Movie tickets Trading records Business license Signatures Patents Mortgage / loan records Business incorporation records Wills Copyrights Servicing records Business ownership records Trusts Trademarks Crowd-funding Regulatory records Escrows Software licenses Micro-finance Criminal records GPS trails (personal) Videogame licenses Micro-charity Passports Degree Music/movie/book licenses (DRM) Birth certificates Certifications Domain names Death certificates Learning Outcomes II. Physical Asset Keys Online identities Voter IDs Grades Proof of authorship / Proof of prior art Home / apartment keys Voting HR records Documentary records Vacation home / timeshare keys Health / Safety Inspections Medical records Data records (sports scores, Hotel room keys Building permits Accounting records temperature, etc) Car keys Gun permits Business transaction records Sim Cards Rental car keys Forensic evidence Genome data GPS network identity Leased cars keys Court records GPS trails (institutional) Gun unlock codes Locker keys Voting records Delivery records Weapons unlock codes Safety deposit box keys Non-profit records Arbitration Package delivery (split key between Government/non-profit accounting Nuclear launch codes (!) delivery firm and receiver) Spam control (micro-payments for Betting records posting) Fantasy sports records (!) From http://ledracapital.com/blog/2014/3/11/bitcoin-series-24-the-mega-master-blockchain-list How it can change the world
Internet of Internet of Information Value
"Sharing Economy" of Reduce Uber, Airbnb Middleman
Centralized User Data, Self-sovereign Facebook, Google user identity
(Selbstbestimmte Identitaet)
Promises greater transparency, efficiency What is a Blockchain? "Next-generation of the database or internet"
Network Database
1. What is a Blockchain? What is a Blockchain?
Network Database Currency Public-Private Keys
1. What is a Blockchain? What is a Blockchain?
P2P Consensus Global History Programmable Digital (No one can change) Money Signatures
1. What is a Blockchain? 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
Digital Immutable Timestamps Currency Accounts Signatures Ledger Blockchain Ethereum Building Blocks
Transaction from:
Digital Immutable Timestamps Currency Accounts Signatures Ledger Blockchain Ethereum Building Blocks
Oracles Smart Contracts Tokens Multi-Signatures Registries (from real-world)
Digital Immutable Timestamps Currency Accounts Signatures Ledger Blockchain Ethereum Building Blocks
Notary Equity Voting Boards Reputation Licenses Bounties
Identity
Oracles Smart Contracts Tokens Multi-Signatures Registries (from real-world)
Digital Immutable Timestamps Currency Accounts Signatures Ledger Blockchain Ethereum Building Blocks
Name Smart Martketplaces Crowdfunding Loans Insurance Auctions Services IoT
... and more
Notary Equity Voting Boards Reputation Licenses Bounties
Identity
Oracles Smart Contracts Tokens Multi-Signatures Registries (from real-world)
Digital Immutable Timestamps Currency Accounts Signatures 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 Real Production Prototypes Systems
2. Building Blockchain Apps Current Ethereum Ecosytem
Proof of Concept Real Production Prototypes 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 Front-End function JS calls wired
Blockchain Web UI
2. Building Blockchain Apps Ethereum Blockchain Stack
Smart Contract Front-End function JS calls wired
How to add Blockchain flexibility for Web UI production systems where workflows
2. Building Blockchain Apps can change? 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 (browser wallets) Semi-decentralized APIs
e.g. Metamask Chrome Plugin: - No need to install Ethereum 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 Global Public Blockchain Blockchain
(permissions, privacy)
2. Building Blockchain Apps 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) ... Semi- decentralization 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 Thorsten Krug http://beluga8.com http://donkeymedia.eu @ohmu808 @digitaldonkey09