ROFL 101 - Bernhard Ruf | Oasis
ETH Belgrade Community·Tue, Oct 7, 2025, 12:00 AM
ROFL 101 - Bernhard Ruf | Oasis
Transcript
Hi guys, I'm Bernhard. I am from the Oasis Protocol Foundation. Um, I will talk today about Oasis and like their tooling, Sapphire and especially Ruffle. Uh, who of the audience here knows Oasis already? Okay.
Uh do you know also our raffle application? Okay, most know like some stuff. Um yeah uh if you know already Oasis yeah we are on blockchain. Um we have a kind of two-layered architecture with a consensus layer and different uh virtual environments especially we have a confidential EVM. But uh maybe quick uh um a question back like why we do actually blockchain.
There was also um last week in if brag again a bit spark of discussion if we have to do everything on black on blockchain and that's why I want to remember like what is the pro and cons actually doing uh stuff on the blockchain like why we do it we do it that we have like censorship resistance that like we have redundant um computation and like also the storage like auditable like everything what we do. But like this is also very expensive like if you run your archive node from from Ethereum that's like um terabytes like yeah pabytes in some way. Um and like it's very slow like the finalization for for Bitcoin is is is like an hour. Um with Ethereum we have like 12 seconds a block time but still like uh the final finality is still also a bit longer. like in pock um and we have everything public everything you do on Ethereum or any other EVM like everything is public even if you write private variables you can read the storage um with our technology we we solve some of this uh cons already like we we don't have public state like our state contract state is encrypted um only contract can read his own storage and you need actually to write public functions to read private storage from contracts.
And we have also instant finality like um so like we have a six seconds block time which is also already shorter than what Ethereum has which is obviously still slow if compared to to newer blockchain stopped. Ah okay. Um no worries uh like where you have like like with arbitum like 100 milliseconds or what it is nowadays. Um but uh yeah I will come to that how we actually will will solve that but uh how we solve like the encryption and um like other things is um we run our network in TEES. So everything runs in the black box of of tees um to have also like the encrypted communication.
We also have like special um clients for um JavaScript go and python which help you um send encrypted transaction on chain. So like nobody can see what the call data what you sent on chain like this. You have really private um communication and also me protection. Uh additionally we have some additional functionality um like some pre-ompiles which goes to randomness you can make encryption decryption you can do signing directly on chain um how does this look like uh yeah we have a library which makes it easy to use where you can just use random um or like um sapphire generate signing key pair on the signing key pair it's not only like EVM you can also create key pairs for for pola dot for substrate or like also bitcoin. Um you can do use the different signing curves to create directly generate the c kinding pairs like this you can create private keys for different chains uh and also sign for different chains and then can actually then at the end only needed to be broadcasted to execute something on another chain.
Um yeah let's uh hear a bit more about the signing also um seph sign you can then sign with this private keys and we have also a way um yeah to do gasless transactions um we're supporting like the EIP155 serum [snorts] but yeah but going back to expensive computation also slow computation like um do we actually run need to run everything onchain or is there some other way where we can verifiable uh compute stuff uh in another way. um was already also last week mentioned in brag like yeah why we don't not run everything in TE like what was someone saying or like at least run some more stuff in a TE like we can have verifiable compute in there and that's what we're doing with raffle with raffle like you can just run any computation more or less like you can put any docker container so any anything you can put in a docker container you can also put in a raffle app so like it's back end front end like uh AI stuff uh you can run yeah like local um in a docker so you can run this also in in raffle nodes um additionally like you can make can have access um to the internet so you can pull like for oracle prices or news uh aggregate news in a verifiable way or like sport results or everything. So like yeah we can do a lot of actual prediction markets which use of um sources from from news and stuff you can verifiable compute in our ruffle environment. Additionally it has a light client to um to sapphire. Maybe I show you the the graphic for here.
So you can see um the ruffle app runs also in the in oasis node. So like they run on the on chain. They have attestations on chain that they run securely the the newest security patches and no um raffle node like which is not up to date or run some other fineware can actually validate the chain and also not the the raffle apps. Um yeah and through the light client we have also direct communication to sapphire. So we can validate onchain like if a call was made from from a raffle app.
This helps you um yeah um to to have like for for the raffle app like your own private keys. This goes in the direction if you want to have your agent have their own keys and where nobody except like the raffle app itself can control the keys. Uh you can do this securely um with our um stack. um for the steps like how you actually uh ruffle ruffle nice u um dockers um yeah there's a we have a CLI which which makes this very easy uh at the end like you kind of just uh use docker compose to to build your app push it app to OCR um register the app um well init app create the app onchain this is all the apps are also registered on on the sapphire chain Um you you build your app um um uh which then generates like the.org file which you either then can push on your own node or like use also our um more or less marketplace where we soon have or already have part of it online where you can just then deploy via the CLI to one of our test providers.
So like we have test tees nodes for testn net where you can deploy directly your applications. Yes. Um I have still some time so I can maybe go a bit more um direct like um there's a very good quick start we have like which is very bare bone. It it should just show you how um you can deploy like raw apps. Um it it just goes through the steps like how you in it, how you set secrets, how um how you deploy the stuff.
Um like the B base use case is like a just connect with a with a Telegram bot token um where you can send and message to the raffle app uh which can respond and do or do some onchain transactions or whatever. Um yeah, as I said before like the easiest way to start is just to make a docker compose. You build the docker, push it to um the OCR like like GitHub um or or Docker Hub. Um yeah, then you initialize RF in it with that. Um yeah, you give it an app name, you create a manifest where you have like actually the resources also in you have to be careful like um how much resources actually your app is using like uh if you're in the standard in it will just have like 500 MB and like 500 um u megabyte storage uh you should look like how big your uh um your ruffle app will be.
So like you can per standard also like what our standard offer is like that you can set it to 4 GB RAM, two CPUs and like 10 GB storage. This is probably like the standard which you which you can put in in every app uh and can deploy with our stuff. Um with the raw create you will um generate the app ID and register uh your application. For that you actually need the 100 test token. The 100 test token.
You should get that foret. If you have problems to get stuff on the foret, please um reach out to the discord and we can send them to you. Um yeah, additional stuff like you you can store secrets. Uh like one way you can store secrets is like directly on chain like we are like like having a smart contract. Um but for the secrets we we actually have another way where you can just through CLI set secrets and you can um yeah you can just see set them you cannot read them uh yeah as they um then encrypted on chain um yeah then for the ASUS raffle um like every command uh you can with the CLI can run also on on Apple silicon pro without problem except the the ruffle build.
There are some um yeah needed libraries which uh you probably only have at the moment on on Linux. So like we but we provide the raw dev docker where you can run the build command um also on um Apple or Mac OS uh it is is written in the docs. you will see that um then for every update or like creation you have you do with with with your ruffle app you have to do the update on chain means you need to sign a transaction to to really update um um the graph ids the resources [snorts] uh the fee policy and stuff and the last thing is is raw deploy yeah that's what I said before you can just deploy directly via the CLI uh to one of our test servers. Um the other way would be that you have your own um Oasis node running um where you can push then your org file. Yes.
Um yeah and then if if you deploy it you can check with the Oasis waffle machine show. You can see um if the machine is running um you can also check in the um Oasis explorer. You have a section where all raffle apps are shown like you see it there also if your raffle app is active or inactive. Um you can see there everything. Um additionally at the moment we don't uh show logs.
So like if you want to logs for your rough lab ID please uh come either to the booth or uh yeah notice us in the discord. Uh we will give provide you the logs for that. Um yeah, I can quickly show you also um how um quick actually it is to um deploy something on our network. So I provided here um a small demo where actually you communicate with the with Telegram to the raffle app. uh the raffle app runs like a communicator with telegram but also a local llama so like you can make like private inference you don't have to go to open AI or something you can run it with your local element so that I have provided here I will start with ruffle in it this will um yeah create a ruffle yaml file Then oasis raffle create which requested this onchain.
So this is a onchain transaction. Then I will build my um well let's first check like this let's see and build the ruffle here and let's you see per default it will use just a smaller configuration so I will set it as um 4 GB memory to CPUs and 10 GB of storage. alo rename it to be more clear here. Then I will use the special um Docker container for for for Mac OS to build this This will build theorg file. Um then I can set the secret for like the bot token actually.
So like after the B token and I will set the secret and then I will update this onchain. This will register everything onchain. But then yeah the last thing what I have to do is also like deploy this full application. I skipped at the beginning the the the docker compose like I what I did already before is like I did the docker build and push this um um to to the docker hub. So the point also for that is like if you see in our documentation like you should not um just copy over like the docker compose files or like copy it over but like addit for your uh for your docker then um as like this is the docker like in the compose the image this will be then on the node downloaded.
Um so like that's why also the orc files they don't have like your whole image they are more or less always the same size. Um it just has the image uh inside there which will then be downloaded to the note. So yeah now is it deploying um and it is deployed [sighs] probably needs some time to start now. So as we can see it is created but there's no replicas yet so it's still starting to show quickly um how it looks in the explorer. Um we have like um yeah if you go if you go back to the main page like this is our our explorer.
If you go down um you see like tokens and you see also here our um raffle apps. Uh you can go here view all and then um you can see like the active and inactive um raffle apps. See if it is up yet. Still not up. Hope that starts.
Okay, now this up. Now it should be also visible here as demo here. So you see here this raffle app is active demo bellgrade. See um the stuff you see have a secret. Now I can go in telegram and actually start can yeah clear here and start a new conversation.
This is now actually response directly from RF. And if I ask you now um as I was doing before like I can ask like um what can you do in Belgrade at night? This now goes to um to the raffle app, makes the local interference with the local llama and then should give some feedback. I hope so. Seems like demo factor
[laughter] [gasps]
Yeah, but like that's I deployed deployed it before. Um I was asking for example what model it is and was answering like it was running the deepsean the small model. Um just there it is. Good. Um yeah any questions?
You can go to the um back to presentations maybe still quick some um what's next you can also quick uh like show like there's a more in-depth even more in depth uh uh workshop tool one which we had in EAM um what for for building uh some recommendations like yeah use the sapphire features with with key generation randomness as private storage and like for the raffle like think like private AI inference like AI agent games with with privacy um you can actually do trustless CK TLS with this stuff um or you can write multi-chain apps as you can in the raffle app like run light clients or like um yeah do basic um RPC calls to other chains uh that you can build kind of trustless bridges with that um Yeah, think think this this way. Um, yeah, come to our booth. We have some hacker sheets there or like I will be there if if you need any help like really come if you have any questions for for using Sapphire or um raffle. There's also ways where you can actually where we can open ports for you that you can directly communicate. You don't have to go via onchain or like via like like I showed with Telegram.
You can actually directly communicate via port with the raffle apps. Um, this is at the moment not yet possible via the direct CLI. Um, but yeah, we can you just come to us or write in the discord. We can open some ports for you. Uh, you need to write us than just the or file and we will put us on oasis note.
Yes. Would it be any questions? Nope. Yeah. Then uh yes, thank you for coming.
[applause]
Automatic transcript — names and jargon may be misspelled.