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

Loading player…

Workshop Room 4 - ETHGlobal Brussels 2024

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Transcript

e for you are I'm Muhammad and is coming I will just introduce you like hey we have a talk with Muhammad and yes it's fine uh on web yes and that's it yeah on then what's it's all about okay and three things so you need to speak always to the microphones okay yeah you cannot go over there because then there is no recording and when somebody makes you a question can you repeat the question please okay because they don't have mic yes got it got it will be telling you when you have do you prare 5 minutes before uh yeah I think 5 minutes three minutes five minutes or two minutes fine yeah so he will tell you five two yes and do you make questions questions yeah yeah sure feel free to uh no no it's like if you plan to do that so that yes yeah yes so we can inquery there issues so five minutes before we do this and then in total it's 20 minutes 18 minutes because we need to then move and connect okay yeah so let's do five minutes for Q more on the camera no it's it failed so yeah don't worry about it uh do you want to connect it with this oh yeah just I'm waiting for my e e your what oh good you you go ahead and then and the prices y y hey everyone how's it going awesome so we from web o and we're going to start the workshop awesome hello everyone I'm Yash from repo here's my colleague shabaz as well and we're going to talk to you about what vot has to offer in this house Aon what are the things we do uh generally and how we simplify the whole onboarding process into the web 3 world and you can of course when up to $10,000 worth of prices we are giving away at e Global okay so before we start forward I have a small question for you like what was the first dab usage experience for you like any kind of dab you might have used when you were just trying out web3 anybody like you were just new to web3 and what were you doing at that point of time like what was it difficult like was it like intimidating or how how did you actually access it okay yeah everything right exactly and did you know what exactly was metamask and how it work about it like as a particular newb is not very web3 Savvy as such right felt like maybe you have to create a vast wallet then sign a transaction and should I create a wallet should I not what it is so think about as a general user think about your grandom for example I will say so for them it's like very intimidating right you have to understand what are the web three wallets you have to install a wallet extension like metamask you have to onboard to the application sign everything set of a phase a lot of things and for a general person using web to they're like one click Lo Google login I'm done I'll start using the application as simple as that so this is what we stand for we think that we3 should not be this as easy as using a web2 application and because of this if you might have seen because of these unfamiliar and complex flows a lot of people have lost their just funds Bitcoins have been 3.6 million worth of Bitcoins have been lost and this was when Bitcoin was at 30k so just double it so there's a lot of money that has been lost around because of this High skill needed just to access these web and this is where webo comes in we help people to use where they're already comfortable with a simple SSO like Google Facebook anything whatever ever they're comfortable with just enter the application one click log in and you are done just simplifying the whole thing and this has increased the adoption rate uh quite a lot it is easy you can easily trust and re access the same key you don't have to think about it and it's highly secure because it's powered by an MPC back end and you are totally non-custodial Lo so this these are the main challenges we tackle with the web Trio MPC seamless non toal Key Management experiences compatible with all existing authentication methods that are already there mostly following the or two standard or through standard and it's performant globally and scalable as well so have right now a lot of users already using this over 21 million monthly active users we have right now so I talked a lot about why we need this and what I want to talk about how it works so that when you are using it in your application you actually know what is so as you can see over here like a very complex chart but uh you can think about your front end inside of your front end application somebody can just trigger a login maybe we have given a demonstration of odd zero it can go to odd zero Google Facebook whatever from there these login providers which are basically ID token a simple ID token that is the O2 standard as soon as you get the ID token you pass it over to the web3 O SDK and the web3 SDK will generate private key for you how does it generate is this particular Au Network basically host hosts are node which have uh a key value pairer kind of storage of a part of your private key right uh and what happens is when somebody gives you the ID token these get the ID token these nodes validate the ID token if it's a correct ID token or not and pass over their Shi the front end inside of the front end uh we dynamically reconstruct the private key and that we can get the final private key of the user and this is our Shamir secret sharing based architecture for MPC based architecture we do partial signing across all the nodes and those partial signs are aggregated in the front end to form a final signature and that final signature can be sent to the blockchain to do any and you have that directly native providers for all the blockchains available just use it right off the back there are multiple ways you can use this one way is to pass the ID token and everything manually so that you have more control over the flow that or you can use a plug- and play sdks where the this whole thing is managed for you end to end directly as well so this is the whole web 3o architecture uh we'll be going towards talking on what particulars you can do as well well and what are the specifics you can do some prices at this hackathon as well but as you can see all the chains mostly everything we are gen agnostic every kind of login out there and all the platforms are supported as well you can build upon Android iOS react native flutter Unity unreal and web of course all types of Frameworks like and you can uh integrate external wallets as well with us and you can use them directly through the web so let's see in action my colleague shabaz is here will help you go to the documentation show you around with our Quickstar guides and how it works thanks yes uh hi my name is shabaz how to use it but before that let's quickly see if demo works with us um so think of this more of like if you want to integrate your application into your application how basically this will look like uh given that the internet uh is how it is uh I'll try to see if if it gets through this network if not I'll just uh walk you through about the integration guide and how quickly to get you started but at least I just want to show you how the modal looks like maybe the uh this gives you a gist of like how prepared you need to be during the hackathon but as soon as you uh you know integrate web3 you will be presented so this is our plug-in play solution so you don't have to configure a lot of things just simple lines of codes I'll show you how it looks like and then you'll be able to do like this basically Google login or login with any of the social providers also your email and and this stuff uh goes on right uh given the internet I highly doubt that this will go through but I'll try my best um okay um and you'll have like all of all of your details this uh particular demo tries to Showcase more of your you know personal info uh we have something called pasis as well you'll be able to register through that this demo does not show that but you'll be able to do that in your hackathons as well uh like other services like wallet Services nft services and whatnot so let's see how this looks like behind the scene so this is our quick start uh very much easy to navigate from our documentation or our website uh so as it goes through you will be able to select from the offerings of the product like from Plug and Play to cor kit right and each plug-in play and cor kit will have different offerings from BNP uh web or the modal or maybe you might not want the modal what we are presenting to you or maybe you have an existing design you just want to integrate it with your existing system right so you can choose no modal and then uh list goes on from mobile applications from Android iOS react n flutter and unity even if you want to integrate with your know gaming application steps are very simple you just integrate it right um the same goes here if you want to try out like how this particular things looks like in Android when you click on preview um since the internet is not there you'll be able to present it uh uh a mobile view would be presented which is an actual application how it looks like um you can play around and and see how basically this looks like um so let's see the mo mobile sorry the web modood all one uh the steps are very uh straightforward if you see it here I'll try to hide it steps are very simple you install it or you can choose uh the digit command the one here so this is the boiler plate you'll be able to just one click just download it through the terminal and you'll be able to run it very quickly using these couple of lines if not you wanted to integrate in your existing application steps are as simple as that like you install it and then uh the one thing what you need is uh web3 dashboard account or a developer account which is free to sign up um again the links are here feel free to sign up you'll get you'll be able to create a project because we need something called client ID and if you want more of the technicalities like you want to host your own verifier for example your custom Google login you'll be able to do that through the project setup and creating a verifier so the steps are simple um uh I just don't want to waste most of our time here about like if you have any queries about this um then I'll jump straight away jump to the documentation this is a documentation web 3.doc uh all of our sdks are listed here the SDK reference um everything around that and I think at this point I just want to showcase like what are all prices we are offering at this hack so there are like bunch of sdks that we offer Plug and Play the other one is core kit but if You' have seen the first one this is like SFA which comes under the core kit so for SFA we have $2,000 if you integrate it with SFA uh for Plug and Play there is another $2,000 if you want to integrate with mobile or gaming then there is another 2,000 technically you can get this three plus two as well if you have like a grand grand grand price for overall you know the best solution that people have built using web3 and there is something very new about uh Global accounts uh so we'll be sharing more of the resources in the partners vi3 the discard if you have any queries about any of our pric is what this particular entails uh feel free to share that for your questions or uh feel free to reach out to me Yash Elisha or anybody wearing web3 or t-shirt we'll be happy to you know take your queries or if you have any you know integration issues we'll be happy to address those um yeah apart from this yes you want to showcase anything else so let me just go into each one of each one of these prizes one by one and what you need to do to actually wi this right so if I go to maybe I want to have like a native experience with my count abstraction on top of web and things like that I can utilize the single Factor as well as the plug-in Play application single Factor ho needs more uh like work a bit of work from your side but the whole expi because here you will be handing the authentication part of it taking the token from Google or whatever and giving it to the SDK SDK is extremely lightweight because it just does one thing takes your ID token generates a private key that's it as simple as that the particular resources have been mentioned the quick start and examples everything is over there the bonus points if you want to win a really good priz on this is use the keys plugin we have introduced something uh using which you can just demo about that basically this has a login through pasy as well okay so I think I might have a passy over there okay so with the easy passy login I can just get in if have extra bonus Point um if you use ver wallet services in the demo you might have seen this and inside of this whole UI you can just configure whatever you want that directly from the UI have uh wallet connect interoperability and V so that is also available then using uh wallet pre-generation which is a new feature uh basically without even authenticating a user you can generate their wallet address using some of maybe the Google email for example that to airdrop nfts or airdrop anything you want even before they have logged into the application as well you'll get extra bonus points so uh the qualification is very simple you have to just integrate the web of SDK uh get the particular up and running wallet inside of that you just have to add the test demo uh using web3 that's the basic qualification uh requirement for all our uh all our sdps make a demo in which right next is our plug-in play sdks uh plug-in play SDK is pretty simple uh if you go to our integration Builder it's literally a four-step process plugin play you can use either model or no can preview those applications directly as well and uh you just have to get a client ID initialize web you can just direct code and you can just do login that's it it's as simple as that if you do this and additionally use multiactor authentication custom authentication which is an inbuilt thing you have to use for uh use wallet Services as I talked about and if you're using react you can use hooks if you use additional things you can points as well uh all the resources are directly given over here you can see there you are a mobile or gaming developer you have additional things have our SFA as well as Plug and Play so when I talk about SFA I talk about corit SFA then single corit has MPC as well giving out prices for NPC it's like more of a Enterprise SDK of corit and plugin play all the and for mobile if you just s DEC in your mobile or gaming applications points are here for bonus what we have mentioned above shabas has already talked about the grand price and we are mostly looking at the ux have done over here the idea feasibility as and you can around your project on X and things like that as well finally uh as shabas mentioned about the global accounts we be the guide very soon new beta SDK that we have it's a very low Li it's a wet that you can just uh and that is also available if and if you don't want that is also avilable um for any questions maybe want if you want or anything like that out to us right in the Discord multiple things so there Community active Community 90% of the times is already Sol have a look over there so I guess those were the main things and if you have any are available throughout be so just check out our booth questions anybody please so you want to verify whether the user the back end basically whether this user is the correct user or not there's a feature called service side verification if you uh what we do is we generate an ID token in the frontend which you can send it over to the back end and verify whether this particular uh like public key is the same or not if it's the same this user is verified if not it's a different user so you can directly do that using this as well have any questions just come here we'll just show you uh World ID integration you can just use the world ID generate an ID token send it over to web3 or SDK the SFA or plug-in play and you can generate a p uh I guess the time is up is it okay yeah sure sure thanks a lot for joining everybody speee fore spe spe way foreign for hello uh please raise your hand uh how many of you have thought how difficult or complex uh managing different keys can get okay and and also how difficult accessing to these keys can get as well right especially not talking about EAS but uh multi signature accounts that have multiple wallets so today uh we will be talking about pasis that uh offers a new ux Improvement to handling U all these keys so the talk is integrating pass keys with the safe smart account uh my name is Herman you can find me on Twitter at hermo and please important thing this is just a developer review some things are not audited so if you are playing around with this do it in uh demo apps or testing apps but not in production yet until the audits are finalized that will be soon we will cover a few topics a brief introduction to pasis and safe and the benefits how to integrate them with the safe cor SDK what contracts from safe are involved in this process and a bit of the flow and finally a a demo to Showcase how the user experience looks like so let's start with uh pasis pasis are a standard authentication method that lates biometric data like the touch ID or the face ID to provide a uh user uh experience that is much better also unlike traditional passwords with pass Keys you don't need to remember uh complex strings of characters and uh you can just rely on your uh on your physical data so some of the benefits or key features that pasis and safe uh provide are simplified authentication uh using Biometrics uh data and Hardware Keys pasis simplifies the authentication uh flow also crossplatform compatibility as safe pass Keys is defined is designed in a way that is compatible with multiple devices as long as they support the web auen uh API enhance security uh as the private Keys uh associated with pass keys will not uh leave the the device the the physical Enclave in the device so it's more secure also additional multiactor authentication with uh multi signature uh we see see that blind signing uh is getting more common as the ux uh is uh is improving so offering a multiactor authentication is uh great for the users now audited contracts this is in Gray because uh most of them are audited but uh there are there's one that uh still is in the process and available on M multiple networks you will see in the coming weeks months how the contracts that are involved in this solution are uh deployed there for now uh the demo will be on sepolia so let's start with the SDK and what are the different steps that you would need to follow in order to integrate pasis in your safe account first of all some imports you need to do creating ay using uh the web auen API from the browser initialize the SDK create a transaction sign in the transaction with the pass key and submitting the transaction so let's see all of them with the Imports first you need to you need to install two packages the relay kit and the protocol kit uh take U please pay attention to the the versions because they are Alpha version as not everything is audited again so please uh use this just in controlled environments not in production and then uh do some imports from the uh relay kit importing the save 4637 pack and then uh getting a utility from the protocol kit Now to create the pass key uh we will use the web auen API that the browser is providing so there's an object Navigator do credentials that has a meth meod create that receives an object uh that is called public key and has some properties inside like the public key credential parameter with the algorithm for signing this is has to be the same that is implemented in one of the contracts that I'll show you today um show you later uh a relay in party information uh user information and some other data you can get more information on our Docs uh if you want to Define this sorry uh at the very end you need to get the pasy object which is which is what we are looking for is an object that has uh an ID for the for the Pas key and uh some coordinates and you can get that with the extract pasy data method that is receiving the pasy credential so once we have the pass key object we can initialize the SDK uh we are going to do this uh paskis integration using the 4337 flow as well because we don't want just to uh abstract the keys but also the gas otherwise it wouldn't make much sense right so the say 4327 pack provides a method in it to initialize it where we can pass a provider the network we are using also Aigner in this case is the pass key object we created before it could be a private key or whatever in this case we want to use the pasy and then some information from the bandler and the pay Master we are using pimo infrastructure there here uh so the the API URLs and also a sponsorship policy ID in case you want to get your transactions sponsored at the end of this talk you'll see uh well I will provide you one so during this weekend you can get all the save transactions using this flow sponsor by pimo and uh sponsored by us using pimo infra and then you can Define some options to configure your safe if you want more uh owners apart from the one you are defining like the pass key or the threshold here is one but it would be different once we have our SDK instance initialized we need to create a transaction the one we want to execute uh for that we need to define the two value data of a transaction we can even do a batch so here we are creating an array of transactions that we pass to the create transaction uh method inside the safe 437 pack this will return a safe operation that uh the signers of the safe need to sign in this case because we initialize the SDK with the pasy the pasy will be signing this how with the sign safe operation method here uh after calling this method in the UI is where the user will see the popup and they will need to provide their credentials or the biometric data once we have it sign it we can submit it with the uh ERC 4337 Flow by calling the execute transaction method there's an executable property where we pass the sign safe operation and that's it in in the future for your safe you want to add more pass keys this would be something similar there is a method this case in the protocol kit instance that you would need to initialize as well uh and the function create at owner transaction will uh return a transaction with the right data to add a new Pass key so after that you would need to create the safe operation sign it with the pass key and execute it so one save can have multiple pasis if you want now let's see what are the contracts involved in this solution it all starts of course with an account that is safe and safe uh can have can be extended the functionality with modules and fallback handlers have you heard of them can you raise your hand okay uh modules basically allow to uh execute save transactions with different um with a different way of validating the signatures so they can have root access and the fallback Handler is a a contract that can Implement some methods that are not implemented in the core account but when these methods are called in the account the account will fall back so it's a way to add more functionality for this two we will use uh or we are using the save 4337 module which is a contract that is uh adding all the um all the compatibility with The Arc 4337 and we need to enable it as a module and as a fullback Handler this everything is just done by the SDK here I want to show case a bit what is happening behind so we don't have two instances but one instance that is used uh in this with these two different roles now the the account is multi signature can have multiple signers but if you are using aasy you need to set up that pasy as Aigner when I say thaty I'm uh referring to a contract that will uh validate the pasy uh signature here we are using the save web auen shared signer uh this contract is a single tone in every Network or in any network at some point um that will be able to that that should be enabled or should be added as a signer on each uh account if you want to use a pasis if you want to use more pasis then there are other contracts uh like the safe web Au signer proxy uh that can be added and that would be used for a second signer and we can add more and more this proxy is a single tone and also has a factory you can call to deploy it and the main difference is that if we are deploying an account with a 4337 we just can deploy one contract which is the safe and not a proxy at the same time so this share signer should be used for the first time as it's already deployed there and then if you want to use more pasis SDK is doing this uh it would deploy uh these other contracts and now with the RC 4337 how the flow would look like is uh something like this are you familiar with the ERC for 37 flow validation and execution uh phases well it starts with uh the bandler or after you create it and sign the the um well the transaction you send it to the bandler the bandler to the entry point and then uh the the entry point is calling your save to validate the the signatures it is providing the transaction and the signatures the safe is um forwarding this to the module that will process it and to check the signatures it will detect that it was signed by a contract the one from the Pas key so it's not able to uh check the signature the account itself so it will need to check with the share signer that will also check with the web authen that is a contract that sa' created to do the validation of the signature and at the end and it will return to the entry point uh if the validation was successful or not after that the second part which is the execution phase uh the entry point will call uh the execute user up in the in the save the save will let the module to create a transaction and to send it to the Target this was very fast uh but now we will see a demo hopefully if I can share my screen yes okay so here is how uh an integration of safe and pass keys in adap would look like we have this is like the login page where you can create a new Pass key or use an existing one if you are an uh an existing user so if we want to create create a new one we can click we can decide where we want to uh uh create the the pass key we will select now uh the Local Host the pass is called save owner will only be saved in this device I can use the touch ID and now um it is interacting with the web auen uh API from the browser and you will see that it calculates the save account that is not deployed yet until the first transaction is executed and then we will be able to me an nft gasly so this is uh the save we will that will be ours now we can mint an nft this save is configured as a uh one owner and threshold one so it will ask for our signature and we will use the pass key okay with a touch ID I'm signing the transaction and now it's executed so this uh Transaction what it did we can see it here in the save uh app we can go to the settings we see that it has an owner this owner is the contract that we saw before that is associated with the Pas keys if we go to the modules we see that it uses the 4337 modules and uh if we go to the transaction we see aat transaction executed with the creation of the save and the meeting of the nft if you want to get more information you can copy the transaction has paste it in tenderly it may take uh a bit of time and there you can see yeah it takes a a little time to get it from there and there you can see all the trays of the transaction but we don't have time for that so let's go back the slides and after the demo um we have some resources on GitHub with the safe course SDK if you interested in seeing how uh all this integration is implemented safe modules if you are interested in seeing the implementation of the contracts that we showed and the safe modules deployments to see where these contracts are deployed also I recommend uh checking the dogs dos dogs. say. Global uh where we have uh some guides tutorials and some context on uh all of these regarding pasis and finally what we are or where you are expecting the bounties we have we have three tracks uh the first one is 4K uh two prices in total 4K uh for the best app integrating pasis creating a a dab similar to the one that I showed that uh showcases this uh this way of signing the second track is uh related with the ERC 4 um ERC 7579 you can read more in the in the website 4K as well two prices and the last one is like a wild card for the best app related with save 2K and if you want to get your transactions sponsored uh this weekend you can get this code and copy paste it in the initialization of the save 437 pack feel free to come to our booth anytime to uh well to check any questions and thank you for attending [Applause] we don't have for questions question sorry you don't need internet no no I just is going to be slides light now yeah e good I start all right thanks everyone for being here and for taking interest in Nether mindes and bounties uh here I'll I'll briefly discuss the four of them but I'll focus on zkl so I'll speak about zkl first and at the end I'll I'll briefly mention the other bounties and point you to to people in our team that you should speak to for more information okay so our ZK ml bounty has to build a project that combines ZK technology and machine learning and of course this is a very open-ended description so let's look at some possible approaches uh that you may take to this bounty so zkl technically um we use the term zkl to refer to any application that uses ZK technology uh in combination with machine learning or AI so here by C we don't specifically mean zero knowledge we mean suely verifiable computation or zero knowledge so we don't really care it is possible that we don't have actual zero knowledge and we only care about sex inness so that's perfectly valid so zkl is a wide area of research and Engineering some of these areas that I think are very interest interesting at least for this bounty are pro of correct inference proof of training and Federated learn learning so let's see Pro what's proof of inference so in proof of in inference we have a model let's call it f and let's say that this model is signed by a trusted party and let s be the signature so in proof of inference there is a public input X and one wants to create a z proof for the following statement one wants to prove that the mo there is a model that has been valid that has a valid signature and that when run on input X okay so here it should say x when run on input X the model's output F ofx satisfies some property for example f ofx is bigger than zero so this is a bit abstract so let's look at an example so say that f is a model that takes a a phase photo and determines if the phase corresponds to a legal legal citizen of the country and S is a signature of the model that is made by the government so now Bob could check that Alice is a legal citizen by checking that s is a Val signature of the model and running the model f on a picture of Alice's face and checking that the output of the model is say positive okay um yeah so this is exactly the copy of example however you you could do that but this means for example that every time that Alice wants to prove that she's a citizen the whole model needs to be run so Bob needs to run the model over and over again so if he and if if Alice wants to prove that she's a citizen to several parties then uh each one of the parties has to run the model so an alternative could be that Alice creates a saxing proof by of these two claims that valid signature and that F the output of the model is positive so it it creat a SX improv and this way whenever Alice wants to prove that she's a legal citizen Alice just sends the proof a picture of his her face and the signature and then Bob just verifies that the proof is valid so that's um typical use case of proof of inference this is for example how worldcoin wants to use zkl so yeah so in the worldcoin in W coin wants to do precisely this and in here s would be a signature of w coin and note that Bob doesn't even need to know the model it just needs to know that it is signed by a party trust like a government okay so yeah here we only need we only care about P being sucing here we don't really care about zero knowledge we don't we don't want to to hide data here here we just want that the proof is short and that it can be verified very cheaply and yeah depending on the on the applic maybe f is not signed it's committed maybe f is public um yeah so and this branch of zkl is a currently a very hot topic of research and Engineering so I highly encourage you to to take a look at this one if you are interested in zkl so in proof of then there's another branch of zkl proof of training so improve of training there's a usually a private data set and um a model so I denot the model fwx so here x is the input to the model and W are the parameters and in yeah in many applications you have a commitment to the data set and to the model or to some of them and recall what what does training mean training me training a model on a data set d means finding parameters so that when you use these parameters on the model the model makes good predictions on this data set so the goal of proof of training is to create a ZK proof of the following statement I know a data set D whose commitment is some public value and I know some parameters W such that the model with those parameters to commit to some public value and this parameters are the result of running certain training algorithm for the model on the data set and yes and so you this is exactly the end of the last uh slide and why would you why would we want to prove this well there are several interesting use cases for proof of training uh you there's distributed training where a model owner distributes the training of the model among untrusted workers so there are several untrusted workers you want them to train your model so you ask them to train the model and also provide approv that they trained it correctly because you don't trust them so you you could create some kind of marketplace of trainers or for example arbitraging uh copyright claims where a model owner proves that the model was trained on on data that doesn't contain copyrighted data okay so yeah proof of training is quite a tricky area of zkl and this is because as you know training a model is orders of magnitude more more expensive than uh running a model so in and just proving proof of inference is already quite a tricky area of of ZK it's quite hard to do efficiently if the model is large So Pro of training for for example large language models is sort of Out Of Reach at the moment so this this track of this this approach to our Bounty is kind of more difficult than proof of inference but yeah if you want to to Center to focus your project on this on proof of training that's perfectly fine we will take into account that this is a harder um aspect that that this is harder than proof of inference and yeah if you want to do this I recommend you focus on on small models that you prove training of small models perhaps classical models instead of deep learning models or if you want to work on deep learning models then just use models with uh small amount of parameters okay so proof of inference let's go back to proof of inference and some some ideas on how you might tackle um this topic so I would recommend you look at existing zkl Solutions and improve some parts of it in the Bounty description we have several links and one of the links is aome awesome zkl it's a GitHub repo uh maintained by wall coin and there's lots of um ckl Solutions in there so one possible way to start the project is to check those and look at one of them and try to improve a small part of it so possible aspects of zkl that I think need Improvement and that at nether mind we are working on improving are the the following the treatment of floating Point arithmetic the fact that models in learning are self similar I'll explain what this means in a moment and the fact that there's many nonlinearities in the models and yeah now I will talk about these three points but um very important point if you want to work on this on this bounty be creative the the best thing you can do for the Bounty is to be creative and have a have a great idea even if yeah so cre creativity is go so don't limit yourself to what I'm saying here if you have nice ideas please pursue them and surprise us okay so one area of improvement I think that like it's right for it's low hanging through for zkl is leveraging the fact that models are are often the is like the computation of a deep learning model is often the result of apply applying the same computation many times over and over again for examp for example um in a deep learning model there's maybe a layer like a say a convolutional layer that's applied doz dos of times in a row and even for example in a single layer there's many computation the same computation that repeated many times for example a convol convolutional layer applies uh the same filter many times for many P so it applies the filter to lots of patches of the input right and the same Matrix Vector multiplication can also be split into H CHS of computation where each computation is the same and a popular technique to approach computations where this happens that computations where that can be split into smaller computations that look the the same is to use folding so in a folding scheme just crash course on on folding schemes there's a prover and verifier the prover has to two statements that wants to prove and then the pro and verifier interact to create create a new statement so that if this new statement is valid then the two initial statements were valid so in more plain terms a folding scheme reduces the task of proving two statements to proving a to the task of proving a single one so you can use use folding schemes to prove large statements so say that xw is the large statement you can break this large statement into very small parts parts each one from the same this basically the same computation and then you fold all this a small part into a single one and then you prove the the folded instance so I think that zml is right for is ready for this type of of a technique what's the time five minutes okay so let's look at this one and then um I'll skip the the later point and we can discuss after the meet after the talk okay so deep learning models deal mostly with linear operations most most operations happening in a deep learning model are iner products or Matrix multiplications however there's there's crucial nonlinear operations happening in in the models such as relu softmax Max pooling Etc and proving this in a in a ZK Nar can introduce a huge computational burden because um as you know DK proof schemes rely on proving statements about field operations addition and multiplication between between field elements however relu and soft Max Max ping Etc have nothing to do with field operations and writing this this this nonlinearities as additional multiplications between field elements leads to a huge blowout in the in the statement you are you are proving and yeah a popular way to T to tackle this problem in general not only in zkl is to use look up arguments when you want to prove something that's very hard to arithmetick Applications but I think it can be done uh in a much more deeper way so if you want to know more about this please come talk to me afterwards okay so I'll skip this explanation of look up arguments yeah and so yeah that's my overview of this bounty as I said please talk to me if you are interested on in working on zkl I'll be very happy to expand on any of the points I I mentioned our other bounties are the following um security driven development in this bount the goal of this bounty is to design uh to develop some cool code and focus on how to make sure that the code is secure so here we suggest you either use fasing or formal verification there other B another bount is large scale compute in this bounty the goal is to leverage L2 uh L2 rollups where fees are cheap so as to build an application that's not possible to run on ethereum uh an application that uses a lot of computation for example some game that requires a lot of computation or maybe uh training models on uh on stet for example and then prec confirmations in inovation uh anything that has to do with pre-confirmation uh even if it's just a theoretical exploration is welcome in this in this area for any of if if you are interested in any of these um bounties please come talk to to us in our stand and yeah as final remarks we are hiring so we are both hiring for fulltime positions and then we have a wonderful internship program um yeah if you are interested in working with us you want to work on any of the topics I just talked about right now or many more please reach out to us and please reach out to a uh in the back of the room thanks sure uh maybe if somebody has questions they can go okay thank you you need do you need internet uh I have it yes I am connected yeah but U maybe it's um it might fail okay so we have EET or C yes it be C but is not C is H let wait and yes now the other only did they have the signo do you know it's okay yeah they they they get it there okay um two things okay so please speak directly to the microphones H can you have another hand mic we need two mics um we don't have the mics there are only this that's why told you yeah sure and the thing is that if somebody makes you a question okay you need to repeat the question to the microphone please okay okay thank you hello hello this for me thank you go uh we can be get by because okay can can we start yes okay welcome everyone so we are here to talk you about chaining and how to build cross chain applications with chaining CCAP I am so and these are my networks and few few to follow me and discover what we are doing what you do in the future and I came from Brazil and and yeah my name is Andre this is my Twitter I tweet around about chaining solidity rust sometimes and this is my newsletter I started writing it pretty soon it's called smart contract design patterns it's about smart contract design patterns so if that's interesting to you you can you can set up yes so let's go we are starting talking about our bouches probably you saw it before but uh you can choose two different tracks one is to use CCAP and the three best projects is can win uh 2,000 each or you can use the other chaining services and uh win uh 2,000 each we have two two boun of this and maybe you can you are using more than one chaining services and you can win both of this it's possible and this is the most care this is the most important care code for you so uh if you like to read this then I know that I have more care codes in the middle but it's everything that you need to to this hakon yes almost [Music] done okay so let's go and uh uh and you talk about oracles what is that Oracle yeah sure uh so essentially Oracle is by Design any of chain component that can provide uh offchain data and computation so oracles essentially connect real world with your smart contracts and chain link is a platform uh for Oracle Services we have a bunch of Oracle services but essentially you have some kind of data sources and external resources and you can easily connect those with your smart contract whatever that is and then perform some computation on chain perfect and the best related to orac it's so important that Oracle have a decentralized Oracle Network because the way that you are bringing the information inside the blockchain is the key so even if the information came from only one sear you can have a consensus to save this information inside uh your smart contract and uh let's talk about uh a bit about the chaining service itself so uh we have some SES related to data would like to talk about that yeah sure so if you have been following training for a while or been in this space you'll probably say that training is an oracle service that provide price data price data but in the same way Internet is just for email or Amazon is just for books chaining is just for Price feeds so we have like much much more services than just price feeds like price feeds are just subset of data feeds which uh which can be like rate and volatility feits nft FL price Feds all that other stuff uh so yeah all of these Services you can get using chaining and you will be eligible for heon Bondies if you use any of these and obviously we're here here to help you so the other services that are not related to data for example VF can be used to generate Rand numbers also you can use automation to call any function inside your contact with the rules that you can Define like you can Define the conditions or can be colored by uh when day or 1 hour or 1 minute or even related to some log if that log appear you will meet that event then you can have some function be executed and also talking about functions itself we have the chain link functions that you can call any external API even if you have a secrets you are writing a JavaScript code inside your much content and then calling that information and having this information inside your much content as well and uh remember that we are not a blockchain we are agnos and we are deployed our service are deployed in many many blockchains and what CCAP yeah sure so we have a specific Bounty for CCAP and we want to spend some time talking about the CCAP so this is the high level architecture of CCAP and that's pretty much it what you need to know about CCAP at least for this kakon so there is a router contract so CCP router contract one router contract per CCP power block chain and that router contract actually handles incoming messages so if you want to send a message crou chain message that can be tokens data or both like programmable token transfers where you can transfer both tokens alongside some data then you can just call the CCP send function of the router contract and that's it pay for fees and similarly how you can send a package using UPS or FedEx whatever you just pay give them the package and they will handle the rest even if it's like a overseas flight or whatever that's why if you go back to the previous slide please uh you can see that in the middle we have a CCP which is kind of like a black box and in the documentation there's like a broader uh architecture of it if you want to take a look at it but essentially you just Outsource your your transfer of messages to the CCP and then the router contract on the other side will deliver the message eventually and we have explored to track this message transfer in real time and that's pretty much it what you need to know for CCP so this is probably the most important slide for you just understand it like this and that's so and I doing a demonstration for you now so I transfer usdc from I'm use Avalanche Fuji because H between the test Nets this will be the fastest to do here the other one maybe I cannot do like in five minutes and these are all the requirements to do that you have the slides the presentation so you have all of this you can do this done uh after also I'm using SDC from Circle so here is the circle f and the way that you must get the address and add it to your wallet as well and this is the content that I'm using now you have this and it's time to go it to do it so I deployed the content like 1 minute ago but maybe I can deplo again and show both to you so this I made one minute ago and I'm doing another one just now so I'm here and I like to Deo and probably my metam mask is locked or no let's see it's everything right here should the play it's interesting when you are live and uh the things didn't work oh yes it's a bit slow only this okay so we are ready great so I'm deploying a new version of this if I scroll down let's see what's happen with my content uh meanwhile I'm importing the hter so my content is communicating with the hter that we showed a a few minutes ago and also I have the client to have the structures that I need to send the message I did one so I reject that uh I have all related to UHC token also to interactive this and then here I may uh handle the errors here and I'm initializing this and in the comments you can use another chain as well because I put the way I got the chain so this is the hter that I'm interacting with this is the linky because I decided to pay the fees using linky and Andre where I paying the fees I paying the C destination What's happen yeah sure so you'll just need to pay for fees on the source chain whenever you send the message can be paid in link can be also paid in Native coins so you're just going to use message.

value if you need or you can use the wrapped uh wrapped uh implementation of that native coin so that for example on on ethereum sooo you can use wrapped eat as well to pay for fees and essentially you're just paying the offchain Dons to transfer the the message on the other side and that's it you just paay for once no spinning up any offchain components or nothing simple as that really perfect and I doing this using usdc so here I have the usdc address the token that I'm sending and I'm going to seia this is the h destination chain selector this is for SE and you can find all of this here uh that I have over there on my content as well so we are going from fui this is the hter this is the link token I'm going to seia so this is the destination chain selected everything is in our documentation and okay this is the the event when I do that I'm initializing everything and this is the most important function that is the transfer I me doing this first and then I can explain this part for you so uh okay I deplo the content where is my content I think it's here this was just now I must do two things now first I like to have some link inside my content to pay the fees let's do that so I'm here I'm going to tokens link send for my smart contact address I sending like two or three yes it's a bit slow here it was better when I was not on the normal yeah what what she's doing now like her contract assumes that links are part of the contract itself so she's funding basically her contract but you can also just save transfer from uh inside a s function if you don't want to to have it like this so you're completely flexible uh when paying for fees just fii exactly you can see over there like if I go to my uh transfer function now you can see that first I'm creating I stret uh in fact is an array that I could even transfer more than one token for each token I must say the address of the token and the amount that I'm sending then that array of tokens you be here in the message this is the stroke of a message that we have in the client of CCP so the receiver can be any account because it's only tokens if it is like messages as well a external account cannot receive a message so uh for this must be tokens and any data I could for example send the token and send a message what i' like to do with the token the other side I'd like to stake I'd like to do a swap I could do everything or anything here uh defining the data part and this is the token amounts that we said before and I don't need to have any extra argument here but for example if I'm minting an nftg I mean calling the mint function in the other block chain I must increase the gas limit and here I me telling that I me paying the fees using the link token okay and let's see what's happened here it's is still waiting yeah I'm so glad that I did this before because at least I have one done to show you and come back here you can see that the how is calculating the Fe to us so I am in the cersi blockchain and the hter is going to the destination blockchain and getting the right fee related to the size of my message and here I can know how much I must spend in the C blockchain and I also checking if I have enough link on my content to pay that another part Point that's important I'm sending WDC so I'd like to be sure that I have enough WDC on my account so the usdc is not on Smart cont it's on my personal account my external account and this is the second part that I must do like I I must uh approve this contract to use my usdc so I came to the Explorer in the address of the usdc here and this is the address of my contact now the new one that I just deployed and I'd like to approve to use one usdc is running six zeros because we have six decimal places in some place here let's do it so I'm approving the content now after that the cont will be able to get the usdc in my external account and send to the other blockchain yes it's really really sow now a next approve okay this is what you are saying here I me checking the amount and transferring the amount from my external account to the content then approving the content to send it to the other blockchain using the how and after everything is checked and everything is good then we have the CCAP hter sending the message to the destination chain selector okay we are almost that in that point let's see if it's confirm it yes so if I go here now I can uh use this is the last one I can transfer so I'd like to transfer to my same account or no I'd like to send to another account and come back to the other because I only got the address so I sending to another account and it's the same one and 6 zos the decimal places I mean sending from Avalanche Fuji to AUM I click onct after I approve that uh we are explain more uh with a kind of overview of the other parts as well so I think we are only waiting now okay we are waiting so let's go to the presentation a bit more and understand this part so Andre what about to to uh tell them what is happening now yeah sure so I'll try to do it quickly because we we're all the time so this is the broader architecture from that previous slide so we can see here that she is interacting with the router contract on the left calling the CCP send function and now uh we are basically have three op components committing Don is listening for the events from onramp contract which will interact with the token pool if you're sending tokens which is happening under the hood uh then uh it will uh post a report uh of that batch of messages on the other side to the commit store contract which cannot see on the this screen unfortunately and then risk management network will do the same thing and also wot uh on that uh on that batch of messes so it can be either uh cursed or blasted if blast that that's good that's what we want when we see a blast signal the executing Dawn will interact with the offr contract to Mint or unlock the appropriate uh the same amount of tokens on the other side and then the router will just deliver the message so that means for you if you want to limit who can call your CCP receive function you can put a modifier to said that only router can call it and that's pretty much it yes amazing let's see what's happened on partic because I already send the transaction if I got the idea of my transaction and came to the CCP Explorer probably the search is already finalized and we are in the moment that we are blessed maybe let's see I don't know maybe it was fast it's looking for my transaction now okay so uh it's being like um uh we have uh oh yes now yes okay we have the search finalized and we have two minutes here to wait meanwhile we are waiting so let's come back here and uh talk about okay I'm waiting but uh we are in a hakon we must be do everything so fast and you don't have time to wait so use the local simulator yeah sure so if you go to our GitHub chain link Das local is the CCP local simulator so instead of building directly on test Nets we we can see now that we're waiting for transaction to complete on a test net but imagine that you have a bug or a flow or something in your smart contract then you will need to redeploy deal with gas with faucets with tokens with all that stuff with chain link local you can literally build locally in head Foundry or remix whatever your development Choice uh is and once you're ready to move to testnets then you can easily move to testnets and we have a brand new facet for that where you can get multiple different tokens multiple from multiple different blockchains to multiple different receivers on same request which is pretty cool pretty powerful yes and this is the mo chain M fet yeah looks like this so just select I want this amount of token from this chain this chain that chain this receivers hit request and that's pretty much much it you're ready to move to so why ccip is your interoperability protocol uh so we have this local simulator this new faet mood chain you don't need to run any kind of of chain infrastructure and you can send the message uh and the tokens in the same time so we can have this kind of programable token transfers and uh remember about our bouches again the to wrap up uh we are are uh you can use this withum arbitr basis Sal and polygon they are here as well they are sponsoring and maybe you can win both bounties because using then and using us and only to finish let's go to the oh the here the presentation if you didn't get the presentation yet you can get it now and yeah if you have any questions or anything we'll be around here or at the boot because we're on a time sorry okay and this this probably this is done let's see finish that's it thank you guys thank [Applause] you it's 20 minutes no to change okay okay thank you very much by the way Che your maybe check with them just to ask so do I need to change the frequency no no no it was working with ooks very well this is no sorry yeah I have HDMI if you want and we just is it good number one suppor privacy yeah are we good to go so welcome everybody I hope you're excited to start hacking it's uh fun I have some experience there and I liked it a lot so I want to help you with TLS notary so I'll start the first part just introducing what TLS notary is and then I'll give a very quick demo to to get you started but we also have a boot at the ethereum foundation so uh if you have further questions you can uh find us there so first the motivation why would you consider using TS notory so I assume everybody knows https so TLS is the S the secure in HTTPS and it's used to get data LS can get data from a website what is data it could be identity information from a government website it could be balance information from a bank it could be social information or just uh gaming stats that you want for bragging for example so what DLS uh is a very helpful way to get data securely from a website but it doesn't have a solution for sharing data with a third party uh which I will call Bob in today's talk and so Bob could be a kyc provider a credit somebody who wants to use that data and so what I expect for in this hackaton uh most of you will have the perspective of Bob where you want to help Alice um to provide her with a service but to do that you need some information from her and so um as I said thls make sure you can get data securely from that website so you know it's origin you know but nobody changed something in between in that channel and also that nobody can listen in uh but because it uses symmetric encryption you cannot simply pass on that data to somebody else and so that's where TLS notary steps in so we have a solution where Alis and Bob can do the TLs transaction together and so it has all the properties of TLs but in addition it makes sure that Alice can pass on her data to Bob um securely uh Bob does not have has to trust that Alis doesn't cheat he can check it and also it does not need any changes to the original website so this kind of unlocks uh all existing data on on the internet and your app can compose different sources and provide uh Implement new applications that way so what's the secret source of TLS notary we do the TLs connection with the multiparty computation so that means that Alice and Bob have to do uh all the key exchange uh together and so the advantage is that Bob during that TLS connection only sees encrypted information and at the same time B Alis cannot do any requests or uh decryption without the cooporation of Bob so Bob also knows that Alice cannot cheat uh of course there's no uh free lunch either so uh there is a cost um so there is definitely higher latency in that connection and also there's a high bent with so lots of encrypted messages that needs to be exchanged between Alice and Bob um but the good news is it works um in in a lot of cases so I told Bob only sees encrypted information that would be useless um after the TLs connection is closed Alice can then share the actual decrypted data with Bob and so TS not has an option there to do to uh offer reductions so what I showed here with the the red squares is that that's kind of information is redacted when Bobs get the data but still Bobs know that the unredacted data is all correct um it's not easily available yet today but you will also be able to do uh uh zero knowledge proofs on that data that's hidden so instead of disclosing your address you can give information about it's not in the US for example um so in a nutshell so if you want to share data in a secure and privacy preserving way uh consider TS notary for your hecton projects so use cases is everything where both privacy um and security are important so things like identity financial information so you could prove real word uh assets like you could make your user login to the Tesla website or to whatever website to prove he owns stuff or that he bought stuff in in certain stores if you want to have like a a Marketplace um or also like I heard somebody at the boot earlier said they were looking into like uh gaming assets stuff or like gaming statistics all these kind of things uh become available to do stuff and combine it in new ways uh even if the website doesn't offer an API for that itself so again the data becomes composable so it's already used in the wild so uh ZK P2P did the hackaton in India where they they prototyped this it's now available online uh open layer did hackaton in New York where they built this uh uh bragging uh website where you could prove your GameStop wins or losses which is nice and opacity Labs made something with data from 23 and me where you could uh prove your NE undertal index or your uh inclination towards boldness um in the uh previous version there was only three parties sometimes you want reusable proofs where both faier A and B B wanted uh in that case you can separate the MPC the multiparty TLs to a trusted neutral party and then have uh the Prov store that proof and then if the verifiers trust that notary they can actually use that proof without being online together uh with the pro to do the actual uh TLS transaction so uh now let's switch to the demo um for the demo I'll show you um our browser extension oh sorry uh so uh the advantage of the browser extension is that so to log into websites you often need the cookies and we have prepared a demo here where we will prove that we received a DM message uh from myself to the TLs notary account so when you click this you get this checklist with steps like first make sure you're logged in and then it needs like you need to select a a direct message so when I do this I can click the check button here and now it starts notor rizing so checking this uh requests so I'm now using a a notary service uh on my own laptop to make sure it's uh it's fast enough and we're not limited uh by Network speeds and then you get this proof uh where you see I don't know if zooming in works yeah so where uh some stuff like uh access tokens Can Be redacted and then you get the the response and there should be uh my GM is in there that's the response we got for the server now we have this signed data that your app could use so uh this is extensible so uh if we switch to um V code here you see that you can uh Implement typescripts where we have a a config Json where you configure the steps that that needs to be done they each have then an implementation where you check whether you can move to the next step um and it also has some uh but that will change in the future but already has a permission system where you also kind of protect the user of not having crazy plugins that that steal all the users data um so but it's already very approachable um for you to start uh developing plugins and then the most interesting part is mostly that you need to get access to cookies so in this case it's from uh the Twitter servers and then you compose a request where you set the necessary headers so for example here we reuse the Authentication token that the browser was using and that way we we get the response we need and we can even do some uh redution in there and then it's just a matter of um oh if only I could type to do a build and uh what's actually happening here is we built a wasn't plugin I don't know if you heard of XM before it's not that important um but now we can open this uh build result which we can now add to the browser extension we can add a plugin here and then uh yeah it's already in the correct location so the user gets some information like don't just install everything so this one will get have access to these kind of cookies um will allow it now and now I can run this proof that I have uh a Twitter profile uh so the the proof should arrive um uh shortly uh I think I spun through my demo what also uh important to know so that's the side to get the data of course your app will also want to use that proof to verify that the proof was correct so if you go to the tlsn extension repository there's uh we added the wiki for this hackaton where you also have this uh tlsm connect provider where you can as a website connect to our extension request access to proofs then you get uh again you need the the user consent and then you can verify the proof and use that data in your application either it's to do something onchain or offchain uh Tas not is very flexible only your imagination is is the limit and also the data size so uh if possible look for apis that give you just the result that you need and not like if it's server side rendering that's uh too much data for TLS notary to handle today but we're of course always uh pushing that limit um uh kilobytes yeah so so like the lower kilobytes are no problem but then like 10 like 50 kilobytes that's already uh starting to get t uh yes well so the the request is to the Upstream server so oh at the verifier side there's no no problem but so the the limit is because it's all in so MPC that's like garbled circuits oblivious transfer so there is overhead in there and so there's lots of communication between the approver and the verifier if you do it with the notary then it's similar with with with the notary uh word mentioning is that at psse we do run an example notary server so in the hackaton feel free to to use that documentation is on our website um so that that's definitely an option um and then for the hackaton we have two bounties so uh T notary itself is written in Rust so feel free to also just Implement a server that something funky in in rust or use our new uh plugin system to just fetch the data do something with it so we have a price pool for new plugins so that just like figuring out how do I get data from the data s sources and if you have new use cases uh yeah that's also we're very curious like uh what you guys will will build with so in that case so the question is what if uh there's extra features in the back end so in most cases I think you can solve it with selecting the correct cookie um if they of course they can change their API any day and then you need to update your plugin but that's also painful for them and of course also please respect the terms of Services of the data source this is not a hacking tool so uh yeah also keep that in mind yeah so there there's this trust assumption so um what does it mean so imagine that the prover is running the notary then we're back to square one um and then then it doesn't help so the notary needs to be neutral uh if the if the or if the if it's two parties and they collude again so if it's about a lot of money it's more careful you have to be more careful then if it's just like if you need to have a Tesla to be in an anonymous Tesla chat group it's not that bad if somebody cheats but if you're if this is a multi-million dollar deal then you need to be more careful definitely um there are already startups like looking into like uh ion layer Solutions with slashing if notaries cheat this kind there's but we're also like looking into doing like this is like a two-party computation like it's possibly also possible to have like do your request if it's high value do your request with 10 notaries that will be probably a high cost then but if it's worth it it's it's um not sure why that's relevant but so there are solutions you could also run a notary in trusted environments there's all kind of research also going on on there but maybe we should discuss that at the boot yeah yeah more questions oh I have to wrap up sorry so for more questions visit us at the boot that's also where the real experts are I'm only the spokesman so um thank you for uh all the good questions and I wish you a good hackaton [Applause] I was your computer great okay perfect can we can we test the uh oh there we go perfect nice we'll give it like one more minute for okay great perfect okay let's get started everyone uh thanks for being here this is just going to be a quick uh intro to AP chain uh AP chain for those who don't know is the blockchain being built by a bunch of teams um including the uh apoin Foundation which is the uh one of the teams that uh kind of evolved out of like the board AP yugal Labs uh sort of project um and us uh Caldera which is like a Rob as a company um AP chain is an arbitrum orbit L3 um so I'm sure folks who are deeper in the web 3 space uh have kind of seen this term thrown around a lot effectively an orbit L3 is a arbit uh you know a chain that's built using the same software as arbitrum uh and settling on top of another rollup uh generally an L2 um for AP chain specifically um it's settling on arbitrum one uh or in the case of the test net arbitrum sepolia um but orbit l3s can be you know settle on basically you know any L2 um but typically they're built uh on top of arbitrum uh when you're uh using orbit you know you have many advantages um it's effectively the same technology stack as arbitrum with potentially minor changes um this means you get full evm equivalence so for anyone who's you know developed smart contracts on either ethereum or polygon or arbit Etc uh the experience for developing on AP chain should be no different um it's also highly performant it's very secure uh arbitrum is the first rollup to have uh working fraud proofs which means that the chain can actually inherit the decentralization and security properties of the underlying chain it settles on because this is L3 uh it's kind of inheriting those properties from arbitrum which in turn it inherits those properties from uh ethereum so the chain still uh is credibly secured by ethereum um very very performant um you know that means that you can write all sorts of different applications applications that really leverage a lot of compute or storage on chain uh should still be very viable uh and also um AP chain specifically uses any trust which is the same technology that arbitrum Nova uh uses to offer even lower cost transactions via offchain da um in terms of like the features and the configuration of this chain chain um one thing to note is that uh there's a quarc minimum block time uh which is really great if you're building anything in like the gaming or social space anything consumer that requires really really fast ux can basically build close to real time applications um this block time however um and you'll see this later uh arbitrum stack chains they have a variable block time so no blocks are produced unless transactions are sent to the chain so for you know practical purposes this block time may be higher or or lower depending on the transaction activity on the Chain um but if you're if you're throwing a lot of transactions at the sequencer uh you will get you know 25 seconds for a confirmation um this chain also uses ape uh the AP coin token as the native token so rather than eth is the native token or like madic on polygon Etc um balancers are actually denominated in ape when you open up metamask it'll say you have X AP in your account that sort of thing um and just like other rollups this chain has a native Bridge because we're settling on arbitrum sepolia that native bridge is between AP chain and arbitrum seoa so you can use that for uh for message passing and you can use the same sdks uh and contracts that one would use with arbitrum chains uh you know between ethereum and arbitrum uh to communicate with sapoia so if you're doing anything that requires uh crushing connectivity that would be a good place to start so to get started we've put together a little Hub page Um this can be used to uh connect your wallet uh you know add the chain to metamask and get funds to develop with I'll give a quick demo of that right now um so once you go to our Hub um you'll see this uh there will be a button here to connect your wallet we support most of the popular browser based wallets and also mobile wallets via wallet connect should just be able to to click metamask add it to uh your metamask and if actually maybe I'll I'll uh I'll remove the network from my account just to Showcase what that would look like so if you're coming here from like a fresh metamask you will uh yeah you'll get a message like this um you just need to click right here it'll add the network to your wallet and then it'll allow you to switch to it and this uh this name Jenkins is uh kind of like a in joke in the ape Community but it's just the kind of code name for the first iteration of the achain test net um so now we have the network editor account as you can see balance is denominated in ape what we can do is we can click the faucet here and request funds to our account and we should see our balance tick up up by five ape pretty shortly occasionally there we go sometimes takes metamask a little while to uh to update it's on like a 10-sec timer um great um there there's also other infra that is included with the chain we have an Explorer I actually just asked our engineering team to allocate more resources to this so it might still still be down um yeah it is um but effectively this is like a version of block Scout it follows the standard interface that uh you know all ethereum Explorers follow you can get balances uh block details Etc there's also a really cool API um you can use this in your front ends or your back ends to get high level information of the chain so if you want like a list of latest blocks um list of transactions um transactions per uh get information of a specific transaction um transactions by address specific address info um and it also has uh highle apis for tokens um this is especially important because manually indexing tokens is very annoying um so if you want to for example get uh metadata for nfts um get the holders of either a 721 or erc20 token or an 1155 you can do it here here um and you know you can get transfers Etc so if you're building anything to do with tokens which I imagine most people will be um these API should be very helpful um as well um you know information about smart contracts um you can uh there also is a verifier API I'm not sure if it's actually in here but you can go to the the block Scout documentation to um get highle instructions for verifying the contract should be fairly similar to um how you would do it with ether scan um yeah so we went through the API docs there's also a status page if you're experiencing any issues with the chain you think the chain is down maybe check your first um this uh also uh there should be a way um through this to to alert our team if you have any issues um but of course there'll be people on hand at the hackathon here to help as well cool so let's um quickly deploy a contract um as mentioned the developer experience for ape chain should be very very similar to what you're used to if you're used to um building ethereum applications um I'm just going to do this in remix which is like uh a web-based IDE that the ethereum foundation provides um on their website remix.in so they actually have a great template here for ER c20s get minable um start a new workspace so we've got a token here using the open Zeppelin uh erc20 interface for folks who don't know open Zeppelin is just kind of like a library of you know really solid audited smart contracts uh that are commonly used including ones for like tokens r20s 721s Etc um this one we're using uh their standard erc20 interface as well as it's it's ownable um which means that um they there's like a we can probably click into this uh it basically means that there's like an owner variable in the contract that will be set to my address because I'll be deploying it and we can uh use this modifier only owner to designate uh contract methods that only the owner uh is allowed to do in the case of this erc2 um that is mint so I will have mint Authority on this token nobody else will um but everyone else will be able to use the standard erc20 methods transfer uh approve that sort of thing um so yeah we will call this test token set the symbol to test and then and we will be able to just deploy it um so with remix you're able to use an injected provider which is just your your wallet uh on the your wallet extension on Chrome um we're already on that achain Network um you'll know you are when you're at chain ID 1798 we have enough enough ape to deploy um then file this and deploy it and I'll set my address as the initial owner great so you saw it effectively instantly confirmed um estimate to the speed of the chain let's see if the Explorer is back up it is there we go uh so we saw the uh this is that mint transaction right there um or sorry not mint transaction the contract creation transaction um my address created this contract you'll see um here it is uh the indexing takes a little bit of time but shortly after this you know in a few minutes there'll be a line here that um contains more information about the token itself uh here we go so we can see I this is this is my old one um yeah so this is this is my address created that token um now we'll mint some to ourselves remix provides um like uh a basic interface for interacting with the contract after you create it we will mint this token to our own address and the amount um as most folks will know uh this erc20 will use decimals just like eth which means this amount um integer you need to take the balance you want to Mint and multiply it by uh 10 to the 18 um so we'll just do one with like a bunch of zeros should be more than enough send that mid transaction confirmed here it is so I've just minted a bunch of test token in my contract as you can see now block Scout has started to Index this as an erc20 um which allows you to use those higher level methods uh in the API that I uh demonstrated earlier so yeah there we go um of course you know alongside with remix um we have some docs um but you can you can use basically any uh ethereum Dev tools that you want we have common guides for Foundry and hard hat and that should be enough to get you started uh at the event today there are two prizes um for AP chain one of which is the best infr uh project so this is uh you know infrastructure uh that allows communities from other chains to participate um so things like asset mirroring interop um bridging that sort of thing um and then of course there's best d uh which looks here to be game fire or social F so consumer types of applications um we've compiled a list of useful links um the most useful is this uh short link at the top bit.ly Global that'll be a link to uh to this deck which you can use to grab all the other links um the HUD page with that faucet RPC details Etc is this link um that you'll definitely need to get started to get funds Etc and then everything else docs Explorer you know status page uh Etc and some Dev tools um are down here as well um also want to flag this arbitrum is evm equivalent so most folks should have no issues but there are some differences between the evm on arbitrum style chains and the evm you might be used to on ethereum um it's mostly to do with block numbers and time um specifically um so if you're running into any issues around like um block. number not uh returning the value that you expect um take a look at this this document and it should give you some ways to to solve that problem and yeah that's it for me um any questions yeah Jenkins is the just the name of the AP chain test cool awesome thanks guys start so be for do for fore spe e for see okay can you guys see the code there yeah all right I can make it bigger that I think yeah I see that's it fore speee spee speee this works for e spe e yeah for good okay all right can you hear me well yeah everything good all right hello everyone my name is Jose Franco I ask for the microphone because I move a lot so um we're going to talk today about arbitrum stylus and specifically we're going to talk how to upgrade a contract that is written in solidity to to a rest contract right so proxies then first of all my name is Jose Franco I'm an inte integration engineer at offchain Labs here are my Twitter and telegram handles I don't write a lot on Twitter but you can contact me there and telegram of course and offchain Labs well we are the initial Builders of arbitrum 1 and Nova before they were transferred to the arbitrum Dao and we are the developers of a stylus and orbit so for this hackathons we have specific uh specific price tracks for stylus and orbit if you want to know more about specifically orbit we are going to learn about stylus today just go to our booth and we'll be more than happy to to help you all right this Workshop is divided into two parts the first one is just an introduction to stylos we're going to talk about what it is what it enables and what benefits it has and then we're going to show a simple counter counter contract reason in rest right and the second one is a bit more advanced and we're going to talk about how to to upgrade this uh a solidity contract that you have behind the proxy to a rest contract what you have to to keep in mind when you do that right and we we will also see a a sample project so first of all what is stylus Stylus is an is an upgrade to the current uh development environment we have for smart contracts on evm chains right what that means is that um if you want to write a smart contract today in on an evm chain you usually write that in solidity or in Viper as well right but that's your choice that's what you what you have to uh that's the choice that you have right so stylus what it what it allows you is to uh write smart contracts in other languages like r c C++ and many other languages that will be um interoperate with the AVM as well I mean so this the way this works is that stylus activates a new virtual machine different than the EV M that executes wasm bite code right and that virual machine lives alongside the EVN and they can talk to each other right so if you have a stylus smart contract it is executed in the wasm virtual machine but you can from there you can call solidity contracts that live that are executed in the evm machine and the other way around okay they are fully interoperable um one of the main benefits that stylus brings is that we can access new developers ecosystems right like the r one or the C++ one and these are old numbers this is from 2022 almost two years ago but probably the numbers have changed but the ratios are probably the same so we are now opening the development um space to new communities as well right so more benefits from stylus it increases speed and reduces cost this is generally true because one bite code is going to be more efficient than than solidity uh bite code then you have to take into consideration um storage accesses and all that but gener generally speaking it is more efficient and then also big Improvement big Improvement in memory usage that brings also new use cases like Advanced cryptography generative art I was talking with a colleague yesterday and they were able to to implement this uh black shells argor that is used in finance for example that is very complex to do in solidity because yeah you end up with transactions that spend a lot of gas you can do that with stylus now and it reduces a lot the the usage of gas and those are yeah a few examples of what you can do so what we have today is that um besides the the the virtual machine we are also building an SDK for R there is another one for C and C++ we are putting more effort into rust so the SDK is more is more advanced but actually you don't need an SDK to to write your smart contract because any language that can be compiled to wasm can use arbitrum stylus and actually we have examples of smart conract written in Zig and assembly script they don't use any SDK or anything it's just um a program that is compiled to wasm it is deployed on chain and yeah you run it that's it so the next steps for stylus and the and the current State actually we have enabled stylus in arbit sepolia so today you can you can deploy your stylus programs there and and run them and there is an AIP already in the governance for to activate it on arbit from one and Nova the onchain vote will come soon I don't know exactly when but probably soon and if the da vote for it we will enable that on on one and Nova all right um these are three resources that I'd like to share with with people who want to start with stylus um don't worry about about searching for this because at the end of the presentation I'm going to show you a QR code that has all these resources all right so the first one is a quick start um this is in the public documentation it goes through how to set up your environment and how to work with a Hello World contract that is written in R how to deploy it how to use the cargo stylus tool that we that we use for that then we have the stylus by example that's a uh uh another different portal that contains information about how you can do certain things with the using the the r SDK for example how do you emit a log how do you handle errors how do you um I don't know encode function selectors stuff like that right and finally awesome Stylus is a repository of code that's been written by uh third party developers and we maintain there so you guys have examples of things that you can do with with stylus right all right so first example this is a a basic count counter contract it just has one variable that is a counter you can increment it you can change you can set a different uh count and all that so this is a perfect example to see um for a rust smart contract and we are going to take a look at it now all right here it is so for those of you who are familiar with Ras you will see that um the this the this structure that we have here is similar to what you get when you create a new cargo project actually the projects for stylos are created with cargo so we have our SRC folder and we have a main file and a Le file the main file we usually only use it to to be able to export the AI of the contract that we're going to write right so the main entry point for the contract and the the yeah the main file that contains the contract code is the leap file and in here this contract is very basic it only well it's called a counter it only has one storage variable and I'm going to explain this now and these three functions get set count and increment right okay so um I'm going to explain these things by explaining what specific stylus macros we have here and the first one that we have is this solidity storage macro and this macro tells stylus that the next struct that it going to it's going to find um defines the the storage layout that our contract is going to have right so in this case we only have one variable one U 256 variable named count and and that's it the next one that we have is entry point entry point defines well tells the stylus where the execution of the smart contract begins that means that if um whenever you call this contract you are telling stylus Hey whenever you receive a transaction you start executing code from here on right so usually these two macros go together solidity storage and entry point um the last one that we have here is external external tells stylus that the next functions that it's going to find are public functions they are they they can be called from outside the contract right if you want to implement any private contract you can do so by adding another inul inul counter above the external macro and those will be internal right okay and as I said these three functions well the get function only Returns the count the set count well sets a different count uh a different number in the variable and increment well increments by one another thing to keep in mind here is that when building the stylus when we compile the r code into into wasm we try to well we try to no we we change the we change the code and we change the function so so they are solidity ABI compatible okay what this means is that we want users to not care about what language the contract is written in but we want them to be able to call them the same way they call solidity contracts right so for example we have here a set count function that is using rust syntax it's using uh snake case right but this is not the way solidity AI functions are written right so when compiling this program dsdk is going to change this so when you call this function you will have to use camel case the same way you do with solidity all right and that being said said I think we have time to run to quickly run this this uh example we have this um I can answer questions later okay we have also this script folder that holds um sorry scripts to perform individual operations so if we call for example the deploy function here the deploy script oh sorry need to go to script deploy it's going to deploy our program we can take a look at it it actually uses the cargo stylus tool I don't want to go into details about this but you have that in the documentation and then uh so our contract is now deployed to this address and we can for example get count here I have this comment to help me with this we get the account the counter is zero obviously because we just deployed the program we increment it yeah okay and then we get the count again and it's one so as you can see here we are using actually Foundry cast to call our stylus program the same way you would call A A solidity program right and if we go to the set count script it's using cast send and as I said before is using set count in camel case Okay so this is going to be important for what we're going to see later all right let's go back to the presentation here all right let's go to the second part now I'm going to talk a bit about upgradability of a smart contracts you probably know everything about proxies and all that but in case anyone hasn't worked with proxies let me just cover the basics to understand what we're going to do later so as you know smart contracts are immutable that me that when you deploy the bite code you you cannot modify it right but obviously sometimes you want to have a you want to have upgradeable smart contracts because you want to be able to fix backs you want to be able to improve the logic of your contract so how do you how do you obtain upgradability well one of the most common patterns that we use are proxies okay and proxies are just um smart contracts that are deployed in front of a logic contract of the contract that has the the the business logic of your application so let's say that for example you want to have an you want to deploy an erc20 contract that is uh upgradeable you deploy the erc20 contract and in front of it you deploy the proxy your users are going to call the proxy they are only going to interact with the proxy and that contract is going to delegate call the erc20 contract um then if you want to upgrade the logic you just just deploy a new erc20 and point the proxy to that one so whenever the users call the proxy contract the the the call will be forwarded to to the New Logic contract then what happened with the storage because we are delegate calling from the proxy we are using the storage space of the proxy contract right and this is important because otherwise we will use the storage space of the logic contract and if we change it well we lose all the information right so one thing to keep in mind when upgrading is that you need to keep the same storage layout as a previous logic contract otherwise you will be messing with the slots and I don't know if you change the balances mapping with the owner's mapping you might be asking for the wrong information later all right however you can extend it if you keep the same storage layout and you add new variables below you can extend it and yeah just keep in mind that for the next one you have to keep the same the same storage layout and the other thing to keep in mind is that logic contracts shouldn't be initialized with a Constructor because if we are modifying the storage in the logic contract directly we are not modifying the storage from the proxy right so what we usually do is that we initialize the contract I don't know if in the case of an erc20 we we set the name and the symbol for example from a special initial initialization function function that we call from the proxy so um oh yeah one thing to keep in mind is that I'm giving a very basic explanation of proxies so proxies are very complex and can yeah can can do a lot of things this is just the basics to see what we are going to see today um there is a lot of information on Google um more unhappy to talk about proxies as well but yeah just keep in mind that these are much more complex so requirements of the proxy pattern that we're going to use um the logic contracts these erc20 contracts need to be initialized from the proxy or through the proxy not with constractor and we need to keep the same storage layout when we upgrade the logic contract right all right so let's get to it then we're going to upgrade a solidity erc20 contract to AR rest implementation this solidity erc20 contract is going to be behind the proxy right so the steps that we are going to follow more or less are first we are going to replicate the storage layout in the rast contract second we're going to write the same contract contract functions in the RAS contract we can modify the logic if we need but the signatures have to be the same and then to test we are going to simulate the the the update the update flow and add any necessary functionality we need there all right so for the solidity part of this code sample we are going to use open seing uh library right so for the proxy we are just using a transparent upgradeable proxy just simple as that for the erc20 contract we are going to use their implementation we are using here the the standard the non upgradable implementation they have an upgradeable implementation for the erc20 but we want to keep the storage as simple as possible the upgradeable uses a specific storage slot we want to to start the storage slot in in the slot zero or whatever the slot we we start from and we are also using the initializable um library to be able to initialize the contract through the proxy right so one thing to keep in mind here is that the initializable contract when you inherit from you are adding two storage variables two special storage variables to your contract right and because we are inheriting from that one before the erc20 we are going to have those two storage variables first and then we will have all the storage variables for for the erc20 contract we need to keep that in mind when we build our R contract and then we have uh just the initial the initialized um function I'm not initializing the the token name and symbol here I'm just hardcoding those values because I want to make this simple and we have one mean function all right so let's move to R then when we write our rast smart contract the first thing we are going to do is to replicate our storage layout and here I want to show you a different macro that we can use as well which is Sol storage this one is different than the previous one the previous one was solidity storage and this is solid storage the difference between those is the syntax that you are going to use for your for your variables right so for the previous one we use rust syntax and for this one we are using solidity syntax this is interesting especially for these use cases because if you are familiar with solidity if you're are solidity developer it's very easy to copy the storage layout that you have and paste it as is in your Ras smart contract if you are a Ras uh developer and you don't know anything about solidity it doesn't matter you just write the with rest syntax okay and here we are using also um a borrow macro because in this specific example we have our erc20 implementation is in a different file I wanted to show you a a more complex uh example so in this case everything that is erc20 is in a different file and then we call um we call that that module from our first leap module we will see that in the code later um yeah so then we're going to write the same functions uh in our Ras contract we are using another special macro here this inherit macro that is going to take all the functions that we have in this erc20 module and they are going to add it to the to the to my token we are adding a new Burn function here that we didn't have in the in the solidity contract yeah that's it so three contracts proxy and erc20 in solidity those are going to be deployed with Foundry and then we have the r contract the erc20 r contract that later we're going to uh deploy and change the proxy contract to point that one all right so let's take a quick look at it oh bad time to be signed out uh it is this one yeah so this is the the QR code that I'm going to show at the end is the um is for this repository the Ry of this repository contains all these resources that I I talked about before H in this project we have three main folders We have the proxy which is just the a Foundry project that contains the the proxy code then we have the erc20 solidity that contains my token similar to what we saw before but with with a few things I had to add a Constructor here even though it doesn't do anything because I'm not using the upgradeable and yeah open seing requires to to have the Constructor they initialized that we saw before the mint and the hardcoded uh name and symbol and then we have the r contract here so the r contract has the main file the same as before just to export the AI and then we have the leave and the ERC 20 the erc20 has the what I said before the implementation of the erc20 standard right it uses the Sol storage uh that handles solidity syntax so it has balances allowances total Supply then we have our events and errors that we can Emit and throw and then in here we have an impul of the erc20 that doesn't have the external uh Max that we saw before that means that these functions are internal they can only be called for within from within the contract right we have our transfer we have our mint burn all the internal functions that we need and then we have NE a different inut erc20 with the external macro so these are the functions that we can we can call from outside the contract right the name symbol decimals toal Supply well everything that we need so not is that even though in in solidity we have transfer from in camel case here we are writing in snake case because we're writing our R contract so this is going to be compiled to wasm it's going to change the the way we call it so it's going to be compatible with with the proxy that we are using Okay users are not going to notice any difference there all right so from the Le file in the end the Le remember is the entry point for our contract so even though we have the erc20 file all calls are going to go through whatever we have in in Le first right we are using um the erc20 module that we just saw the solid storage is what we saw before uh remember that we had two variables um two storage variables that come from the initializable contract and so we are putting them first and then we are putting the we are borrowing the ones from the erc20 module and we have the mint function and the and the burn function that we are adding all right I think we can do a quick test here for the scripts folder we have the same thing here if you want to run it we can just deploy it one test that I like to do let's see if I can do everything with one hand uh deoy so deploy it's only going to deploy the the solidity contracts all right so we have the proxy here we will need both the the proxy contract and admin for later but for now let's get the token information here let's see all right so let's get the token information let's minan some tokens yeah I'm not sure I have time for the full demo demo but let's try yeah and let's get the balance all right so here for the balance I'm just just using the the deployer account all right and now what we are going to do if I can is to upgrade the contract with the update logic script for this one we need the the proxy contract and the proxy admin because we need to send the update call from the proxy admin address right copy and so this is going to deploy the RAS contract using cargo stylus and then it's going to call the the the update function of the proxy contract so now if we go to the get information we'll see that we have now the my token V2 so it's using the contract the r contract and if we go to balance we should have the same balance as we had before so the the the first that were minted on initialization and the last uh 100 tokens that we minted with this all right so I don't have more time so I will just show you the QR code if this allows me to show you the QR code ah no well I'm going to yeah I'll do another thing I'll I'll write on Discord on the E Global server I will send uh this presentation I will send you the link to the repository actually that contains everything and yeah you can grab it from there okay I will send it in the partner arbitrum channel of the E Global Discord and yeah thank you very much I don't know I think someone had a question before I have one minute left yeah for stylus stylist for I think they are working on a on a library for R contracts um I can try to dig in some information and see uh what I can find I think they they actually published it on Twitter I think if I remember correctly function R code does not change anything it's a function oh I see what you mean um I'm not 100% sure but I believe you don't mod if you don't modify the storage it's just going to Market as as viewer yeah it should the SDK the r SDK yeah so the SDK probably when it compiles it to wasm H it will it will just mark it as as view okay do I yeah well actually what you can do is that um well we had several macros that you can use and you put them in top of the of the function and then give you for example for a p for a payable modifier we had a payable macro and you put it on top of your function and then it makes it payable for example right I can use for example Oh you mean for modifiers yeah okay okay okay sorry for ex yeah I don't know I can find that out but yeah but I don't know if you have the same behavior as modifiers in in in R yeah the same yeah exactly yeah it's it's going to be compatible with solidity IIs if you want because I run out of time if you want we can we can talk about me in in our booth I don't know if we have time no okay so yeah exactly you can go to our booth and we will talk or even outside here thank you very much V like netork access that sorry tell me again [Music] are you preso uh no so can I connect it yeah if you need to present a demo or something on internet I suggest to connect this because it's ethernet so we run smooth oh okay can you can just connect it in thank you okay you're welcome uh some thing is please talk directly to the mics okay are you walking around no okay perfect uh if somebody ask a question will you repeat the question so that people in the watching the video can actually listen to it sure um it's not connecting anything to this one it's here it's flashing so maybe it's going to appear now um it's not Wi-Fi right it's not Wi-Fi so connected is that one can you try I mean trying okay now it's good okay now Lo uh okay it's loading now it's loading now I got it I got it yeah great thank you maybe can and uh 28 okay so I will say tell you like five okay before you end and then two is that okay yeah interet okay yeah uh what do you need only have one desktop oh another I don't think so but there's only one desktop hello hello sorry give us a a second we'll get started real soon I have faith in the ab team okay maybe while they get the presentation set up um I'm going to introduce myself and then um kind of get a sense from everyone here um on what they are trying to build so that I know what's the best thing to share with all of you today cuz I know you only have like less than 48 hours to hack so we want to make this as painless and as easy as you as possible um so nice to meet all of you my name is Sarah uh I am from FAL coin and I'm part of a developer experience team called Phil Builders and we focus on building out easy DX resources for filecoin um so just a show of hands from everyone how many of you know what fcoin does okay great have you all gotten your t-shirt at the booth yeah yeah okay it's kind of like this which is our white paper so huh yeah yeah but um the white paper is on the back on the the one in the booth yeah my mine's special so yeah but it's cooler the one at the booth is cooler and you need to know something about fcoin to get your T-shirt so you should pay attention for this presentation and then go get your swag yeah cool um how many of you have used FCO to store your data before okay okay and could you retrieve that data yeah okay so I'll run I'll run through why that is so and what is the advantages of storing it on filecoin versus pinning it on ipfs which I'm sure everyone here ipfs yeah okay yeah super easy to use right um the best way to use both is kind of to have a combination and I'll kind of explain why in a little bit um for today's presentation and I know the Bounty is about um creating storage use cases on filecoin um AI on filecoin and privacy preserving applications um those are like so what I'm going to run through today is foundations of filecoin and how your data is actually being stored um it is not that not that simple a protocol in terms of how we get data stored but we have sdks that will make it super easy for you to use it's just that it will be useful for you to understand how that is actually being packaged and where your data is actually sitting so that when you create an application you you'll know any troubleshooting issues and we'll also be at the booth to to help out okay so um let's hope this works okay oh you have you have one uh it is a HDMI to type c but yeah if you have one or if anyone has one like a port yeah um so who here is building an AI use case for their project very nice very nice um what are you using for your A for your computation okay okay cool um we have actually had some data sets on file coin that you can use um that will be easy for you to retrieve and you can run your computation on top of that so hopefully that will make it easy for you okay thank you so much let's try this directd I'm going I'm going to try it try to this is like yeah as expected haven't even gotten to the demo and this is not working um this is a yeah a share it um is it is it my MacBook it's problem yes which one this uh no this is all the set up I have this and then I has to power and and yeah and power it and connect the charger to it instead maybe yeah now connect the charger this the charger oh oh oh oh oh hold on hold on hold on it this looks like it's [Music] working does it does it work now but it looks it looks like my screen connected [Music] no okay thank you oh whoever the two people that helped me just now you get extra swag come by the booth thank you okay great we will now get started okay we can do this we can do this we can do this in 20 minutes that's no come on all right cool um so we're going to run through fcoin storage for building resilient applications um as I mentioned my name is Sarah if you want more updates on DX resources from filecoin we recently posted some template contracts to do cross chain payments and there are more things you can find in the documentation which is docs doal coin.io or you can follow us on Twitter for at Phil builders for more Technical Resources to come or oh this um there is no story to it just to clarify trucker flinging means nothing um if anyone ask okay all right cool um so fcoin tdar it is a crypto powered storage Network we have one of the largest decentralized storage networks around um with a huge storage capacity and what we're focused on is getting more data onto that already committed storage capacity from our storage providers and also to enable now with the fbm launched new def applications around the fcoin network because collateral is very different in the filecoin network it is based off hardware and it's really high tool so there are a lot of opportunities for the defi based on filecoin so yeah how have we been doing since we launched we launched the fal coin virtual machine back in March 2023 um I was part of the team that was launching it and so we've been working very very closely with Builders uh you probably see me and my team at different hackathons now um we've had um about 4,000 unique contracts deployed to date um and that's still growing very steadily over time yeah if anyone's curious this is built by starboard so if you just search starboard fcoin virtual machine you can check out the stats for our contract deployments so high level what is the ex uh what is the fcoin master plan um it started about 7 to eight years ago we started with ipfs which is why everyone knows and loves it well um that to clarify because we have had this question very often at the booth I also took a really long time like to kind of understand the difference and I don't want to assume um ipfs is not on the blockchain it is P2P Network and so if you store data on ipfs you're effectively pinning a copy of your data um on a note that is unless you pay like an infura or a pinata um it is not actually going to store your dat the note might actually go down so if your peer peer Network goes down your data disappears so that those are the like trade-offs with ipfs but it is is very fast and it's also it's fast to pin and it's fast to retrieve so now we go outside of uh ipfs we go on to file coin so you have the filecoin layer zero um fcoin itself is a protocol that represents all the different storage deals that are made on filecoin so it doesn't your data is not actually sted on chain um it is sted of course with storage providers that are represented on chain and they get slashed if they do not guarantee your data to be available when you want to retrieve it so that is how the filecoin network works um on top of that we've launched a filecoin virtual machine uh last year which is to enable programmability so before this you could not do any kind of depth development on fcoin um but today you can um the Falin virtual machine is also fully evm compatible um there are some op codes and if you have questions you can come by the booth that we are as every EIP launchers we are keeping up with all the different upgrades um so we're we're not like straight straight off the bad like on par with evm compatibility but we're mostly evm compatible um you can use Foundry you can use hardhead um we have kits for those as well so you should be able to build your de um and then very recently back in about November last year we launched the interplanetary consensus um I won't run through that today but it is a resource that you can use and you will qualify for the Bounty if you want to use it um just a just an FYI IPC is a framework kind of similar to Cosmos um but built for FAL coin where you can um build your own chain or ler to on top of fcoin today using the fbm under the hood and what that allows you to do is to build custom C calls to do with storage yeah and build in actors on file coin so you could build a very storage focused um layer too so yeah that's kind of storage evolution of fcoin um and so I'm going to get into the mechanics of how you do data storage um some of you might no this but most most people do require like a little bit of a refresher on this and then we'll get into the tools that you can use and then all this will make sense so data storage 101 on how it works on filecoin you start with a file and you have your own file what happens then for your file to get stored onto the network um you have to prepare that data and turn it into a car file which is a Content archive file so content archive files are a special way of packaging your data such that it can be represented across IPL nodes ipld is kind of like a complimentary feature to ipfs um but it allows you to content address um the different parts of your your file that you're trying to store so it's important to prepare your data into a car file if not it can't really get on the network um once it's packaged into a car file it gets represented by a Content ID and so CS are very important if you've you used ipfs you would have seen this around um when it gets start on file coin it is also represented by a Content ID so these are really important once you have your content ID your storage provider will then take that Content ID uh find the doc car file that is related to it download your doc car file to some kind of buffer maybe it's across HTTP maybe you put it into a Dropbox maybe you mail it across totally up the you they'll download that file and they'll put it into a storage deal that then gets represented on the blockchain so tldr this is very high level on how FAL coin works as a protocol okay so um we're targeting some key use cases here um I can go on and on and you know Juan and the entire FAL coin ecosystem has like so much information like the people are brilliant um but we're going to Target some really key use cases that you will use within a 48 hour hackathon which is namely to store small data um small data either directly to file coin from a de built on file coin or storing small data from a de that you have on different chain and how you can access that um the other one we'll run through is how to SP uh store larger pieces of data and then I'll show you some easy cookbooks that you can use for your hackathon so if you're storing smaller pieces of data and this refers to things that are smaller than one gig like really really small images um we have what we call Storage on Rams which are like lighthouse.

storage and web view. storage and what they've done is to provide an SDK that you can use um available in typescript or JavaScript and you can use it across um cross chain from any depth that you have deployed onto if you're deploying on polygon you can just call this and then store the results that you have onto um Lighthouse and web 3. storage so what happens there on the back end and you can scan this QR code it will bring you to those sites and you can use the sdks um what will happen in this case is that you upload your files pathway so you know in your desktop what is the pathway to your file how do you download it um the storage on RAM will then package the data for you they'll prepare it into a DOT car file which I mentioned earlier on and they'll give you a CID because they're printing it to ipfs but know that that CID only represents the copy of your data that is on ipfs so that you can do quick retrievals so if you have a de that you know every transaction you need to store retrieve store retrieve ipfs is really important here um but to have long-term guarantee of your data it will also store a copy and a backup onto filecoin um the process that I showed you earlier on from a c to a storage deal can take anywhere between 24 to 48 hours because ceiling is a computation heavy process and it also requires a storage provider to receive enough data to want to package it into 32 gabt of data which is the the typical sector size it's a whole process we won't get into it but that's why your deal takes 24 to 48 hours um so these are a really good stop gap for you to use as a solution so you can serve the needs of your debt but also get that data guaranteed on backup for long term okay and if you want to manage small data so the cool thing about filecoin and I think this is a little bit different from what you can do with other platforms out there is you can actually um programma tize how you want to store your data so when for and Lighthouse is a really good example of this this is a different QR code that goes through that one page where they have offered a new feature that we built with them called uh rest rest stands for replication renewal and repair of your data so when you upload your small piece of of data you can specify how many copies you want to have how many um how often or any conditions you want for replication um or repair and renewal uh renewal of your data deal so for example the duration is only for five months uh maybe based on a certain condition um it will then renew that deal after a certain period or if the deal if the sector breaks um it will identify that issue and then fix it for you so you can specify all these different parameters within the lighthouse SDK and it's still within the SDK so that's really amazing and easy to use and once again pin ipfs start the file coin you can then retrieve that data so that is an additional function um I don't know what use case you want to use it for it could be a legal use case it could be gdpr um that's a really good one for you to check out okay and then we come to storing larger data so if you have large data sets um that you want to get stored um and you don't have that time constraint of having to store it super quickly you can consider um storing it directly within a filecoin smart contract on fbm um to the filecoin network so I'm going to assume here if you're storing larger dealing with larger data um you might want to build your debt within fcoin if you're doing so you can use the client contract there is a documentation here that you can use um you will deploy the contract yourself and you'll prepare your data and put it into the client contract and what the contract does is to send a deal proposal to the Falin Network and we already have storage providers on the test net um that have that are subscribed to this contract to look out for events from this this type of contract and once they see those events they will pick up the deal and store it for you this should typically happen within 12 to 24 hours that is the agreement we have with them um and so you can use this method if you're storing larger pieces of data yeah and you should get a deal ID back at the end of the day so if you don't have a deal ID it means your data isn't actually stored on fcoin yeah okay so that that is another method for you to use okay and then it comes to retrieving that dat so for those of you who raised your hand earlier on and you st the file coin but you found it hard to retrieve your data um this is where this comes into play so um you can use Lassie which is a very easy CLI that you can use to retrieve your data if you have your deal ID um it should also come together with a root C ID which represents your data store on filecoin you can just easily call that um bfy um root CID and then retrieve your data using Lassie so that's how you're going to get your data back um and if you want to retrieve ex if you want to use existing data sets that we have already sted on filecoin for you we've uploaded some of the popular amist data sets onto data sets. file coin.io and so you can just use that off the cuff and start building an application from there for the hackathon yeah okay so building depths on F coin why do it um as I mentioned earlier on if you want to we you know multi-chain is the future if you have your debt deployed on another another chain SDS are a great way to go if if you want to build it natively within fcoin um here are some key advantages um it's great for data Centric use cases there's a lot of manipulation you can do with the filecoin Dos solidity library that I will share the resource with you in the next few slides um to then call on file coins built-in actors so we have actors like the market actor for example that deals with how deals are being made how um storage providers are being incentivized and so you can actually call those using solidity methods and build your Dept from there so if you have a data Centric app great to build it there um it's also evm compatible and if you have unique D use cases um if you want to check out filecoin and understand the collateral Network and what kind of new data defi use cases you can build um FAL coin is interesting we have like liquid staking pools for example so minor um storage providers which are kind of like Al miners have a huge amount of collateral to stake um that leads to use cases of like lending pools where they would like to get collateral length to them and then we have like fill token holders for example that can then put their fill into lending pool or staking pool and then that gets lent out to Miners And whatever they get from block rewards which are pretty substantial can then go back into the pool so these are some defi use cases you can think of that you won't really see in other ecosystems um but we'll love to see some interesting ideas from all of you um and then lastly cheap transactions um uh Falin in general if you're using the fbm it's not super widely used right now we only launched last year transactions are really cheap so if you're running a application it's going to be much cheaper um it might be a little slow lower for now um because we we are launching some protocol changes in by September that will allow much faster block time but for now the block time is about 30 to 90 seconds so it might be a little bit slower but the trade-off is that it's a lot cheaper to run um we used to have a Fill gas estimator but the tool is down for this hackathon so I can't show you um but yeah it's definitely much cheaper to run so if you want to build a debt on fcoin here are some tools that you can use um Falin dool is the solidity Library I mentioned earlier on we just recently did a round of audits and also made some updates to it um so it should be working really really well right now um so you can check that out um if you want to see how to use it some examples we have it on the docs.

file coin.io as well whoa all right totally awake now um cool you know I can just send this slides to you right like okay I'm kidding um and then um if you want some dep code books um I'm going to run through this site really quickly um but we have these codebook books ready for you to use um if you want a query chain data um we have tools that apis available for you um we have some oracles integrator as well we have about I think we have pith and Tor um we maybe have a few more coming in the next few months um but we're building up our Integrations at this point in time um but you can access price feeds there we have cross chain Bridges with EXA we if you follow the field Builders Twitter we actually just launched some template contracts that you can use for this hackathon um so that makes it super easy to do some um um payments within your deps and then lastly we have um if you're looking to do SQL queries um a decentralized database running on filecoin you don't have to build that from scratch table land is a really good partner for us and they have already built that tooling for you so you can easily set up a decentralized database with SQL queries on filecoin today yeah so um I talked a bunch but I'm going to show you real quick uh I don't know if you guys can see this just oops um yeah so if you want to check out the cookbooks um these are all over here for you to use um we also have oh I don't think that's on testnet um I wanted to show you because we are block Scout is integrating with us and I know block Scout is one of the bounties here in the hackathon as well um they have soft launched on filecoin um but it's only for main net so it's not for test net so if you want to pay Phill to use main net and use their apis like good for you um but yeah so yeah all in all that's mostly it and I think I have some time for questions so anyone has a question they want to ask yes uh G access yes um let me just show you real quick what do you mean in terms of micro payments oh okay right um let me show you get a access first so so Lighthouse has a really easy SDK for you to use um once again where is it yeah if it will load yeah so they have a SDK you can use um how this works is through um decentralized key sharing um and that will allow you to encrypt your data before it gets pinned on the ipfs so you can use this there uh micro payments wise you can use excela for Coss pay hum today they do swaps um that's probably the easiest oh we also have caler if you want to use it as well so those are the two options for payments yeah uh question I saw another hand it's not yes yeah um so this allows you to encrypt your file um before it start to the network if a lot of the data we have on vcoin doesn't go through this method right it's only if users choose to privacy on fcoin um the data is openly available so your storage providers could technically look at your data um but yeah yeah they could look at your data so it is a good idea to think about encryption um Also regarding one of our bounties around privacy preserving tools um I would be interested to see maybe someone using like L protocol for example example to integrate with filecoin through the fbm to see how you can provide Access Control to data we don't have that we used to have the integration running but the contract hasn't been updated um but we would love to see some new usage of third party Integrations with FAL coin data yeah that would be really cool it think about uh so on Main net it takes about 24 to 48 hours on test net it takes about 12 to 24 hours yeah but typically within 12 hours you should get your deal um that is the commitment we have with the storage provider that's servicing our test net um so everything should be available within the yeah if so I I would give you the link directly but then you get lost but if you go to do FAL coin.io there will be a high starter kit that you can access yeah yes uh Falco and AI we have some projects like fluence and lad that are providing like decentralized compute off of FAL coin data um fluence itself I think is super new I'm not sure if you can actually develop on it just yet might be wrong but you should check it out are there but can developers use it okay okay maybe yeah so so um if you use fluence fluence actually backs it up to FAL coin you could use them for decentralized compute uh Lily Lily Pad is another project to check out um these are available within the cookbooks under decentralized compute we have the links for them uh Lily Pad is a set of smart contracts that allows you to coordinate decentralized compute onto another Network called bakay yaa um but the smart contracts are there for you to use the last time I tried it like two weeks ago smart contracts were not updated yet and they were like broken but you should check yeah if not we have the team on Discord to like fix it and we're asking them to fix it right now that's why I didn't show it in this um tutorial yeah um that's a really good question um I think data set marketplaces to support AI models will be very interesting um another interesting one is if anyone can figure out traceability of generating a computation result so traceability of data being used to run a model that would be really interesting to see U maybe some kind of attestation that you can see like a crowd source of data being uploaded and the model running on top of it um and what kind of result that puts out um that would be really cool to see yeah um generally too if anyone thinks about how to backup llm snapshots to fcoin in a in a really use user friendly way that would be a useful that would be a useful one too I know like quite a few clients asking for that yeah I mean just some ideas to put out there but I think these will get the team really excited um okay I think I'm at time so I will stop but I am okay cool I will be at the booth and yes those two of you come I'll give you SW thank you so much for your help thank you thank you Sarah thank you for help for

Automatic transcript — names and jargon may be misspelled.