[ETH Seoul 2023] FVM - The New possibilities on Filecoin by Sarah Thiam
ETH Seoul 2023 · June 2023 · 23:30
Sarah Thiam, a developer advocate for the Filecoin Virtual Machine, explains the building blocks of decentralised storage for hackathon builders. The talk separates IPFS and its content identifiers from the Filecoin storage network and its deal lifecycle, then introduces the FVM, launched in March 2023, which adds programmability and lets smart contracts work with storage deal data. It points to practical options such as deal aggregators, direct deal contracts, a starter kit and simple storage libraries.
Speakers
Topics
From ETH Seoul 2023, hosted by Kryptoplanet.
Transcript
foreign [Music] [Music] that's about it that's all the Korean I know um and I'll be presenting in English but it's really nice to meet all of you um sorry I don't have like Korean subtitles for my presentation but I hope that it's still good for everyone today cool so I'll be talking about new possibilities on Falcon I'll cover some technology that some of you might be familiar with things like ipfs filecoin that has been around for a while and then I will cover for the Falcon Virtual
Machine which is something we just launched two months ago so a little bit about me nice to meet all of you I am Sarah I'm from a developer advocate for the Falcon Virtual Machine team so we are very focused on enabling applications to be built on the storage on the Falcon Network we're currently in the midst of building a lot of different tutorials new features new documentation that has come up in the past week or so so really in the middle of it and we will be present at a lot of different hackathons as some of you might have already participated in so cool let's get into it foreign
how many of you have used um just a show of hands how many of you have used filecoin before okay how many of you have used ipfs before awesome okay yeah I know ipf is awesome I love it and how many of you have used the Falcon Virtual Machine before okay not bad for two months one month each great okay um so today I'll kind of cover the things that I know it's a two-day hackathon and we have a lot of recordings online that go deep into it I have about 25 minutes now so I want to focus on what you can use during this hackathon and how you can get your project built today right in these two days to go ahead
so I'll talk a little bit about your different options for storage and I'll do an introduction you'll understand the concepts Behind these three different buckets of technology and then I'll do like a quick guide on what would be the best option for you to use in your hackathon project and then introduce some quick resources that you can use um straight away out of this like starter kits apis and so on so let's make it super easy for all of you to hack okay I'll start off with ipfs and it's good to know that a lot of people here are familiar with it or have used it in some way um for those of you who are new to this ipfs is a peer-to-peer Network ipfs and filecoin are separate and this is a common question that we get so to clarify it is separate from falcoin it
is not a blockchain as well it is a peer-to-peer Network the best way that I put it across the people is that it's kind of like torrenting but it's legal so that's what ipfs is what you can do is you can store your data you can use your own node or you can use other people's note um to keep your data there um so one really cool thing is about ipfs and this is how we are different from a lot of file systems out there is that we don't focus on where your data is stored as a location point for you to access your data instead we focus on the data itself so we provide content identifiers content IDs for the data that you want to upload to the system and so every single piece of data no
matter where it sits in the world is something that you can identify just by the ID so even if like computer a that you initially started on or server a that you initially started on is no longer storing your data it could very easily you know be passed on to server B and you can still find your data over there you wouldn't have to rely on server a like disappearing one day and you can't find your data after that so um content IDs are how we we find restore your data and that's how you can recognize it one really cool thing over here is that we are in the middle of implementing a node that also sits in space so this even proves the point that it doesn't really matter where your data sits but we make it the easiest way for you to find your data so if the
satellite with the note in the future is like going across your location or going across Seoul and it's faster for you to access the data from there it could also ping off that node to get your data even faster so we're experimenting with a lot of these things and we're trying to bring data faster to people than it is today so truly truly decentralized all the way to space and that is why it's called the interplanetary file system so a little bit about content identifiers I'm going to kind of get into how it works so what you would do first is you will obtain the content ID for your data and then you would then put it onto the ipfs network this can be either again running your own node or you can be using other people's note and then you can use a
data hash table to identify the CID that pertains to your data when data is stored on the on ipfs it is actually broken up into a Merkel tree deck so that's immutable so if you change any part of your data the root hash the the root hash of your Moco tree deck will actually change as well so any data that you start if there are changes to it you would know based on the ID that you're trying to to check it with right so that allows you to know like if there's any changes to your data and it keeps your data more secure okay so they kind of talked a little bit about this about IDs itself this is just kind of the difference between how it sits between a computer to web 2 and then to ipfs itself and um I also talked a little bit about
this around how the CID works but we won't be getting too much into it it will actually be one of the underlying Technologies for us a very easy way to integrate this into your application so I won't get too deep into this but of course if you want we have documentations on this and you can go read out more about it okay and as I mentioned um so where you'll probably be using something that will relate to ipfs is around the step number two over here um so on top of Step number two there are actually services today that run notes and help to pin your content when we pin your content what it allows you to do is to retrieve the data really quickly we have platforms that are built on top of it like web3. storage nft.storage if you use any of those
platforms so those actually have sdks and apis that make it really easy for you to integrate in your application so just to give you a sense of what it is like what the back end is to the the application that you'll be using um this is where it will sit on step number two over here okay so that's ipfs as a whole now we'll get into the filecoin which is separate so the difference between Falcon and ipfs is that Falcon is a blockchain um what we realize with ipfs is that you can store your data today but it doesn't guarantee that your data is stored forever so for example um if the note shuts down or you know they're not incentivized to keep it going you might lose your data so we have we created the Falcon Marketplace
um kind of like a storage Marketplace on top of that and it incentivizes a whole decentralized network of storage providers so we have storage providers there are some in Korea there are a lot in China there are also a lot in the US that set up these Hardwares on their own or they choose how they want to store the data and then they are incentivized through like a smart contract just to store your data for you for the amount of time that you want to pay them for um and then once the deal ends you can choose to renew it or then your data gets dropped but this guarantees that your data will be stored as long as you pay for it um so that's what the Falcon network does and we have a protocol there and this is a layer zero protocol so this is the anatomy of a file coin
storage deal um what will happen over here and this is kind of good to know but you don't actually have to use it in your application in your hackathon project but it's good to know especially if you want to see which parts you want to focus in on or build tools or applications around so first step will be always to do a storage deal proposal um that this this part is cool to know and I'll explain it later because when I talk about the Falcon Virtual Machine I will show you how this process gets a lot more automated with that new launch of the Falcon Virtual Machine so you will do a storage deal proposal this would be using this is how long I want to store my data this is the CID of the data that I've prepared again the data does not necessarily have to be pinned
to ipfs but you will have to transform it into a DOT car file format for it to be stored for it to be referred to in the deal proposal so you would set all your parameters of how you want to store your data you would propose it through the network over here in Step number two when your Storage storage provider accepts the deal they'll make the deal for you and put it onto the Falcon Network and then they will continue to prove it over time which is we call it the proof of space time they will have to prove that your data exists and your data exists the same way that it was uploaded so it's the same piece of data and then lastly the deal renewal will come over here so if the deal drops or the deal has ended this is when you can as a client decide
whether you want to renew your deal or not so pretty complicated right um we're making it a lot more easy with the Falcon Virtual Machine I'll and I'll talk about that in a bit so over here I'm talking about what the steps that we have as a falcon Network like where are we headed in the roadmap that we have we're talking about scalable data storage so we've invested a lot of time for the past seven years building up the decentralized storage Network now we are focused very much on data onboarding onboarding using usable and quality data onto the committed capacity that we have on the network so we have one of the largest community capacities right now I think it's about say 300 expabytes but it's a huge amount of committed capacity and we're slowly
onboarding a lot more data onto that and then lastly we're thinking about making data useful so in this sense we're talking about creating applications on top of the data that you have and I'll address that in the Falcon Virtual Machine part data on but this is how you think of this is this is useful to know like what the roadmap for filecoin is so um as I was talking about this is exactly where the FM comes into it and this is where things get exciting so we launched this about two months ago I think two and a half I don't know time flies we launched it on March 14th um which is actually Pi Day 314 um we launched a falcoin virtual machine and what it does is to add programmability to the Falcon Network
um what we what we foresee is that um if you think about web 2 today you have servers you have data and then you are able to create applications on top of that so we want to be able to do the same thing and we don't want to just be a storage Network so that's why we created the Falcon Virtual Machine so that you are able to compute the metadata of the storage deals you know remember how we talked about the storage dual cycle earlier on so all the storage deals that are stored on the Falcon Network have like metadata attached to them right when your storage is taught until what the data is about how large the site how large the size is and so on um the Falcon Virtual Machine is then able to compute the metadata on chain for you so that allows you to create
applications that are storage focused and you can manipulate or write custom logic to how you want to store your data how long you want that data to be stored do you want to send it to a decentral lies computation framework to compute the result and then send it back to the smart contract and so on so these are all the possibilities with the Falcon Virtual Machine a little bit about this and to focus in on where we are this is the architecture of the Falcon Virtual Machine some of you might have seen this before the Falcon Virtual Machine was created to be an instance that is VM agnostic but I know all of you were at e-store today the first virtual machine instance the first foreign runtime that we wanted
to focus on was the ethereum foreign runtime of course because the evm community is huge and we want to be able to provide that storage capability to the ethereum community so we focus very much on providing full evm compatibility so if you're a solidity developer all your different tools with like metamask Foundry hard hat so on will be compatible with the fem you will be using the tools as you are used to the only difference is that you're deploying to a different test net So eventually you will be deploying to the Falcon Network so you can still you know use all those and we're working on panel Integrations right now like things like tellers and as an oracle Excellence equestrian Bridge all these different things that you can use in that developers are familiar with so that you
have a very rich development environment that you are able to deploy to the Falcon Network I do get the question as well a lot on why use fvm and not evm so the difference here is that you are really being able to do everything in a native environment of course the impact here is not so much when you're developing it it's more so when you deploy your application and you're actually implementing it so you'll see a lot of differences in like a significant reduction in costs especially to do with storage so rather than writing in the evm contract and writing to a storage platform separately where you're paying those fees you could use it within the same environment and so your costs go down a lot performance wise is also much better I can go into a deeper analysis there but generally performance would be
much better using everything in a native environment and so that's the main difference that you get with using the ethereum the the evm compatible fvm that we have today so um as I mentioned a really cool part um today like before we had the fvm people couldn't really do much with the storage You Could Only Store it and then retrieve it on the Falcon network but today you are able to interact with the Falcon protocol itself so this is allowing you to go in and write like your own actors which are the equivalent of smart contracts on the Falcon Network um the way that we do this today especially for evm ethereum hackers is that we have the falcon.celesd library so this would be one of the tools that you can use in your projects to call the different methods that are you know
using in in a solidity contract but then calling methods on the Falcon Network that you would use like usually with filecoin so in the you know if you're using if you're used to filecoin and using like Lotus go and you're used to those methods on the filecoin protocol you can actually use it and call it from your solidity contract as well so things like for example checking the balance on my contract uh checking the balance on my storage deal uh checking how whether the miner has accepted my deal how long is it being stopped for all these things you can call today from the solidity contract itself and not having to go into the Falcon protocol and learn a whole new set of tools to be able to do that yeah so just a little bit of an example here
um yeah it's super easy we have some resources we have a starter kit you can just import that and then start using the methods yourself so I did show you this storage deal flow earlier on so now with fbm the things that we are anticipating is that you will be able to write custom logic a lot of the deal flow today again this is if you choose to write an application that automates the storage deal that or automates or improves the programmable storage Market there are a lot of things that you can do with fvm and I'll talk about that in a bit but one of the things you can do is to enhance the programmable storage market so you could automate a lot of these things especially to do with storage and retrievals you could also decide if you want a certain event to
then trigger off the Storage to be stored automatically for your application and a lot of cool stuff like that so that's kind of how we see the fvm coming in and enhancing the Falcon Network so um we have a fully either a fully feature complete Json RPC ethereum Json RPC API that we use for fevm so again all the tools that you are familiar with we have versions of it or if you're using metamask you should be able to enter your ethereum address connect to our test net get our tests fill in to your Ox address so it's pretty seamless at this point and you should be able to use the tools that you are super familiar with
um we also have things like we have a hard hat starter kit we have a Foundry starter kit for fvms the things that these are things that you can form and use we also have explorers today that maybe if you're a falcon user you might have used the Phil Fox Explorer or um the glyph Explorer but today you can actually check on your transactions via the via the evm compatible fvm as well I would say it's almost at etherscan parity where there's a roadmap but we're going to get there pretty soon so yeah if you're looking for ideas on what you can build um one example that I think is really cool is the data dials over here I think I've maybe I've talked to some of you at the booth about it but the idea of a
data dial and what you can build so these are these are all examples of layer two solutions that you can build with the fvm on the Falcon Network um one of the really cool examples and I would say play to your strengths play to the storage capabilities of Falcon data dials is something where you have a dial and your dial is focused on a very important data set so for example if it's like users credit card data for example you could have you could write a data dial where you have maybe um you are able to collect all these different users credit card data into a single data set and then you are able to use the fvm to write Access Control onto that data set and then only allow third parties to pay for access to your credit
card data and then contribute or attribute the the profits back to the user themselves so rather than your credit card data being taken by marketing companies and you don't get control over it you could then pull it into a data dial using fvm get it stored make sure that data is continually renewed via the treasury via like automatic renewal of the data set itself and then have that and then be able to earn profits directly to the user just off of that data itself there are also different use cases that may be decentralized signs so if you want to upload a bunch of research papers into a data dial send some of that send some of those information out to a computation job to train an AI model for example and then return it back to the dial to get
those results these are also things that you can do but there's a lot that you can do with data dials itself so really really cool use case over there we're really looking out for more projects in the data allow space there is also this resource list over here so if you're interested in more ideas on how you can build your startups or your projects with fvm there's a whole bunch of ideas over here that we've written out some descriptions for okay so a quick recap of what we covered so far and then I'll head straight into the resources that you can use we have ipfs which is storing data on a P2P Network we have filecoin which is storing data on a on the blockchain your data deals on your storage deals on the blockchain itself and then we have
Falcon Virtual Machine which enables you to build applications with the storage on the Falcon Network and then of course if you've seen the Corgi biscuit before this is the name of a Corgi that likes small coins so it's one of our mascots so what to use for a hackathon so we've built this I would say I want to say simple but I realize it's actually not that simple um but if you have time and you go through the flowchat you should be able to figure out what's the recommended path for you to use because you might be thinking should I use ipfs should I use Falcon should I use fvm there's so many options which one should I use um this flowchart kind of takes you through if you let's say you want storage within your hackathon project think about whether you want programmatic storage
which is automated and you can write custom logic or do you want non-programmatic storage which is just a simple storage itself depending on that and depending on the size of the data that you want to store there are different options that you can use so I would say the most easy for most people is simple storage which is on the right side non-programmatic storage it stores any size of data there are a lot of storage on Rams that we have so if you've heard of nit dot storage web t storage Falcon data tools these are all um platforms that have done all the work that I mentioned to you earlier on in describing the whole data deal flow putting into a platform and then giving you a really easy API to use so most of these would be JS libraries you can use
it integrate it into your application um wait I will go through these in the next few slides before I get too deep into it but if you're thinking of using programmatic storage which is more automated and you kind of want to get into the details you want to write it yourself um think about the size of storage that you want to size of data that you your solution will be storing if it is below 4 GB which is the recommended size for storage providers to pick up a piece of data you might want to use um something of a deal aggregation that takes small piece of data like let's say it's like KBS or MBS and then it pulls it together into a larger deal set itself and then makes a deal for you or if you want to have a larger piece of data like 4GB if it's a huge data set
you can just make the deal directly yourself which is faster in its own way and you get a lot more control over the process there oh and also um this is a hackathon cheat sheet if you want to go in there it takes you through this flow and it gives you all the links that you need for starting your application based on this slow chat okay so I talked about Resource number one which was do aggregation for small deals this is one really good option it's called lighthouse.storage This is on the hackathon cheat sheet you can check it out it is a very simple aggregator to use I was going to click into it but I also don't have my laptop connected right now into a browser window but if you go to
lighthouse.storage you can visit the documentation they have an SDK ready to go you can import the library and start using commands to upload your data and super easy to use what it'll do for you on the back end is to collect all these small pieces of data put it together and then set up a deal on the Falcon Network for you if you have a larger piece of data and you want to do direct deal making we have a custom contract that is already written out for you you can Fork it and start to customize it yourself it is called the client contract this will all be within the GitHub repo over here for fvm deal making starter kit this is also within the hackathon cheat sheet that I shared earlier on um and I'll share it again at the end so you can always fault the repo and start
creating your own custom client contract again both the first and second option will deploy to our test net so yeah even though you are using ethereum tools you will be deploying to the filecoin test net and not the like an ethereum another chain itself and then lastly I think this one would be super simple I've skipped form three and four only because those are a little bit more specific but again they are in the cheat sheet and you can access them if you need but here is Resource number five which is for simple storage so if you just want to store like the simplest pieces of data it's not the storage is not the main focus of your application you can use nft.storage or web3. storage they have Js libraries that you can use to include within your project
okay cool and um I wasn't able to click into my browsers but there are a bunch of links over here um I would recommend the one on the left which has resources to the cheat sheet as well that I shared earlier on as well as other tutorials and documentation for the Falcon Virtual Machine again that is really where you can start to build your applications and then on the right side if you want to join our telegram group to get connected with other folks in Seoul you can join the link over there cool yeah thank you so much foreign [Music]
Related talks
- Filecoin Storage for Building Resilient Applications
- Space Warp Summit 🛸 The FVM Imaginarium Part 2: Early Builders on FVM
- A brief history of nearly everything IPFS & Filecoin - Ally Haire
- The Moat Is Where Your Data Lives
- HackFS Summit 🚀 FVM: What, why, what next? - Sarah Thiam
- Filecoin’s Launched: Understanding Cryptocurrency’s Newest Network
- Bridging with Filecoin - New Frontiers in Web3 | ZX Zhang
- 🎤 The Future of Filecoin
- The State of Filecoin
