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 Digital Identity The DAO Largest crowdfund in history: 150 million P2P Solar Energy Markets
Blockchain in Government UK Gov 1. What is a Blockchain?
Blockchain Hype "Drupal" "blockchain" 1. What is a Blockchain? Google Zeitgeist
I. Financial Currency Private equities Public equities Bonds Derivatives Voting rights Commodities Spending records Trading records Mortgage / loan records Servicing records Crowd-funding Micro-finance Micro-charity II. Physical Asset Keys Home / apartment keys Vacation home / timeshare keys Hotel room keys Car keys Rental car keys Leased cars keys Locker keys Safety deposit box keys Package delivery (split key between delivery firm and receiver) Betting records Fantasy sports records (!) Blockchain Use Cases A LOT! V. Other III. Public Records Coupons IV. Private Records Vouchers Land titles Reservations Vehicle registries Contracts Movie tickets Business license Signatures Patents Business incorporation records Wills Copyrights Business ownership records Trusts Trademarks Regulatory records Escrows Software licenses Criminal records GPS trails (personal) Videogame licenses Passports Degree Music/movie/book licenses (DRM) Birth certificates Certifications Domain names Death certificates Learning Outcomes Online identities Voter IDs Grades Proof of authorship / Proof of prior art Voting HR records Health / Safety Inspections Building permits Gun permits Forensic evidence Court records Voting records Non-profit records Government/non-profit accounting Medical records Accounting records Business transaction records Genome data GPS trails (institutional) Delivery records Arbitration 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 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 P2P Currency 2nd biggest after Bitcoin 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) 1. What is a Blockchain? = Kickstarter.com in simple lines of code (easy to build Uber, Airbnb, etc.)
Ethereum Building Blocks Blockchain
Ethereum Building Blocks Timestamps Currency Digital Signatures Accounts Immutable Ledger Blockchain
Ethereum Building Blocks Transaction from: <account> to: <account> nonce: data: Timestamps Currency Digital Signatures Accounts Immutable Ledger Blockchain
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 Real Production Systems 2. Building Blockchain Apps
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 wired Front-End JS Blockchain Web UI 2. Building Blockchain Apps
Ethereum Blockchain Stack Smart Contract function calls wired Front-End JS Blockchain 2. Building Blockchain Apps 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 (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 Blockchain Global Public 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)...
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 Frontend side Ideas 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