 Hello, I think it's time to start welcome to my presentation about Drupal and the blockchains Thanks for closing the door so My name is Thorsten. I'm working in the blockchain for a while and for Drupal in a very long time Currently I work for a Sorry Currently I'm working for a company in New York called consensus. We were like a startup Around close to 400 people now working in different sections of the blockchain lots of experimental stuff Myself I came to blockchain technology some about two years ago a friend asked me To do some some UI because he said he created a Twitter client and nobody can ever censor it was a Funny project. It's not maintained anymore, but basically it just wrote text strings into a blockchain and It showed me a lot of things and it made me very interested into this Who knows Bitcoin? It's most most of the people and who knows Ethereum so far. Oh, it's a lot surprised Yeah, my talk Will be might be a bit more technical than the last one about this the subject But I will try to start with a very simplified introduction to the blockchain technology So basically who cares about the blockchain it got a huge media coverage in the in the last one one two years and nearly all professional sectors like Evaluating how a blockchain might affect their work So for example, a lot of banks and bank consortiums try to to improve their inter banking trade In for example, I work in Dubai recently on on land registry project, so Dubai Dubai's King, I think decided till 2020 he want to have like all public governments documents on the blockchain To have like signatures proved by state But there's a I think there's a lot of more than the the enterprise part. I Really like the idea because it's a peer-to-peer platform. So I Like the idea that you you have like direct enable direct trade without borders and There's there's a lot of interesting projects. For example, one of my company's project is would you move music? they try to make a kind of like a music platform where you directly have Contracts we come back later to this where you say, oh, this is my license models for for my my song And then you can choose a payment option and you get a license for a movie or a license just to like stream it and something like this And you don't have like the payment is directly done to the to the music and you set up Oh, it's my band and this party gets so much share and stuff like this and Last year also like the the lawyers do a lot of research and thinking about how how this new technology will actually affect the Legal view so what what the blockchain is is bringing you to the internet? it's a new layer of trust which is Like it currently in the internet you cannot like trust on money and you have a central Network where everybody get the same value and it's sinking itself But we get there what I really like about it. What I just said is the idea of like sharing economy it's basically the companies like uber or something take a share of a taxi driver and I see a high potential of rebuilding this stuff into like Without these big companies in the middle in the decentralized way and there's also The idea of stuff so sovereign user data so that you Put up a profile and then you have at a station. For example, you put a address on your on your profile and then whatever a bank or Country can like a test that this Information you put there is valid So how to imagine this this mystical blockchain? I kind of like the idea It's the most simple way to explain it. It's like a Decentralized database which keeps itself in in sync. So if you if you take Bitcoin as the the First blockchain as an example So it says oh this address owns that money and then you transfer the money to somebody else and if the Every node of the network go into consensus about this So if I set up one own node and I say oh no I own like more bitcoins than the five I actually have the network will like Find out that I do like wrong information there And it will just like kick me out of the network because I I kind of forked the chain And I didn't agree to the consensus so So about the terium like a terium is I think a little bit a later version of the blockchain Bitcoin Only does money transfer Where like Eterium is it's based on all implementations are open source and it offers a lot more Functionality than Bitcoin does so in the Ethereum blockchain you have next to this database consensus as I as I called it is peer-to-peer network of nodes confirming each other you have Like this leads you to a global ledger So you can put a value there and the value is like every every note has the same value Which enables like things like this registries that you can like you put a hash of a document there and then Nobody can like change the history and can say oh the hash was different. I want to change the document It was not really my favorite So you just can't do a new transaction and everybody will see that you changed it the the Also new thing compared to Bitcoin is that you can create a scripting This this business value of money But I come back to this in a second Basically the the whole system is based on asymmetric cryptography a little bit like a like with PGP I Also come back later to this so how we get the The data into like the chain So basically there's like a new block created every I think like 15 seconds or something There's a new block created and it takes all the sign transactions together and combines them into a block and the block always contains the hash of the last block and The next block has the hash so so you cannot like break this change without Break this chain without knowing it One thing is like an Ethereum blockchain data is kind of public It's a little bit binary encoded and you need to know the The way you put it that you can read it, but it's not encrypted There's some some other Implementations of Ethereum like a quorum which kind of it goes for for privacy protection in this, but this is like not yet the default So what is a smart contract? Basically, I have this this example of the most simple idea of a smart contract that I seen in the crowd founding so basically You'll say in a crowd found you say oh if I if I found like whatever 10,000 Dollars or money units Then my crowd found is successful So I will move the the money to the founding account but if this does not happen by the by the given time you can Automatically transfer the money back to its original owners and if you have this deployed the your your Like it's it's gonna happen. You cannot like just change it. Oh, I decided the 9,000 is enough so it's It wouldn't work So the smart contracts they have like addresses so you can like address them and interact with them To make the transactions like so everything is based on this in this asymmetric crypto key pairs and You need like in order to put anything on the blockchain. You need to to sign it with your with your private key Every private key is like represents that address, which is like at every word of the public key But you cannot only sign transactions with this There's like some other things which you like work with asymmetric cryptography before Which is doing just signatures like on a text without necessarily interacting with the blockchain So basically when you when you have a text and you give a signature to it And you have like a string of the signature And if somebody has the the text and the signature it he can say Oh, you are the only one who could produce the signature So he knows that you own this this private key without knowing your key and You can also like encrypt data with this keys So one of the the evolving stuff and and one of the most challenges currently is getting This to all browsers that this is like a very highly moving environment And currently there's a meta mask you see in the image Which is a browser plug-in. It's currently developed into a Browser independent plug-in There is like the original Ethereum miss browser. This is the two to ones. I have currently a Working in my proof of concept application, which is the current module, but there's a lot of other projects developed and I think In Yeah, the timing is hard to say I'm optimistic that we get more and more end user devices in actually being able to to interact with the blockchain So this is just some of them coming on the horizon So when I think about RuPaul, we always want to like serve like every user of our website So I think it's not yet the ecosystem is not yet ready that you can just like make an application for like everyone because the all these transaction signers are not that Advanced that that you could like say, oh, I target all browsers immediately and In the module also concerning signatures, there's like a created kind of two different ways to do the same thing One one is a Smart contract based sign up where you kind of get a challenge from Drupal and you sign it as a Transaction into a smart contract registry and Then Drupal can read that you signed this and then it knows. Oh, you're on this key. So you're Added to this registry in the contract, but this is basically a transaction Which which costs a little money like in Ethereum all transactions Um Cost it's not much But if you write data to the blockchain you need to pay something Because this money is used to actually as an incentive for the people who are running this blockchain nodes That they that they that they do it, you know but I created a second sign up module which is like a non blockchain it uses the same techniques But it just signs a challenge. It's a challenge response authentication. So Drupal you don't need to like pay for the transaction you can just sign up So basically just a little bit a summary. There's a lot of a lot of different things happening in the ecosystem Ethereum is specified by a Yellow paper it's called and it has different implementations like on the on the client level It's like it parity forum. There's like a test environment, which doesn't actually connect to the blockchain. It's just for testing So the implementations are not hundred percent the same So I ended up building a library to abstract it. It's like a strongly tied PHP 7 library because All the data types you want to write to the blockchain and need to be like strongly typed otherwise it wouldn't work and And on the front end you also have the problem that you don't know yet exactly which Tools that your end user have to sign transactions. So Like on the on the PHP side the library is kind of working but on the front end I'm currently use a support metamask amissed But we need to have like a more pluggable infrastructure that you maybe also can like just scan a QR code to sign this transaction in a totally external device I Think this is one of the biggest challenge to integrate many clients and you also need to evaluate which are actually in use so There's like basically, Ethereum is a Fast evolving system. It's the main language for smart contract the solidity it's still in a 0-point release and It's it's like constantly evolving. There's new libraries people evolve evaluate different ways how to do things We have a currently a transaction throughput of about I think it's like around 15 transactions if you only do value transactions like you would do in bitcoins like 25 But this is like not really a scale where you where you can like reach like large sites Visa processes I think 60,000 transactions per second. So There's the goal is from an Ethereum foundation to reach the the Transaction speed of visa, but it will take some years Yeah, basically the blockchain is really large now. It's 280 gigabyte every time I talk about it It's like doubled up. So There's a light clients and development. Basically, you cannot have like a client with 280 gigabytes to deliver on a phone So there's like web services if you're Is a service which you can like use to connect to the blockchain which I use as a default in the module But this is all in high development. I think in within a year We will have light clients which don't download the whole blockchain just like headers for verification Drupal Ethereum module and you just beat up a bit I picked it up in 2016 found out that it was like not really working and I kind of completely reroute the library below Currently we have a proof-of-concept some some part is in GitHub only because I couldn't like make it solve one problem which which I would see required to put it in a in a Drupal branch because now it's not only still depending on a external tool And I focus on creating the infrastructure around so My company we really favor the idea ideal Decentralization so compared to the current web you would have like the Ethereum network as a data share layer and IPFS is it's called interplanetary file system. It's a decentralized file system where Like the idea is like everything is like decentralized and you just interact with decent centralized stuff But in practical The world is not that far so About every blockchain application. I now currently needs a central database somewhere and I came to this Which kind of this is the point where it really fits into into the Drupal environment so I Don't want to host Keys on on a server because if you if you do like oh we make a password login and we create a Private key for you. You just have the security of your your sign up process so the current focus of the Drupal module is Transactions sign signatures are always done in the front end Because you should own your key. I don't want to have the key stored somewhere. I would not do it on a web server for sure So basically you have a front-end site where you where you sign a transaction This will directly go to the to the Ethereum network and then Drupal can validate if this a transaction actually happened So you sign up into a like a registry in a smart contract and then Drupal will like see oh this transaction has happened Yeah, he really signed up so you have kind of like a circle Validation and Drupal will only pull data the PHP layer will only pull data so I Try to Get a little bit to the architecture We have like the Ethereum nodes, which is like decentralized network and We might also Like one plan is creating an entity type for nodes that you can kind of like do an easy listing in views Listing all the servers whatever if they're online on offline or they're there The server information you can can gather a query from nodes Currently we only have like one fixed connection that this is like one part What already kind of works is the connection of Drupal Ethereum accounts with a Drupal account Sorry, Ethereum accounts to Drupal account Where you kind of have the possibility to create like a known user you map this Ethereum address Which is just a text long hash To to accounts and then you have for a limited user group. You can say oh, this is my users So every interaction is creating transactions another thing I think it's really important for this module is to be able to listen to blockchain changes and Say you deploy a smart contract and it creates a registry So you want to know like every time somebody submits this you would create the entity on the front end That you can kind of act on this, you know the contract you read the data and it's like oh this value is submitted and you act on this and We have smart contracts In an ideal world, we will like just deploy them out of Drupal. I think Or I'm working on on infrastructure to to enable this that you you have like test networks and live network and You would ideally just like load a module a sub module of the Ethereum module Whatever a voting module and then you deploy the contract which is delivered with there to a network in admin UI using also a transaction signer to deploy And Basically the every contract that defines as its own data types. It's called this a contract ABI And Drupal needs to know Which is the data types in a contract in order to read the data? Otherwise, it's like a unknown hex data and you don't know where it start and words if it's a ray or if it's a string so current state We have this this Sign-up module and into two variants one is in in GitHub. I created a Docker script to test it and Basically, there's a lot of things to be done I was like actually very little on time in the last half year about I'm very optimistic that in November I'm gonna start like get much more time on this project Underlying PHP library is not like supporting the heart complex data types yet What I what I explained with the transaction sign is I need to develop a pluggable system that we can replace different and user transaction signers on this and Contract management and deployment and server entities I think this is like the basic infrastructure modules we need in order to create like real applications on top of this So why why is this actually interesting? I think it will really change the internet on the long term and Drupal strength is actually enterprise workflows And So I see a lot of potential applications like asset management document signing systems Where you basically need a user workflow on the back-end side in order and you have a Visualization like views making making it nice and I think this is something Drupal would really fit in And there's also the idea of like creating the decentralized Organizations which is a That you create a founding out of of Ethereum members and and Do budgeting or voting systems like you you say oh, this is our budget and we vote for this There's some ideas, but I have to admit that I was optimistic We get earlier to this but the infrastructure work is is more more than I than I thought so far and Yeah But it will come in an ideal world. We have out of the box stuff so I Planned about a buff session tomorrow for people who want to discuss more use cases I lacked a little bit the actual applications this time. It's more in my last talk And I invite you to join tomorrow Discuss more about what what you can imagine in Drupal and blockchain connected Yeah, that's my slides you find there Thank you. My company condensers is sponsoring my time. So I'm grateful to be able to work on this And that's it Any questions Okay, thank you. Oh So you talked about the sign-in process in Drupal and that it then checks if the Transaction was processed on the blockchain via php. How long does that take is it instant? Or do you have to wait like 15 seconds before it picks it up and says, okay, it's okay You can log in it it takes a little time 15 seconds might might be right. It's the average block time. It's not as instant and all as a regular login Yeah, it works in the other way like basically this one login is like really doing a transaction We'll take the time if you if you use the approach of challenge response Authentification where you're just like sign. It's instantly because you don't need to wait for the blockchain. It's just like Local crypto coffee. Okay, and then one quick other question like Now you still need like the metamask Plugin or another kind of browser. Are there any plans to integrate it into existing browsers like Chrome Safari Internet Explorer? Or that's still way into the future so so The most common Tool for this currently is metamask And it uses a web server so it doesn't download the whole blockchain the Ethereum browser does downloads really did 280 gigabyte blockchain now. It's a challenge and but It's developed into like a more non-browser independent Javascript library I Think there will be much more to come like currently I'm thinking about how is the smartest way to integrate it to make it really Exchangeable that we can use all different kinds of transaction signers. Okay. Thanks. Okay. Thank you