New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

iExec: Allowing Scalable, Efficient and Virtualized Off-chain Execution...

DevconTue, Oct 9, 2018, 12:00 AM

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more. https://archive.devcon.org/archive/watch/3/iexec-allowing-scalable-efficient-and-virtualized-off-chain-execution-for-arbitrary-applications This presentation is a follow-up to Devcon2 and EDCON. We’ll introduce the iExec SDK that allows to execute any legacy applications from Ethereum smart contracts. Using a set of simple CLI tools, developers can register, deploy and administrate their applications in the iExec distributed Cloud. We’ll present examples that explain the solidity smart contract API and illustrate off-chain computations. Speaker(s): Gilles Fedak Skill level: Intermediate Track: Developer Infrastructure Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon 3 was held in Cancún, Mexico on Nov 1 - 4, 2017 Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

Transcript

Yes, so thank you. Today I'm going to present you our solutions for efficient and scalable off-chain execution for arbitrary application for um um iExec. I am Gilles Fedak. So first, let's thanks and give a big kudos to the team because they worked really hard to be ready for Devcon 3 and having this release uh ready. Some of us are here.

We are at the booth just over there at the uh at the outside of this of this conference room. So we are now about 13 people in Lyon in France and we are going to be a little more, four more joining us by the end of this year. So that's a wonderful team and I'm really proud of them. So what we are doing at iExec, we're doing the Ethereum-based decentralized cloud computing, which means that we are using the Ethereum blockchain to create a decentralized marketplace for cloud computing resources. So those computing resources that can be what you typically found in a cloud, so servers, applications, and data data sets.

And so we are using the Ethereum blockchain to advertise and provide those computing resources. So you can figure that as a sort of Airbnb for servers, but without Airbnb and of course in this case, this is the blockchain that creates those peer-to-peer interactions between the users and the providers. So having a decentralized cloud, why does it matter? For two main reasons, I would say. The first one is that we can see that in this conference, there are more and more new decentralized application in this coming a new uh decentralized economy, and so we now need an actual infrastructure to support those new application.

That's the first reason. And the second reason is that this this this this decentralized cloud uh the infrastructure is going to be very different. It's going to be distributed. And probably compared to the centralized cloud, we're going to have many advantages because the marketplace is certainly going to be much cheaper. It's going to be distributed, so it will need to be greener, and certainly more efficient because the data are going to be closer to the to the consumer or producer.

So, what are the the applications we are targeting? First, we are looking at the blockchain-based uh distributed application, the DApps, so the application that execute on the blockchain. And you know that the uh the Ethereum Virtual Machine offer very few computing capacities to those application. The processing is very low. It's extremely expensive for storage and computation, and so they need off-chain computation to have an actual I mean, to be really important application.

The second category is what we call the legacy application. Those are these the application running now on the cloud that would eventually come to our infrastructure because we can offer a better price per price performance ratio. So, here we're thinking of applications such as simulations, machine learning, uh finance, 3D rendering, and so forth. And the next uh category are those applications the data as close as possible to the to their origin. So, people talk about the data calling that fog or edge uh computing.

So, with the one of the key uh the fundamental um point in the protocol is the uh iExec tokens called RLC. So, this is a pure utility token. This is the way people can enter the network and use the computing resources that are in this decentralized cloud. And this is also the way provider for resources or application being paid. And this is very important also because it allows to create incentives in the protocol and that's something that is really new compared and that can be eventually an an advantage compared with the existing cloud and the way we're doing this.

So, we issued this token on mainnet on the last April 2017. So, the road map, where are we are now? So, we started about 6 months ago. We are now the the first version of iExec. So, the way when you create a distributed infrastructure, it's a kind of a chicken and egg problem.

Do you first start to have the machines and then in the network and then you try to find some application to run on this machine or do you first start to with the applications and then once you know the application you then you can create a relevant architecture. So, when we design this road map for iExec, we design it by starting with the application in particular with the dapps and then later that will come in next May or next June, we'll open the network to the servers. So, it means that at the moment you can push any applications, but they're going to be executed on our machine. So, you somehow you have to trust us, but later on in next June, it will be any machine that can compute any applications. So, we are very pleased today because we are not see the first version of iExec and it's called the Wanderer.

So, the way we are naming the iExec version, we take characters from the Chinese novel Water Margin. So, I don't know if you know this novel. I love it. It's a story of people who rebels who rebel against the the central authority in middle age China. And here the one who writes the number 36 in the among the the rebel.

So, this version one is basically a software development kit that allows you to deploy your application on Ethereum and I exact. So, I'm going to uh present you how it works. So, this is a video but really I I encourage you to to to try the tutorial by yourself by yourself. It's much more fun than watching a video. So, what you see here is actually a screencast of uh it's actually a screencast of um a web page.

And so, you don't have to install anything to to do the tutorial. Uh you just visit the web page. And the tutorial is about 6 I mean from 10 to 1/2 an hour depending on what kind of testnet you're using. So, when you So, uh DSD So, first you install the SDK. That's very similar to truffle.

So, if you are used to truffle, you will find that it's exactly almost the same. Uh then we are here with this tutorial, we are playing with a toy application, of course. It's factorial. But if you are using if you are installing the SDK on your own machine, you will be able to use any kind of application. So, when we start, we first get some ETH just to be able to deploy the the contract.

We using a function which is called iExec deploy. So, iExec deploy those two things. On the one hand, it compiles all the Solidity uh smart contract. It will deploy it on Ethereum. And the second thing that it does is that it um it compiles or it it pushes your existing application to iExec.

And what you just in here, it's the application what has been deployed on iExec. So, now what you will see here is that we're going to to use the application. I use the user. So, for doing this, we first retrieve some RLC tokens. Uh we allow the sub the the contract would spend those tokens.

And what we're doing now is that we submit a job. So, once you submit the job, you can see that the I'm going to stop here. You can see that the So, when you submit the job, the job here is being computed. This is why you see pending and pending. So, it has been accelerated, but of course it takes a much more I mean, it can take more time.

And when it's done, so this is the hash of the transaction that you got from the the smart contract. And when it's done, you can see that you you you you finished the job. And this this is the result of the of the computation. And you can see on the explorer, so this is an explorer we provide to see the what's going on between off-chain and off-chain. And you can see the result of the computation in the smart contract or you can retrieve it using our our command line tool.

So, what is the the deployment strategy for Rondo? So, what you have seen uh now is that it's running now on a Robsten and on other testnet. So, we are going to deploy it uh in the coming uh weeks. So, first we deploy the SDK with own application the next 2 weeks. We are going to create an app store so that it makes the application for the end user much more user-friendly because at the moment they have to interact with the smart contract.

And uh later on by the end of the year we're going to deploy this app store on mainnet which means that developers using iExec will actually be uh able to earn uh RLC tokens. So what happens under the hood? Uh what we do is that those computations are actually executed on distributed infrastructure. So we call worker the machines that join this infrastructure join this network and that provide their CPU time to execute the application. And so we organize those workers in worker pool a little bit like you have miners and minor pool it's exactly the same the same idea but here any worker can execute any arbitrary application and not just mining.

And what we do is that that we have an oracle that looks at what's happening on the blockchain on the smart your smart contract and each time the the oracle detect that there's a transaction in the smart contract it execute the corresponding application on the workers. So for version two uh it means that any computing resources can join the network and also of course it causes a lot of of issues in particular with respect to a security. And so since this September we have launched an ambitious research program uh that has started very well actually. So we're working on two things. One is proof of contribution which is basically a consensus protocol to verify that the execution that were off-chain everybody agrees that the computation is okay before proceeding to the payment.

That's one and the second it's some some security research that we are doing to protect both the application and the remote machine. So actually proof of contribution is done by a PhD student, uh Adrien Crobois, who is a student at uh École Normale Supérieure. Uh for more long-term uh perspective, uh we think that we are really lacking some good experimental tools to understand the performance of those uh blockchain-based distributed system. So, we are starting uh PhD thesis in collaboration with a lab in France, which is called Loria. Uh and those people, they are really experts in emulation of uh very large parallel distributed very large distributed system, sorry.

So, why do you want to do emulation? Because it allows you to do experiments, but with an existing software stack. So, it's much closer to the reality than just uh doing simulation. So, it's not only for us, I think it will be very interesting also for the Ethereum community to have such such tools. Basically, you can test your software very rapidly on tens of thousands virtual nodes.

So, some words about uh proof of contribution. So, we started this um in September about. We now have an early solutions. It's based basically on a stacking and reputation. So, Adrien come up with a very interesting protocol.

It's very simple. Basically, the idea is that for each execution you submit, you associate this execution with a confidence threshold. And so, workers, they have both a reputation and the reputation is gained according to their past uh work, so if the the the task succeeded or not. And they also have to stake some money. To stake some token.

And so, what we do is that each time we receive the the some results, we compare the results and we compute uh a new confidence threshold. And if you can pass this threshold, then the the result is accepted by the submitter. And so, task is duplicated or replicated as long as the confidence threshold is not met. And so, at the end what you have is workers who behave correctly, and in this case they receive the payment, and some who did wrong because maybe they they tried to to steal some money. In this case we punished we punish them, we take their stake, and we distribute the stake amongst the workers who did correctly.

So, the good thing with this protocol is that it's actually very simple. So, it's simple to implement and then to verify also, and it will be also simple to optimize. So, at the moment Adrien is doing the performance evaluation, and we are quite happy with this this early results. The other thing when you compute when you do an execution on a machine you don't trust is the security. And so, there are two aspects here.

So, one is the sandbox sandbox thing. It's the technique that protect the workers from the application. So, imagine the application is a virus. What you want to do is to execute this application in sort of a restrained environment where you control what the application is actually going to do. So, this is something that is not new, it exists for years actually.

There are many way to do that, can be at kernel level or virtualization. Basically here the main issues are more with respect to deployment. Who is it going to be you know to be installed by the machine joining the network. The second thing that is really new the second thing is how you're going to protect the application from the worker. If you don't trust the machine, how the machine is going you know that there can be some privacy issue.

So, up to now we had no solution for that. But since since some time there is a new solution that that appears, it's called enclave, and in particular thanks to Intel SGX which is a a new instruction set that that are now deployed on the uh Intel processors. We now have solution for that. So, an enclave, this is basically um uh a memory space that is for you where you execute your application. And even I mean, even root on the machine, even if you have privileged access on the machine, you cannot access to this memory because it's fully encrypted.

And the way to decrypt the memory is in a secure element in the processor. So, what we are doing now is that we are evaluating uh two solutions to execute our application within an enclave. One is called the Scone, something that has been published at the OSDI um this year. And this allows you to run a Linux container in the enclave. There is another solution that we are looking at, it's called a Graphene SGX.

It's the same idea, but instead of container, it relies on library OS or a micro kernel, it's almost the same thing if you want. So, a couple of uh things that are coming uh in the the very next future. Just after Devcon, we're going to run an ask me a anything on Reddit. Then we're going to participate to the supercomputing conference, even though we are not in cryptocurrency, we still love those big machines that that you have at supercomputing. It'll be in Denver, Colorado.

Uh we're going to organize a series of meetup starting with uh Lyon so that people can get in the technology and use that and start to develop their own uh application. By mid-December, hopefully um the app store for distributed application will goes live will go live. And so, you will be able to publish your application this uh app store. By December, we're also going to launch uh um a dapp development challenge. The idea is really to to to to give bounties to developers so that they can propose us some cool application and we will be really happy to support them.

And by the next year also, we are going to launch uh another program, which is the iExec Summer of Code. So, I don't know if you're familiar with Google summer of code. The same ID. So it allows students you know everywhere on earth to work on any subject related to decentralization. So it's not only for exact, it's for everyone.

Okay, so as a conclusion we've been really happy to present to you this first step for I exact. Hope you will try it. Meet us where we have a booth. And happy defcon, happy hacking.

Automatic transcript — names and jargon may be misspelled.