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

Loading player…

Filecoin 🛠 DataDAO's on the FVM

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Some of the most skilled web3 developers, designers and product builders from all around the globe came together for a weekend-long hackathon at ETHGlobal New York 2023. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] with the developer relations team with the final coin virtual machine and protocol labs and so today I'm going to give you an overview of ipfs filecoin the fem and data dials which are exciting new application that uh we're seeing a lot of interest in and people building on right so without further Ado I'll go ahead and get into it also real quick and aside usually I have a slide for this but I had a lot of slides that I want to fit it in uh but you know a lot of the stuff I'm saying um you know I'm going to try to build up from the ground up but if something doesn't make sense uh it probably doesn't make sense for a lot of people so feel free to ask a question if we have time after if uh if not you'll find me at the booth or find anyone with a yellow jacket and the follow corn symbol on and you can ask some questions right so uh let's dive in the file coin master plan uh so step one build the world's largest decentralized storage network uh that's checked off I believe uh last I checked there is exabytes of storage capacity for the follow coin Network so already pretty large step two onboard and Safeguard Humanities data what is Humanity's data that is all the data that Humanity finds useful which is a lot of data right um this is uh something that will continue to happen you know as we as humans generate more and more data and finally step three is bring compute to the data and enable web scale apps and a decentralized way right and this is where the file coin virtual machine comes in and uh we'll jump into that in a second right so uh you heard that I work specifically with the file cord virtual machine team what is the fem uh it delivers on-chain programmability to the file coin Network the filecoin blockchain was an application specific blockchain initially uh designed uh to be like a middle layer between clients that had data they want archivably stored and storage providers that had large amounts of SSD and uh are willing to provide that for a price right uh the filecoin virtual machine allows us to write programs or as you may know them smart contracts on top of the file coin virtual machine um and uh allows us to design programmability and we'll get into what makes it special on filecoin versus like a traditional evm chain in a second so the most common question and confusions that we get are between ipfs and file coin right a lot of developers know ipfs a little less neural file coin and a lot of people want to know what is the difference right some people heard file coin is an incentive incentivization layer on top of ipfs that is incorrect ipfs and filecoin are two separate networks uh ipfs is uh a peer-to-peer storage and file sharing Network much like BitTorrent only the content is uh content address right not location address so like BitTorrent you need a file to get started in ipfs you look up your content by what's called a CID which is basically like a hash of your data that represents your data right the thing with ipfs is um you don't have permanent storage on it right like there's nothing that guarantees your data is going to stay up if people just don't have it pinned up right so uh this is where the file coin blockchain comes into play um and we have a kind of divvied out into layers um layer zero you can think of it as the storage layer this is the storage providers providing their um ssds and validating the blockchain they have layer one as that VM um it's kind of like a layer 0.5 as we'll see in a second it's actually within uh the layer zero it's within the file coin chain right the the virtual machine lives in uh the file coin blockchain and all the storage providers run it and you know you can think of Layer Two as any storage related adapts and solutions built on top of the file corn blockchain including what uh other James call Layer Two so other blockchains could plug in to uh the file coin blockchain to help it scale right so uh again to kind of like illustrate ipfs a little bit more um if you want to use ipfs and give a little bit more guarantees a client uh you know you can run a bunch of your own nodes to add a little bit more availability guarantees for the data that you store in ipfs uh you can run nodes with the community which would probably be even better you know right if it's like really in demand data people may want to host it themselves and make it super available or you can pay for a pending service and they'll give you some reliability guarantees but this is obviously a slightly more centralized solution right um and so all of these are basically based off either you're kind of paying for a centralized solution or you're uh hoping for the Goodwill of the community keep the data alive which uh I think works as an awesome protocol you know but if you really just need those guarantees that data is going to be there and you want those guarantees in a decentralized way um file coin is going to need to come in right so here's like kind of a simple illustration of the filecoin network you have storage providers there on the bottom and they are running the file file coin chain nodes the client software uh one of the biggest ones is lotus this would be kind of like the equivalent of like guess if you're familiar with ethereum clients for file coin um so these storage providers they have a lot of ssds typically warehouses of them um but anyone can become one of these storage providers you just need ssds to provide storage um they put some fill as collateral to uh you know become a validator and uh they run the file corn blockchain this logical thing that is the final coin blockchain runs on all of these storage providers right and they have to come to consensus on blocks like any other blockchain right um and again originally the file corn blockchain was tailor-made to sit in between the storage providers and clients up there who want their data stored right and that's just kind of what it was made for but uh beginning in March a virtual machine was added into the uh file coin blockchain right the file coin virtual machine um it was clear you know uh with all of these virtual machines and smart contracts that this kind of programmability capability on blockchains uh is super useful to have right smart contracts enable you to build decentralized logic um and uh now we'll get into it but like with file coin we can build logic around storage right um So within that blockchain it's just a virtual machine and to give you a little uh background on exactly what the architecture of the fvm looks like those storage providers right they're all running a blockchain node uh most likely a Lotus node which is the most popular there's also Venus um and within that file coin node you have uh the fem that kind of sits within it it is built in a walzem-based runtime um and the evm is actually virtualized on top of this wasm based uh virtual machine so you may be asking why are we virtualizing the evm on top of wasm instead of just using Walzem or just using the evm right one of the core reasons is that um it's still unclear even though evm is the predominant uh virtual machine in web 3 at the moment what a virtual machine is really going to be the one that takes off in the future and this allows flexibility for adding other run times other virtual machines to the final coin blockchain if needed in the future right um right now the first one is evm uh you know it's fully evm compatible uh but uh you know later down the line uh we could add uh new foreign blockchain runtimes like maybe the Solana runtime could run in file coin and even uh possibility of non-block chain run times you know for whatever reason maybe we want to run the jvm in uh file coin uh you could technically do that right um we also have this concept of built-in actors uh kind of like pre-compiles in ethereum these are the traditional apis and file coin that you would use to make storage deals and uh we'll get into it but you could actually access these inbuilt actors from within the uh evm in filecoin so again you know evm is the first runtime fully uh evm compatible so all of your favorite tools if you're used to developing uh on the evm are totally usable for developing on filecoin uh hard hat um can't say truffle anymore but um Foundry um metamask remixed uh so we have some pre-built kits that you can use and I'll provide links to that in a bit um but yeah so you can uh you can build with it and that's one of the main reasons the evm was the first right because everyone is familiar with it as their most robust uh developer ecosystem out of all the web 3D VMS so far so one next common question we would naturally get is why should I use the fem right there's a million evm chains why don't I just use ethereum itself arbitrim uh polygon uh you know name your favorite evm chain why not that uh there's a simple answer to that and it's storage deals right this concept of storage deals which don't exist on almost any other blockchain that uh I'm familiar with right so uh what is a storage deal right storage deals are the contracts that govern um those storage providers that we're talking about right so you know we said earlier ipfs doesn't consider via storage file coin does how does it do that well if you're running a storage provider node you have to put up collateral right in in file coin token right to uh run the node right and if you take a storage deal you have to put up a little bit more collateral per the deal right and uh once you do that as a storage provider you you do what's called seal the data and every 24 hours you have to provide a proof that you are still storing that data if you fail to provide a proof your collateral can get slashed right so if you do provide the proof uh you continue to get paid as per the storage deal right and uh these storage deals live on the file corn blockchain right uh you know we'll get in like a common another common misconception is uh the data that we're storing like the large data sets that we're storing with these storage providers they do not live on chain right this is what lives almost change like the storage deals the metadata you know saying who's storing what how big the the the data is is a verified will fill plus kind of the metadata of the data right uh but the storage providers have the actual large data sets and the hard drive sealed and ready to be approved at any point so again uh you know we so the fem cannot actually compute over these large data sets started with the storage providers there's other networks that can do that uh you know off chain networks it'd be really expensive to do that in a blockchain virtual machine um storage use all the contracts metadata that represents that data so uh just really want to beat that point in because uh that's the first thing people want it's like okay I've got data stored with these storage providers I want to run an AI model over it um you can do that but just not with the fvm uh with something like baculao our Lily Pad our projects that are kind of building on top of that allow you to do that so we talked about um you know these inbuilt actors and how you know filecoin the blockchain kind of predates um the virtual machine the virtual machine launched on mainnet back in March and so um you know there's all these classic apis that were available before the virtual machine how do we access those apis from um solidity from uh the evm on file coin right because the UVM wasn't built again knowing what a storage deal is it doesn't know how to access those things um and uh that's really what makes uh the file core and evm unique so uh we worked together with a a wonderful team of zondex to build these file Consolidated libraries which act as abstractions between these inbuilt actors so you can easily uh access um these apis from these built-in actors in your solidity smart contracts right so if you want to read those storage deals you can do so through filecorn not Soul right if you uh want to read uh what minor has what deal you can do that through filecorn.soul and start writing uh unique application storage based applications with it right so there's kind of uh three main paths where where um pushing people on how to get your data stored on file coin right maybe you don't need any kind of programmatic storage and in that case you can just store data like you could always on uh filecoin which usually involves um getting no a storage provider or finding them on some Marketplace seeing what kind of deals they're accepting um signing what we call a deal Proposal with a with a key uh the storage provider will review that they will um decide if that's a valuable deal or not and you know you can negotiate but if it is they'll uh call a method called publish storage deal on chain and your deal will get active and they'll store your deal and they'll start having to make proofs right but maybe you need programmatic storage um in that case there's two paths if you have really small data sets maybe just a couple of nft images or maybe you have a really large data set like huge DSi data sets uh like oceanographic data or something that you want to run a large AI model on if you have the small data and for many people building in this hackathon you'll probably be working with smaller data sets we recommend you use an aggregator basically a third party that will take your data they'll pin it on ipfs and they'll work on making a storage deal for you on file core all the complexity is abstracted away super easy super quick um the other option is uh using what we call the client contract basically a contract which allows you to make a a storage Deal completely on chain it does this by an emitting event with all of the deal proposal informations and any storage provider running um a front end called boost can listen for that information and make the deal through that right the client contract is a bit more complex so a lot of the aggregators they use this in the background themselves uh so it's a lot harder to get started for like a quick weekend hackathon so I'll definitely suggest checking out the aggregator route but if you really want to you can find that client contract it's in our starter kits and you can kind of start developing with that so yep we get three pads so uh what can you do with the fam right um you can kind of do what you do with any other virtual machine in web 3 we can make governance uh you know you can mint tokens uh to give your project tokenomics uh endowment management but we also have these like kind of fundamental infrastructure things we can now build right uh repair workers or new workers so before in file coin if you know your deal that you would make would have a certain amount of time and then it would expire right but maybe you want to have your deal Renew on indefinitely right in this case you could maybe create a Dao and that Dao can fund a treasury and that treasury can be used to pay uh renew workers that monitor the state of a deal and automatically renew it for you when it's about to expire in this way you can kind of crowdfund a uh a deal that just kind of keeps the data stored indefinitely right um our make new storage deals right these are kind of Primitives that you you wouldn't really see in another chain that doesn't have storage at its uh kind of base layer so what are data Downs that's a term that uh was kind of in the title of the talk it's a kind of a buzzword you'll see around if you're not familiar a dow stands for a decentralized autonomous organization essentially it's just a bunch of people organizing on chain and figuring out a way to vote for proposals and get things passed uh data is this boring definition a collection of discrete values I basically put up there just to be a little facetious I think we all know what data is uh but uh well what I mean when I'm saying data dowels is dials storing data on file coin right um you'll kind of see this term used different ways in different places and it's still kind of a nebulous term depending on what you talk to but this is what I mean specifically when I talk about data Dives right so dials that are kind of managing the data being stored on file Corning so I have a fun example of it now uh that my colleague Sarah came up with uh biscuit Dao if you don't know biscuit is their mascot for file corn it's the Corgi and biscuit dial is a community of Corgi dog owners that want to better understand their corgis and uh let the world better understand corgis right so you know maybe I have some ZK verified access as a contributor maybe it's open and you know they upload Corgi Behavior Monday to Friday on the file core and chain and as a reward uh they get tokens uh some kind of biscuit token maybe that they can use to further vote in the Dow um you know it could have value they can sell an open market but as more uh Corgi owners get more tokens they can participate in that votings and they can use like the treasury of the Dow to further incentivize specific kind of data sets they need on their corgis uh you know control the treasury reward you know maybe take some of that money donate it to organizations that will rescue corgis um whatever the Dow wants you know they can now organize around that um they could also use um the tokens to maybe pay for a service like baculao or lily pad and run some AI models over this data to uh get some more refined information uh on all the corgis in the Dow right you know and again they can also fund these uh repair renew replicate deals to make sure that their data is stored indefinitely and uh this results in a healthier and happier corgis around the world who doesn't want healthier and happy corgis uh you can replace it with a cat if you're more of a cat person or any other breed of dog um but this is kind of just a fun example to show you like what you could possibly build with um fvm and data dows um hot off the presses I actually just pushed an example of uh biscuit dial onto the file coin um uh and protocol Labs GitHub repo right so you can check it out um it has a bunch of contracts in it already it allows you to basically go in uh make a proposal for data that you have stored on uh on filecoin right and you can actually store that data quickly and easily using an aggregator lighthouse.storage and uh you know rewards tokens out um if you the Dow votes on like like yeah this is data that we want this is data that's stored um and as a readme that kind of explains it I'll be kind of building up this more on in my free time just uh giving it uh maybe more of a front end uh so this is kind of still an MVP right now but it has everything you need uh to experiment and play around with uh with a biscuit Dow right um and you've heard me talk about aggregators and uh Lighthouse has storage is um an aggregator we've been working closely with uh they have an awesome team and uh the kit actually uses their SDK to store the data so I'd highly recommend checking out lighthouse.storage um they also offer all kinds of cool functionality and documentation including uh an interesting feature called podside which in a nutshell lets you know if you have this big aggregated data stored on file coin is my data within that data normally you want to know but they provide a data proof so you can find what deal uh your data is actually stored in now for more generically you know we had biscuit dials an example uh Dao we have a data dial kit um that has all of the generic uh boilerplate pieces uh from like open Zeppelin you may need uh to build uh a data down um you know a lot less opinionated just kind of there with some basic examples and scripts you can look at um it was based on uh old colleague of mine uh Patrick Collins he had a has a great video on uh daus in general and explaining them I actually linked to that video in the readme so I'd highly suggest you know watching that video if you just want to know what all the contracts in the Dow do and learn a little bit more um yeah and so if you want any more fvm resources you can check out our link tree It'll point to the docs all of those kits I've uh mentioned um are Forums on GitHub where you can ask questions uh yeah so very Nifty link tree and uh I believe Sarah will be presenting a little bit more detail on these bounties at eight but we do have bounties for this hackathon so 20K out of bounties you see we have a grand prize and the pool prize and some interesting project ideas that we're looking for of course you know I've mentioned data dials and we've provided some resources for those um D5 projects so always welcome programmable storage markets I think this is something very unique and this is something you really can do on many other chains um Tools in front bridging always welcome and compute over data with Lily Pad you know bacula Lily Pad is that heavy compute framework I've mentioned several times um if you have questions about that I highly check out uh suggest you check out their documentation and their slack channels um but yeah these are some uh project ideas if uh you were still wondering so with that I believe I have five minutes for a q a so if anyone has any questions feel free to raise your hand and ask them now yeah we have one yeah so yes if we have uh interoperability with fvm and Cosmos VM right um Cosmos uses Cosmo as I'm at the base I believe so uh no right now um the only runtime we have is evm right so anything you write in solidity can be put there or anything like compiles CVM by code Viper as well but um not anything with Cosmos I believe directly I bought like I'm something like that system we don't have this prison done yeah if you if you use a bridge you can interoperate with Cosmos right uh and there is uh like I know axelar uh we work with the help bridge between like uh ethereum and um the file core in blockchain and yeah Bridges will allow you to do that and you can build any kind of bridge you want on a VM any other questions go on once going twice all right well if you do have any other questions later uh feel free to find me or any of my uh colleagues and the yellow vest at the falcorn booths we stick out like sore thumbs so shouldn't be too hard to find us and uh please feel free to Badger us with any questions you have we'd be happy to answer thanks for listening um and thanks Steve Global for um hosting this event I'm looking forward to seeing what y'all build so have a good night foreign

Automatic transcript — names and jargon may be misspelled.