Ethereum for Drupal + PHP
#DrupalEthereum @digitaldonkey09
Overview
- Semi-decentralization
- Ethereum-PHP library
- Drupal Ethereum module
- UX challenges
Why care about Web 2.0?
Source: https://w3techs.com/technologies/details/pl-php/all/all
CMS
But that's not decentralised!
Ya. Goal is semi-decentralized (for now).
Many Dapps add a database
- cache for faster queries
- optional app metadata
- UI loading response time
- triggers / watching contracts
- user profiles
Semi-decentralized
Client signs using Transaction-signers
Server just pulls data
(no private key on Server)
Open Source
- Create standards, EIPs
and enable many to adopt them easily
- Many applications can't be build on Ethereum/Client JS only. They require searching, caching, geo searches....
- Global standards, local markets
road to a decentralized economy
Ethereum-PHP
a PHP library
Similar Ethereum Integration Libraries
- pyethereum
- ethereumJ
and many more...
Full Client?
Integration
Libraries
Complementary Tools
The goal is not a full client, but a toolset to easily build services connecting the web 2.0 to Ethereum
Ethereum-PHP Library
-
Abstract & simplify Ethereum JSON RPC API
-
Provide keccak hash, EC-Verify in PHP
-
Call SmartContract like in web3
-
Lots of tests, ability to test against smart contracts
-
API documentation: http://ethereum-php.org
- https://github.com/digitaldonkey/ethereum-php
Ethereum-PHP JSON-RPC
connector for server pulls
Drupal Ethereum
a Drupal module
Mapping Ethereum to Drupal
Infrastructure modules
Servers (Ethereum-nodes)
List Servers, gather information (Server Entity)
Deployability, Testability
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 Events data in Drupal
Smart Contracts
Manage deploy as Drupal Admin
Provide ABI to process data in Drupal & frontend
Watch for Blockchain Events triggers by Contracts
Architecture challenges
Current features
Ethereum Signup
- Challenge/response authentication
- No Blockchain interaction - no fee
Ethereum user connector
- Registry contract, which may be changed to a paywall
- Example module for contract interaction
Basic Infrastructure
- Manage Networks, Ethereum Nodes, Contracts
- Some frontend interaction experiments
Text
Text + Private Key => Signature
Text + Signature Text => Public Key (--> Ethereum Address)
Ethereum Signup: Challenge-Response account creation + login
Ethereum User Registry
User Interaction
and
The challenge to reach mainstream users
"Web of wallets"
diagram by Bobby Dresser (uPort)
Stumbling towards mainstream?
- How to help users not lose their key?
- Deal with Identity contracts (no ECverify available)
- Integrate multiple wallets - allow users to chose
- Is the user/wallet on the right network?
- Unlocked account required?
- How to onboard new users, which have no wallet?
⇢ Experiment with UX interactions
⇢ Develop standards for Dapp interaction
Architecture summary
(MetaMascara is an experimental zero-install signer)
Mascara & Dapp launcher
everything is an experiment
Visualize TX signer state
Initialize dapplet when requirements are met
Dapp launcher wish list
- Support all major browsers on desktop and mobile
- TX signer supporting major wallets / identity providers
- Does not depend on a centralized service
- Fallback for users who don't have a wallet (Metamask Mascara?)
- Standards for interactions for users
- Learn to chose right network / unlocked account only once
-
Standards for Developers
- Write once implement all
- Not forced to use any particular front-end tech
Questions & Thank You
- https://www.drupal.org/project/ethereum
- https://github.com/digitaldonkey/ethereum-php
- https://gitter.im/ethereum_php
- Tweet about #DrupalEthereum
thorsten.krug@consensys.net
@digitaldonkey09
The development of Drupal Ethereum Module
has been sponsored by ConsenSys
@ConsenSys
https://slides.com/digitaldonkey/paralelni-polis
Lots of Thanks to early
contributors & testers
and all others I talked to
(Commit stats refer to the various involved projects)
Ethereum for Drupal + PHP
By Thorsten Krug
Ethereum for Drupal + PHP
DAPPs ADOPTION PARALELNI POLIS - June 2018
- 2,116