Intro of Filecoin & IPFS with Longfei Wang

ETH Seoul 2022 · August 2022 · 31:24

Longfei Wang, a developer advocate for Filecoin and IPFS at Protocol Labs, gives a technical introduction for hackathon builders. They explain IPFS content addressing, content IDs, distributed hash tables and BitSwap, then how Filecoin adds storage deals, collateral and cryptographic proofs of replication and space-time for verifiable long-term storage. They survey tools such as NFT.Storage, Web3.Storage, Powergate, OrbitDB, Tableland and Ceramic, along with resources for building.

Speakers

Topics

From ETH Seoul 2022, hosted by Kryptoplanet.

Transcript

hey everyone uh it's very glad to be here and seeing so many people on hit this stage or the stage over there and very excited to be here talking with the developers or hackers about ipfs and found coin so my name is longfei and I work with political Labs as a developer advocate for Falcon and ipfs so today I'm gonna basically give a technical introduction about ipfs filecoin basically just trying to give enough knowledge and about how you're going to build application during the hackathon for on top of the ipfs and Falcon and so let's first talk about how everything gets started so as I mentioned earlier

that I work with protocol Labs so protocol lab is an R D team which is Building open source uh toolings and services for the web 3 services and the first protocol that we started building is ipfs it's back in 2014 2017. it's uh the peer-to-peer Network and uh to file sharing files over the distributed Network and then after that we start building the file coin on top of ipfs and it's a decentralized storage that we intended to store the valuable Humanity data on ipf filecoin because protocolab is more of the research and

development team so we need a filecoin foundation to push forward the Falcon community ecosystem growth and then on the marketing so that's all we're working together as the open source team for the ipfs and filecoin so uh the gender today I'm gonna focus on first to give a little bit introduction about uh what is filecoin and what is ipfs and because I know the hackathon is coming for the next couple days uh I'm gonna talk a little bit about what's the current use case of the our ecosystem and some of the possibilities and then the future plans for Falcon ipfs hopefully that will be some of the reference or inspiration for the hackers to know what you can build

on top of ipfs and file coin and obviously you need to know how to develop on top of it like what tools you can use and thanks for polygon thanks for graph that they already introduced some of the nft storage Webster storage and ceramic I mean that's great I like to see that all the projects are still building things together that's good you see and obviously I'm going to talk about them a little bit later as well and eventually like we have a lot of events a lot of hackers on going around globally so if you're interested and you can know more after uh you know about tooling or even after this hackathon all right first let's look at the ipfs so what is ipfs it's a we call it inter interplanetary file system so it's

basically a peer-to-peer Network that you can share and pass all the files across the we said interplanetary but like why we say it's in an interplanatory because originally we all believe that we want to build a network that uh it will work we'll upgrade the network that will work even when the web stretched across a global and that's what the team's vision and goes to build and in nature that ipfs is designed as a distributed which means you don't need a central server and you don't need to download your files download your website from sensor server so obviously it's going to be more resilient and there's no foil for anymore so in order to understand how ipfs work

and why ipfs is a decentralized so it's better to understand how to adding and getting a Content over the ipfs network so the process is different because on ipfs network we're basically obtaining and getting a content by the CID so which is a content-based retrieval and then some more of a resilient against what you can get is what exactly you want so the process is first you upload your content to the ipfs network and you obtain a unique ID which will call a Content ID and then you will publish all this information content along with the content ID over the network it will be stored into peers

DST table which we call distribute hash table in each peer and eventually when you're trying to download that data the HTT table is where you go to query how to get your content and where to get your content so obviously I've been talking about this pure idea a lot and it's actually I mean the content idea a lot it's an essential part of what we call content addressing and ipfs is uh is addressing your content by what it is instead of a way it is so if we think about like how we upload the content how we retrieve our content currently in the web 2 world so you will see first uh let's look at the if you if you're looking for the content on your computer locally you basically go to a certain path in your C

drive whatever the drive to look for the content it's basically where you're storing that content and it's the same thing for the web too like think about if you go to the website if you ask downloading some content obviously you go into the URL and that's where which server is storing content but uh you don't really know that you requested the content is the same as what it was it's doing before but with ipfs is different we basically accessing the content by what it is so you're passing the CID which is a unique identifier for the content and retrieving it you don't really care where it's a store but is distribution Network it could be stored in one or multiple node So eventually

you will get exactly what you ask for by the content ID so and then the content ID obviously is very important for Content addressing it's actually you can think of as a unique cryptographic hashed fingerprint for your content so because we say it's a fingerprint it's it's Unique and whenever you want to retrieve the content you can grab the original content and use the same cryptography hash function you will get exactly the CID as you uploaded before which means it's verifiable if you have original content and if you retrieve it using that CID you know and you can verify is this what I'm requesting for from ipfs Network

and also in the peer-to-peer Network the PA is the essential part of the network that for nodes to be able to discover each other to be able to share and then store the content across the network so all this achieving by adding the the different module to the peer so for example that it's uh because it's a peer-to-peer Network we have an essential part of lead P2P as part of the peer that handling the networking into the all the peers in the whole P2P Network and also I mentioned earlier that how to discover content and how to download content is actually uh achieved by the DHT table which is also part of the future of peer and eventually you

need to download the you need to download the content over the peer which is achieved by the bit swap protocol in the ipf sphere and then we're putting all this together in the RPF ipf so to achieve the distributed Network and I want to take a little bit of time to talk about DHT because it's very essential to store and to discover content over the ipfs network so DHT stands for distribute hash table and then it's actually essentially just a key value pair that's stored in each node or HP and you can associate it as a photo book then you can go and look at

how you can connect to certain people and then like uh what the the idea for that people the difference is in the distribution Network everybody every nodes maintain that DHT and uh that will be used whenever you want to download data so think about the I I said earlier it's a key value pair in the in the table and it's essentially just a peer ID and a Content ID so if you want to looking for a Content over the ipfs network you need to do two things first is you look into the DHT table and then find out who has so you're looking for the the content ID and you find out who has this content ID

and then you were looking for the DHC table and see how do I connect to the SP ID so essentially you know where you can find your data and how to connect to the peer to get your data so that's a very essential part of the content routing in the ipfs network and the way that we use ipf's Network now is very easy and but it's also very different you can basically choose to use ipfs according to your own needs so first you can run your own notes host all your content and then serve to your clients but you have to maintain the infrastructure you have to make sure that your ipfs node is keep running and then serving the content to your clients and also if you want to increase the

usability and increase the efficiency of the ipfs network you can run a ipfs cluster of nodes but also maintaining the infrastructure will be a little bit challenging for the team so for some of the team that you don't want to maintain the infrastructure you don't want to making sure that all the nodes are running then connecting well you can use the pinning service what is painting service is you can ping your file to the painting service of the ipfs node so the way make sure they serve your content over the network but uh it also means that you need to rely on those painting servers or otherwise you can just uh just throw the the content into the ipfs node and then hoping that

your content is super popular and then everybody accessing it so it's it will be expressed into the network and it's easy to retrieve and these are the options that you can use ipfs and but because I mentioned earlier that you if you you need to use all this or that but it's not essentially very uh verifiable or reliable but maybe we're wondering is there any other options like any alternatives that's more reliable and then verifiable and that's that's Falcon coming into the picture so Falcon is the the storage Network that were designed for web 3 and for for web 2. so essentially we built filecoin compatible with ipfs and so it will be

utilized the advantage of content addressing over the ipfs network and we're also integrating Falcon with a lot of the web 3 blockchains like ethereum polygon and near and we're also working with a lot of web 3 teams that you making Falcon ipfs available if you're building your application with any of the stack into the web 3 world and why is it different uh why is filecoin different as ipfs is adding another layer onto ipfs which is the crypto crypto economy incentive for the storage providers in the Falcon access to making sure that they're saving the content over the Falcon Network and then speed

verifiable and unreliable and we're also growing funnel coin massively because now we're almost reaching like 18 gigabit of a capacity across the network which is huge and that means we're ready for the massive adoption on the uh either web 2 word or web 3 words so why the how how it's different for Falcon and ipf has to store content because uh in order to provide the very very viability over the Falcon Network storing data on Falcon is a little bit different as ipfs so basically it's the storage clients are making storage deals with miners or storage providers

so the storage product has to make sure that they constantly saving the data constantly uh providing the verification for the clients so they will be ensure that data is safe and secure all those is achieved first by storage provider needs to stake certain file token which is filled as collateral so they can ensure to providing the verifiable and reliable storage and then also storage providers need to provide the proof the cryptographic proof that they are storing that unique content a copy of your data which we call a proof of the replication and also over time that storage products need to very uh to be able to provide that they have been

storing the content constantly over the time and so they submit the proof of space-time to change so all this proof of are going to be recorded and be able to verify it over the filecoin blockchain so I've spent a little bit of time talking about what ipfs and final coin is so ipfs essentially is a protocol a protocol to share your files and your data across the distributed Network and it could be work with any any distributed Network any any like storage Network obviously found coin is going to be the best match with using uh IPS and final coin so you can take advantage of with the faster retrieval over the ipfs and you also be able to use the advantage of a

long-term persistent and verifiability storage on the Falcon Network so by saying that I will highly recommend all the hackers developers if you're building during this hackathon use ipfs and filecoin together then you'll be able to take the full advantage of the features The Good the features from both protocols and I'm going to introduce some of the tools that you can use without actually touching the ipsa filecoin but be able to store your data over the two Network all right so next I'm going to go through a little bit of a ecosystem use case hopefully that's going to be some inspiration for the hackers to know what you can build over the filecoin ipfs

network let's look at the fixture first and then we have a growing fast ecosystem around ipfs and a lot of different uh projects are building on it for example the web hosting services and the nft and gaming versus metaverse and uh also some of the content creation I'll create over the ipfs network also filecoin network is also growing very strong and we have a lot of data set on boarded on filecoin either through the webs three applications or web to data set so for example in web 3 applications they don't like nft platform and content live streaming and music platform are built on filecoin and

then for the web 2 and there are a lot of the Enterprise company they're storing the large data set on filecoin and I will give a little bit instruction later on the slide so overall that's a file coin storage has been growing for web3 and the web 2 words I would just go through a pop-up of the use case for example that obviously nft and gaming matter of us are growing super strong over the filecoin ipfs network and we have a lot of application building on topic for example Mona is building a a Marketplace for the 3D artwork and Op games it's a gaming platform they're building The Gaming

Community to bring all the game Builders or game Gamers together so to explore more opportunity and a more interesting game mativers AI so they're using the AI technology to bring the VR and to bring all the metaverse together to the users and also obviously nft Marketplace and nft content creation as well as some of the NFD infrastructures or tools to make nft developers easy or all building on top of the ipfsfl coin and apart from nfts there are also a lot of other content uh creation platform they're storing the data on Falcon ipfs uh Hadoop zero one is one of the live

streaming conference that using ipsc Falcon and also a couple of the platform that uh like live streaming music and the sharing music sharing platform or also building on ipfs and Falcon also FM is showing the videos and everything on ipfs and falcon this order like use case that you can use to take the Falcon ipfs as the centralized storage also I mentioned earlier that not just web 3 but a lot of web 2 companies are storing the data on the filecoin network for the long term and safer verifiable storage and for example internet archive they are storing and backing up the data for the website public website and

documentations uh on filecoin so to be able to provide to the public access and then zawa is also storing their climate data on filecoin so it will provide it to the researchers to access and also the soil Foundation is storing the testimony data over the filecoin all these are data set and then we also have more more use case that I didn't put it on top of before example that uh we are working with New York City public data to store the data on backup the data on filecoin as well so all this uh example of web 2 of the user case or as well as we have the use case but apart from the use cases I want to also talk about some of the uh social goods initiatives that

from filecoin that I think is very very important because it's gonna essentially bring a huge impact into like web3 or maybe our society in general filecoin plus is the program that incentive uh the incentive that we're storing the valuable and on filecoin so here because filecoin is incentive a storage provider to verify to accept the valuable data sets for Humanity on filecoin so we give them 10 times of the possibility to claim rewards to get the block reward from from Falcon storage provided and also it has the the console to constantly verify and ensure that

your valuable data are storing on filecoin Plus and another very interesting and I'm proud program that I'm very excited about is falcoin green falcon green is the initiative that's trying to bring make a file coin a blockchain as carbon neutral maybe eventually carbon negative so uh Falcon green has this kind of a file coin energy dashboard that will display all the electro electric electricity consumption from other storage providers over the Falcon Network so we bring up the ball that make it transparent for all the storage provided all the miners in network about the electricity consumption and besides

that Falcon grain is also partnering with storage providers as well as the Renewable Energy company because we're trying to encourage the storage Provider from found coin network to use more of the renewable energy instead of electricity and everything so essentially Falcon grain program is trying to make file coin as a sustainable as possible and uh I also because we have a lot of hackers and develops here I also want to talk about what's coming next for filecoin and then essentially Falcon is building the foundation uh for decentralized internet we're achieving

that but we're making the full keeping components the first obviously is providing the verifiable storage and we have been doing that since the mainnet launch and I will reach into the 18 gigabit of storage which is already massive and then then the second is a retrieval here's the way the other team the team is trying to building and then providing the CDN quality retrieval Market over the network and currently we have a certain network is already launched the test net and I think a programmability over the filecoin is the is the most looking forward features that over filecoin and I will talk about next slides and eventually is the

computation of the filecoin and the team is working on that as well so this is the the most important part that filecoin team is keep building and working on so I was just focus on the fvm a little bit here because it's uh one of the most looking forward features on Falcon Network so essentially that fvm is going to bring the programmability to Falcon Network so either with the evm compatible smart contract development or native file coin smart contract system So eventually filecoin storage providers Falcon developers can build everything on top of the Falcon with storage with small contract with computations over

the data all this is going to become possible over the filecoin so the team behind the ALCO team uh is actually splitting the development process into different milestones and recently we released the first Milestone which will give the falcoin notes the ability to run our native actor which is small contract uh over the fvm and by the Q3 of this year the fvm will will bring the ability of writing the evm compatible smart contract and deploy into the Falcon Network and by the Q4 maybe early next year we will have the

ability to support both evm compatible small contract as well as native filecoin smart contract so I think those fvm is the most exciting things that happening in the Falcon ecosystem and all the partners all the ecosystem are looking for it so stay tuned and I think by Q3 you'll be able to try smart construct on filecoin all right uh I hope all those use case and all the initiatives that we're doing will give you guys enough information on how or what you can build on top of ipfs filecoin and if you need more Inspirations you can also check our website a hackathon website hackathon.falcoin.io to look at the

there's a part we call a hollow frame it's all the winners from the past hackathon and then you can get more Inspirations on what they are building and what's the whole ecosystem of building on Falcon and ipfs so we know what we can build I think it's time to look at how we can build on top of the ipfs filecoin now I'm going to talk about some of the toolings I think you probably already heard a lot for like NFD storage website storage and I'm going to cover it here so basically they are many ways to use ipfs filecoin for example you can directly communicate with ipfs node and as well as file coin notes but those will require you have a deeper knowledge

about ipfs filecoin and how to commute how do you communicate with them over the apis but there are also other options that you can use is a storage helper what we call Storage service storage help and the storage service will give you the ability to use ipfs and phone coin just over the single core to store your data on both Network so ipfs and you can get the faster and the flexible retrieval and using filecoin you will get long-term uh verifiable storage so I would highly recommend hackers or developers are building for this hackathon trying to get to know some of the storage helpers instead of going directly into filecoin ipfs nodes

so let's look at a couple of them at the first I will introduce is a Fleek hosting Fleet closing is a decentralized way to host your website so you can fully make your application your website code decentralized so you can think of as a CI CD tool and then it's super easy and the same point to use so if you deploy your website in the web keywords use Virtual and other platform you will be able to use a flick hosting very easily but the difference is flick hosts their website on ipfs so it's completely decentralized and then the process of using it is very similar as Verso basically you just connect to your your code and then add in some configurations

and eventually if you have any push that will deployed to ipfs immediately and then web3 storage I guess you guys already heard about web storage couple times and website storage is building on top of the both ipfs and filecoin and it's giving you the ability to use the decentralized service and it was very fast and then a very good UI ux as polygon mentioned that ux is very important so it's super easy to use and you basically just integrate either JavaScript library or go Library into application and then you'll be able to use the apis simple core like for example web3 storage dot store and putting your files in there it will

automatically store your file on ipfs and filecoin and if you are building an nft and nft storage is the best option to go it's the free service that you can use currently thanks to the filecoin plus program and it's also storing your content and your nft asset over the Falcon mpfs Network what is the difference as web 3 storage is it take care of all the Dirty Works to upload your content on ipfs and also creating the metadata compatible with your c721 or your seat 1155 so you will be able to use single core to go to upload your asset to ipfs and Fargo Network and getting your metadata which

you will store in the smart contract and and also nft storage uh provide the fast speed of a Gateway so then you retrieve your you you'll be able to use that gateway to retrieve your nft way faster than any other NFD gateways I mean and another ipfs gateways uh currently we have a lot of data a lot of nfts stored over nft storage already over 16 million and then they'll be nft storage are being used by a lot of projects like open if you mink to nft on openc all the data or the nft will save to ipfs Falcon automatically through the NFD storage and also like magic Eden and

a lot of the NFP platform like solar metaplex on Solano is also using nft storage to store the data so if you're building nft application you can look up on NFD storage and if you are developers that are looking for more flexibility more control over your notes uh of a ipfs selection or Falcon storage provider selection you can try power gate power gate is uh it's more developer friendly and then it's essentially a Docker image which bring the ipfs and Falcon node together but instead of wrapping around the service it also gave developers the options to configure the network for

example like which storage provider I want to use how many copy I want to store on PFS filecoin and when do I when do I want to renew my storage deals on filecoin all this can be configured through Power Gates but with NFD storage and Webster storage you're losing those uh flexibility because they will take care of you but if you're on more you want to have your own control of the storage deals and then storage over the ipfs power power gate is the option to go and apart from that we have other tools like ashtray is also building on top of ipfs found coin but it's meant for more meaningful data because they will verify your usage and making sure that you

store a meaningful meaningful data on ipfs filecoin so if you want to use a decentralized database you can go with the orbit DB orbit DB is a key pair key value pair database uh for a built on top of ipfs to provide the peer-to-peer decentralized database but if you're looking for more complex more structured and a relational database you can try with the table land tableland will provide we provide the relation on the highly structured database on ipfs in a file coin and also it's going to be used evm compatible layer 1 layer 2 smart contract to record everything and also ceramic that polygon also just

mentioned earlier that you can have a ID and a combination data if you are trying to use a ceramic and I think those are the tools that I want to introduce and I highly recommend all the hackers and developers to use uh to build on top of the ipfs of all coin during like a couple days of the hacker hacker Zone and if you want to keep learning or keep building after taxon we have uh you can check our slack or Discord and then go to the website of ipfs i o and the filecoin.io to look at that document and also have we also have a protocol school which will dive a little bit deeper on different knowledge like how the P2P work and how content

addressing how DHC table work and also if you want to learn more about nft we also have NFD School giving you basic information knowledge about nft and how to Mint NFC on different blockchain and if you want to keep building and you can look up at our website hackers on the filecoin.io we are sponsoring a lot of the hackathon Cross globally and now we are here with is so and at the same time we have like Infinity hackathon happening in Singapore and uh we just finished a great hackers always hack FS if you're interested in building with filecoin and ipfs definitely go check out the hackathon website and we have a lot of exciting events are coming up

all right thank you thank you very much I'm very glad to be here and hope you guys have a great building during Exxon thank you