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

Loading player…

FVM Intro: Build an AI Dataset Marketplace - HackFS 2024

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join Jenks Guo for a workshop titled, "FVM Intro: Build an AI Dataset Marketplace" This workshop is part of HackFS 2024, an async, online hackathon that takes place May 17 – June 7, 2024. ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Music] hello everyone and welcome to the hack FS 2024 filecoin Foundation Workshop fdm intro build an AI data set Marketplace joining us today is Jen squo who'll be taking us through this session and with that I'll passor Jinx get the session started hello hackers uh welcome to hackfest my name is JS I'm a developer advocate for Falin Foundation um here presenting the fcoin price tracks giving you a presentation on building on FM uh I do have apologies upfront uh I was supposed to finish a uh demo app um and present it here how I have done it uh but like many hackathons uh I've run into some issues with the new frontone framework nextjs um that is that is new to me so I didn't get to finish that uh however I do intend to complete that and uh during the hackathon duration and share the code with uh with hackers so everyone can learn from it um now without further Ado here's a little bit of intro of FM and FAL coins mission in general I want to start by talking about centralization of the web and why it's important uh to leading up to um the AI development and how fcoin can solve help solve this problem in this specific area uh the original design of the internet is not uh Central cized uh it is a group of connected network of computers um however uh over last uh kind of 10 years time uh we have seen centralization of content essentially uh being shared on the network so a bunch of companies that has a lot more content uh stored and uh because of that uh a lot of people sort of consume uh content and send content over to popular platforms and also CL Computing companies uh accumulate these resources together uh what has what it has done is actually reshaped the internet infrastructure uh so that um so that infrastructure is uh suitable for the consumption behavior and as more people use these platforms internet is designed more and more uh for uh centralized providers um to to break this um it's quite hard uh and with AI growing at a really high speed uh what we see is the rise of the importance of data um and uh with data centralizing in platforms uh we're seeing AI uh uh uh unavoidably uh facing this fade or going down the same path um when it comes to AI training and quality of data quality of AI uh data is very important um it researchers and developers know that it is important to track where the data came from uh know how it's sort uh and who can access them uh for what purposes and uh this uh all of this lead up to how AI models can leverage this data so the quality of the data uh will actually determine the quality of AI um so the expression of uh garbage in and garbage out perfectly describes this interplanetary file system is a peer-to-peer file system that is created by protocol Labs uh what it has done is it it intends to reverse the centralization progress uh of the internet that we observe today uh by making a peer-to-peer uh hyper media transfer protocol interplanetary file system and allow content addressed um schema uh and ways of routing information uh the the um the user ended up owning the content or the nodes that serves the network ended up the content and uh and allow uh the the content to be distributed um the important piece of technology is Content ID um on ipfs network uh there is no address based schema uh that encourage centralization so everyone's not looking at a single uh origin for their files instead anyone can host those files uh with their uh with with with indefinite copies of them and and they all work one with they all work as one because the content ID essentially uh essentially is the fingerprint of the file uh that is recognized um uh Network wide so putting a file on your computer or mine uh is essentially the same thing the network will be able to uh route the request retrieval request uh to the to the whoever is nearest um uh with the same file so this this provides Primitives to to sharing file but interplanetary file system uh does not really guarantee uh that your file is up it's based on um based on people's uh contribution of resources uh to keep fils up so to solve this problem file coin was created also by protocol apps um to encourage uh real infrastructure building um for decentralized network uh and specifically verifiable and uh content addressable uh storage system build on top of f uh on top of ipfs so you can think of fcoin network as a decentralized uh data centers or people with uh uh Hardware resources um to provide peer-to-peer uh peer-to-peer uh resources to to Consumers that might be in need the benefit of this is you can work with uh really uh local uh providers uh for providing uh the same uh services that you might get uh from centralized he for example this breaks the uh the Reliance on the uh centralized plans uh platforms um and uh and allow more transparency in uh where they data is stored who's storing them um and uh and uses cryptographic proofs to secure the uh file instead of relying uh trust off single entity there are over um 2,600 storage providers around the world uh across 40 different countries this is a map of it uh of some of the locations um not only there are infrastructure providers in Falcon ecosystem we also have a lot of developers and funders uh building on top of it um this hackathon is proof of part of it and we also have uh quite a bit of orbit ambassadors in different countries uh that are running and evangelizing uh the concept of decentralized storage and F coin in particular I had a Fortune of visiting some of the sites uh in in different parts of the world um and as you can see many of them opt to have a professional data center to host their their uh their bare metal infrastructure for a fcoin um it they are uh they are quite in in very secure locations in the world um and you can run them out of your garage but because of the requirements uh that we have put on the network and the Enterprise uh kind of service focused um it probably makes sense to put put it in a professional data center uh so someone could rent a rack or a few racks in a in a local data center purchase some Enterprise grade uh commercial um hardware and start running uh fall coin storage providing business on top of it it is designed this way uh so that you can use general computing equipments instead of uh specialized hardware for uh securing the network um it is truly a permissionless uh network uh with uh probably the hardware performance and also the amount of staking required as a as a barrier of Entry um but anyone can come and uh join network with enough collateral and um and Hardware commitment um and meeting the performance to get rewards and when you're done with it you can leave uh the network um as you wish so only if you have uh like a permissionless network that allows people come in and out and a vibrant economy uh to support it uh the network can last a lot longer um because we're we we intend to uh permanently store Humanities information and provide a more resilient uh system than centralized clouds the network has six 6.4 xaby of uh total starge power um uh there are 130 million nfts stored on F coins through a service nft do storage uh and we're onboarding datas on pedabytes per day um it is a it is a test of how um how much volume that uh Falco Network can handle and the uh the system is designed to onboard a really large amount of data if you would like to see some of the data sets uh we have a site that includes a example of some of these open data sets called data set Explorer uh in there I want to point out that there's a few ways to retrieve these these files um either VI boost classy or Lotus um fcoin did um did on board a lot of uh public data sets however to ensure the retrievability uh uh there there needs to be a lot of uh uh collaboration from different parties uh and this is a project done by uh d ENT based in Holland uh they're hosting some publicly available uh data sets for for you to to download um if you're working with uh data sets in this project and would like to get some sample uh this is a site to to get it from and there's a few ways to retrieve It ultimately what do customers pay for is Prov provability um of the storage uh for f um in a decentralized network uh it's important uh decentralized and open network is important to prove that the files is being stored by a trusted party and that party will not forfeit its uh its kind of agreement with the client uh how do you do that openly uh but also keeping things uh private as well um what we do this by uh providing asking the storage providers to provide Prov proofs to blockchain network uh so two kinds of proofs that we have on the network is proof of replication which means uh once a file is being uploaded to a stge server or stge provider it goes through a service it goes through a process called seiling uh which is SE sequential operation to generate encoding of the data uh for for each storage provider a replica of the uh of the client's content uh if proves it generates a a proof that it is uniquely stored with that storage provider uh and that the copy is exactly the same as what the client has uh has generated and this is using uh content ID system to ensure that the data did not mutate um on on on ongoing basis uh a proof of space time uh which is uh somewhat in between of proof of work and proof of uh storage um needs to be uh needs to be submitted by the star provider that holds that file and is fulfilling a starge deal um it is randomly selected uh challenge uh to read a piece of fragment of the data and it is compressed into a a proof using ZK snark and uploaded to the network uh once it's being uh verified by other uh nodes in the network then the reward is unlocked to the specific stge PR pridor for fulfilling a useful economic behavior so this is how uh we make sure uh openly uh make sure that client's data is securely stored on storage provider device so with this uh in mind um the and the importance of data um filecoin is unique Advantage for ML or AI uh um value proposition uh is that we can offer transparency uh so who is storing what data uh Provence which means um which means who is securely uh who is able to prove that uh the data is securely stored uh and and that person is uniquely holding the data that is authentication um of the data um fcoin does have a scale to handle a large amount of data because we're talking about quite a bit of data when it comes to AI training uh and also running uh running AI networks or inference of of models um as these models quite often requires to recalibrate recalibrate and self uh self-learn so for example a self-driving car can generate uh about 1.4 terabytes of data every hour and they all need to go somewhere um the uh we can provide the Trust In proof of store by by using proof of storage and with more data points uh with more sites to choose uh to store from uh we can provide more resilience to to the data so introducing fcoin virtual machine uh the fcoin network was made for making storage deals and storing things like uh proof of storage and allow uh people to transact um it is not uh initially made for General programming however fcoin virtual machine um delivered last April uh gives uh developers ability to program on chain uh you can think of it as the layer one uh of uh Falco uh we call fcoin layer zero before uh it it really uh so to be able to write something that is able to uh programmatically interact with for example an account uh or or the storage Market uh it is now as simple as deploying a solidity contract to uh Eva enabled a fcoin virtual machine and we hope that on top of that layer twos can be created uh to solve different kind of solutions so for example um lending and leasing uh of fcoin uh really helped to fill the storage providers initial Capital problem and allow uh token holders uh to provide this kind of funding to storage providers to to expand the network how files are stored on filecoin uh specifically so there are St providers uh that in general runs a interface to the to the market called boost uh boost is a is a piece of software that allows uh using UI or uh some kind of automation to accept deals or reject deals um the star provider is completely in control of this process uh What uh tradition additionally to make a file uh file storage deal the client needs to first put a put some funds in a escrow account in the um in the storage Market actor uh on the Chain uh and then uh packages file to a car file which is a bundle of a Content addressable uh file that allows easy retrieval as well uh the then the client needs to send the St deal proposal uh to uh to the Network which is picked up by Boost now boost checks the the client has enough funds to pay for the storing files and accept the deal um and then downloads the car file from the client's web server uh client needs to make that uh make that available and download uh over the wire or physically transfer to the stor location if there large amount of data um then then we have a storage deal and the deal then gets published by the storage Provider by boost and then uh upon checking by the network they will unlock rewards for that uh if they do a good job they get keep getting the rewards if they did a bad job keeping the files or go offline uh then there is heavy slashing mechanism uh to make sure they um make sure they get hurt uh for doing uh bad behavior in the economy where FM comes in is FM makes automates the deal making process um the file file package package the uh the client still has to package the data to car file upload web hosting server but FM using uh using a deal client uh solity Library a solity contract that uh the FM team has made uh automates large parts of it all you have to do is uh to make a uh to package the file to car and then put in the parameters that you want for the deal uh which includes like how many copies do you want and do you would you like to send it to specific start provider for that uh so a lot of people has has has high expectation of what FM can do uh but really essentially what FM the core part of it is to is to automate this this part uh and then of course run evm on um on fcoin chain would like to introduce you some uh developer tooling so um one of the thing that uh that you can use in your um like hackers and developers are generally in a rush uh to get their project done um and here are some handy tools to to interface with file Queen really easily what I have just described of manual way of making a deal and also using FM to uh make a storage deal could take a lot of effort however Lighthouse and web stre storage makes the onramp of data really easily you can upload your file uh to them uh uh via API or their sdks um and then they will take care of the deal making process for you behind the scenes now with Lighthouse they also made FM deal making apis and sdks H so that it turns the interaction with FM um FM actors uh Market Market actors into single API service now doing this also means that you're uh Bound by these centralized Services as as gateways to access filecoin but it is very convenient for f for a haakon project um if you would like to do some Innovation on top of FM directly uh there are solidity fcoin solidity library that you can use with different Primitives that you can uh you can use now I highly recommend uh to check out some of the examples that my colleagues have made on FM for a fundry and Har hat uh to reduce your development effort for cost and Oracle um we have following uh Partners uh that has solutions for uh cellot and exela uh offers uh AC cross chain uh essentially uh wrapped coins for uh wrapped assets for for file coin uh there are few quite available so um so you don't have to make them uh and uh both of them are uh both of them supports testet uh testing uh we also have teller that is providing Oracle services and also supports FAL Queen testet there's a video that Matt has made to uh to show people how that's done on FM and a lot of uh database is always a uh a a like a very hard thing to to work with uh building an application uh most of the web developers try to avoid using uh centralized databases um but uh because like sometimes putting putting information on chain is very expensive or or very hard to do so um so sometimes you need to rely on databases these are two decentralized version of uh databases that you can rely on uh for a table land they have offchain relational database but uses uh smart contract uh to create these databases uh and you can use it for Access Control and uh and you can even transfer the ownership of the of a table it's quite innovative and for uh decentralized peer-to-peer database I recommend orbit DB so I did I did not finish the coding for for the for this tutorial but uh I will do uh but for now I'll share how I would like to build it um so um the data marketplaces uh which is essentially just uh listing all of the datas their uh metad datas uh off it uh and put it on the marketplace for people to purchase um I I think a lot of people had the idea of putting valuable data sets on a Marketplace uh like what o ocean protocol does uh and then have a onetime purchase of these data while that might work s simply uh but I think a lot of clients uh or people who owns the data do not want to just get people to download this data because once it's been sold um you don't know where uh it's going to be but a simple version could be that you use a front end uh to collect the display the deal listing uh the data set listing information um potentially put it into a centralized database or uh table end or orb and use the storage on ramp to on on onboard the data that uh data owner has uh within the uh star Dr ramp or you can use aert party for it you can keep the encryption uh key off the file uh the CID and have some kind of access control over it uh then the data will be made available on ipfs uh and filecoin star provider uh through the help of FM uh when it's up to retrieval it will be coming from ipfs or you can use uh fall coins uh tools uh to retrieve it uh alternatively you can also keep the data stored uh and encrypted on ipfs but use a compute Network to sell the usage of uh of running queries uh on these data uh so it might not be as private as uh trusted Computing or FHA uh but this is a way to kind of keep the uh the uh file origin separate from um uh from the client from the data consumers uh so perhaps what it looks like is the data gets uploaded and stored on PFS and the encryption key uh and CID gets shared with the compu provider when a data consumer comes with a certain query for example I want to know how many uh people with this disease is in the city uh they can write queries based on the meta data provided by the um by the data set owner uh and then uh have that executed on the dentalized computer network such as leab or call and then uh put the re uh output the uh result to back to the data consumer oh finally I would like to explain uh the price structure really quickly so for this time we have three grand prices uh for first place and second place and third place you can use any type of uh fcoin technology uh but we do have a minimum requirements of uploading data to at least data onramp services uh or interacting with some of our core technology such as the node technology FM or IPC um IPC is valid for for Falen prices as well um so uh we do have we do want to encourage specific categories of prices uh one of them being building daps data deps uh specifically uh any kind of decentralized applications that helps data on boarding so building uh a version of Lighthouse is perfectly perfectly fine uh and we need more of those uh facing specific verticals or use cases um the second one is a stable coin payments for paid storage deals uh this is because uh there we see a demand from Storage providers to not only uh from fulfilling their service but they also want to receive stable payments stable coin payments there and that has been the challenge uh on on on filecoin so we hope to see some good ideas on solving this uh and also so we not only uh solving this technically but uh we are expecting a kind of viable business plan for for this as well so think about how you're going to adopt this tool um of course any AI related tools uh we will highly encourage this fits in F coin narrative right now very well H and also uh if you're a ZK developer zkp developer um feel free to combine uh zero knowledge proofs or privacy related tools uh with fcoin so that's all of my presentation um I do have uh some files to share uh sorry some some sites that I can share with you uh so for example this is the convenient uh kind of a API that um that Lighthouse has made for making a storage deal uh if you don't want the control of where how many copies and which star provider you want to send to uh you can just use up load which they will take care of the rest uh otherwise if you would like to specify like for example number of copies uh or in the test net specify a minor uh ID uh you can do that o over there and I really highly recommend the FM local net um example here that is made by uh by and exactly how how fcoin storage takes a deal and how that how that process goes through um for preparing the metadata for making a deal uh you can use uh uh you can use liouse storages um a data prepper tool called uh data Depot uh once you upload a file you will uh you will get all of the different different parameters really easily uh for your smart contract uh which is required for the deal client now there is an issue with deal client right now uh that I'm trying to solve which is when you're trying to deploy to calibration net um it it seems that all the RPC and points returns an arrow to use I'm investigating that and trying to get that solved but if you use H really easily interact with it through either Foundry or hard hat so yeah that's any questions uh that's all I'm going to show yeah there were a few questions um

Automatic transcript — names and jargon may be misspelled.