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

Loading player…

Lighthouse Storage 🛠 Perpetual Storage and building token gated applications - Nandit Mehra

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Nandit Mehra from Lighthouse for a workshop titled "Perpetual Storage and building token gated applications". Hack the future of Filecoin! The launch of the Filecoin Virtual Machine is almost here. Come celebrate this momentous occasion and launch your first FVM application alongside hundreds of developers worldwide. Complete with talks and workshops from ecosystem leaders like Filecoin founder Juan Benet, get ready to explore the frontier of web3 and win over $150,000+ in prizes. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Applause] [Music] we have Manda here from Lighthouse who will be doing a workshop on Perpetual storage and building token aided applications if you have any questions they can go into the zoom chat and it will be more than happy to answer them and with that being said I'll pass the mic off demanded awesome thank you so hey everyone uh welcome to Lighthouse so today I'll give a session on what lighthouses and what do we mean by Perpetual storage and how you can like store your data on Lighthouse and build token getted applications using the lighthouse SDK so if you have any questions I mean why just drop in the chat happy to answer them all so we'll just go through basic overview and then even show you a live demo as well and yeah like George Orwell once famously said that who controls the past controls the future and who controls the present controls the past again like referencing to the issue of information control and manipulation can in the past we have seen like Liberties being burned down and Scholars being buried like most famously like Library of Alexandria was destroyed in India there was like very famous university which got vanished and most recently Iraq National Library got bombarded so the point being in data physically has not or totally secured it is it can be destroyed due to various reasons although most people might think that data on like digitally on the Internet is secure but also that's not the case uh in there too the data is also transit in it faces two key problems of Link lot which refers to like broken links as it was seen that around 25 percent of links in the New York Times article do not even point to the uh original content and the second thing is content drift uh this again refers to the issue of content manipulation data laws or let's say DNS changes how pointing like aside to Korean liquor manipulated or a different content which was previously meant to be and in web3 again we see like this problem still persist with your files uh web3 we have seen like there have been like a user owned up concept and we are creating experiences and nfts in which user owned their data uh but the problem again has like the records and transactions of all of these uh data has like permanent conjun ethereum but the files are not and hence we saw recently with FTX has when the centralized platform got down or nft or the FTX nfts eventually went broke and also in on opencv we realized that many nfts due to their centralized uh Quantum failure do not even uh point to like the original link and in many cases like this case it says like not found so that's why we thought okay let's build Lighthouse can we identified like there has to be you know 40 properties on the storage near side or to make it like work for all kind of use cases first is persistence so with Lighthouse or when you store data we store it on ipfs and file coin and ensure minimum replications of your files and that your files are stored long down forever so let's say rather than renewing your filecoin deals you can pay once and need not a new deal again and again so permanent stoneage on filecoin and underlying there is this endowment pool model that pays for your file still perpetuity and the second thing is like a lot of results or demanded us like envisor like private data on ipfs or file continues and your SDK so then we even built this uh this feature into the light of SDK where you can not just store even private data but even token get your resources and files which I'll also demo today and third thing is again did this property then we hit inherited from using ipfs and filecon underneath which is like being tamper-proof and distributed so Falcon has a big minor Network and has like around 18 exabytes of data capacity onboarded so which again allows us to you know serve like big scale data as well and uh like distribute your data on a bunch of Miners and the fourth thing is again many people complain that distributed storage systems are like quite slow so we even have like dedicated gateways used in which you can like store and retrieve back all kinds of files be it image video you can even like stream 4K video out of it so it's like quite fast and yeah as I was talking about uh underneath lighthouse we have the smart contract based growth endorment pool as we call it which shows data files are structured perpetuity and heads like multi-chain and it's controlled by a Dao and uh when you pay for a file in some part of it goes to the file coin Miner and remaining part goes to this endowment pool where it accrues fees through various protocols and yeah as of now Lighthouse suit contains uh three things one is our CLI tool our next is our SDK which I would highly recommend using in your hackathon projects uh which is like this npm package that you can either import on your website or front-end click react view or whichever framework that you like and other things like backend in node.js as well and third thing is if again our website which is Lighthouse Road storage and I'll also demonstrate our Lighthouse files app right now so yeah this is our main site and the URL is lighthouse.storage so you can as for starters you can come here and click on the store files Now button and then you can log in into like whichever login method that you prefer like through metamask if you prefer any other chain or Google GitHub email login as well so we also support like fileco and wallaby as a test Network so given like this is a Fame hackathon so I'd highly recommend you to uh connect to wallaby and build applications around it yeah but you can easily log in through your metamask wallet and view all the files that has been uploaded so if you want to upload like a public file uh let's say this find that again like the upload is quite fast and all of these socialities that I'm showing you you can do these from our SDK as well so this is like just as a demo purpose that what all functionalities you can do with Lighthouse and let's say if you want to upload a encrypted file you can turn on the encryption and um let's select one of these files and again for this encryption you need to sign in from your wallet to authorize and then you can view this or connect to your wallet sign again and then you should be able to view this file which how you just uploaded and if you try to download it from the ipfs network or you will be able to but then that will be encrypted file and only the authorized persons can view this file after signing from their own it but that's not just it you can even do like more things with it so since it's a encrypted file you will see like there's a blue button here called as apply access control so if I click on here I can add a condition and I can add a condition like let's say if you are on wannabe which is like the file coin test Network and if you want only the orders of a particular nft collection to view this particular file so you can select whichever token that you want to have the logic on let's say ERC 721 which is on the nft token and then you can mention the contact address here and let's say I want only the one users who have have more than or equal to three of these nfts on wallaby chain to access this file I can mention uh more than equal to 3 and then create excess condition and I can also create you know multiple uh conditions as well so let's say three tokens nft tokens on wannabe chain but a thousand per key Universal app tokens on uh polygons given like that can be done like cross load chain logic can be built around it so I can then put in like let's say if this is the uni swap token address then create access condition and then I can create like a combination of these conditions as well like C1 and C2 so now what it means is like the user in their wallet has to satisfy both of these conditions and only then they will be able to view this file and then you can create access condition and then again authorized on your wallet and then if I now share this file link to whoever I want to when if they satisfy those two conditions in their wallet after signing in they should be able to decrypt the file and again like this is something that you can do from our Lighthouse SDK which is like the key purpose for the second one you should be using Lighthouse SDK to qualify for the bounties as well which I'll talk about and yeah as for developers who can come here or get an API key and again sign from the wallet to generate that API key uh copy this API key and then um here's our documentation link which you can also find some on me inside as well clicking on this her documentation of the page and here we have like bunch of code examples let's say if you want to try out our CLI but let's say if you wanna integrate into your browser front-end or node.js backend so we have bunch of code examples here so let's say if you want to upload uh the file here so you can like just copy paste this code enter the API key here and just start uploading files to Lighthouse and even on excess condition side which I just demonstrated so they're like bunch of code examples here like on node.js who can apply the success control conditions and mention whichever chain and what the condition has to be and the excess conditions are multiple like I showed you how you can add in like a ERC 721 logic or to token get your file or erc20 logic but you can also even apply time based excess control as well so let's say you if you want to time lock a file for let's say next one day or if you want to unlock a file only after next one month so accordingly you can specify that block number here that when allow to access this file only when this block number has passed so again this is pretty interesting uh like feature that you can use to build some useful app on of in this hackathon as well which I highly recommend and coming back to our presentation your lighthouse file set for this SDK as I just showed you can go to our documentation this is the thing for that and here are some of the use case that I would love to talk about so for example question protocol we did an integration with them recently so now call the ocean economy and an ocean ecosystem dabs will be able to store data on filecoin or through the lighthouse SDK and then there's just another great project called as cookie contract so they created something very interesting like these web 2 widgets so so these web3 widgets that you can you know embed into any front-end be it any web 2 or web3 front end so let's say if you wanna have a nft functionality so you can rather than implementing it from scratch okay Contra and build this on Lighthouse that uh they had this Ben 10ft functionality and the data is being stored on the nft data is being stored on Lighthouse and not anybody can just go and use OK contract uh widget into their front end and then start storing files on Lighthouse and then bankers and other gaming uh project so they are storing all their gaming assets on Lighthouse as well uh as part of this hackathon there's already a idea list which I think you can find on the space Rob site but there like this is like another bunch of examples that you can take an idea from like what is possible with Lighthouse but again this is like just some basic samples you can even build some more interesting examples but yeah if if you want to try like something like pay-per-view media time lock retrieval those things can be interesting to experiment or you can use it generally for your Dow storage or any of the storage if you are using any of those uh ideas into your projects and as part of this hackered we are sponsoring in total of 2500 which will be divided among five projects so let's say five hundred dollars uh per project so for the best use of Lighthouse SDK yeah so here is our website Lighthouse dot storage and this is our Discord uh you can also find that again in on the website as well but feel free to scan this link and happy to answer any questions so what so it says how would we so one question is how would we whitelist wallets uh to view so yeah again this is something that you can do through our SDK as well so like just to show you the UI interface of it let's say rather than doing the Supply Access Control part you can just click on this share button and enter all the addresses here like on the public address you want to or share and then those addresses will be whitelisted and only then they can do this file this functionality again you can Implement from our SDK as well there should be code example or to whitelist public addresses who can view this file current next question is can we call how do the conditions get applied can you provide insights into help these work behind the hood yeah I think that's a very interesting question I think we've also had a blob around it as well on our site on how this encryption works but yeah underlying be used like this threshold cryptography so the decrypt so every file gets its own unique decryption key and whatever you want to call it and then that key has splitted using threshold cryptography like BLS cryptography and split it across various Lighthouse notes and none of the nodes know the full key part of the file so like they cannot decrypt the file on their end but when you as a user you authorize from your wallet as I was showing on like signage of your metamask so all of those Lighthouse nodes verify on their individual end that does this user have access to the file and then they share their key Parts which is aggregated on the client send so we also you know open sourced our uh that's SDK as well so for if people want to use it for other storage systems as when you can do that uh let me call that coverage so underlying it uses a threshold cryptography to make this magic happen and let me see what's the another question how many sites have integrated the wallet um I'm not sure what does that mean how many sites have integrated the wallet if you can again ask what do you mean by that um and money was can we use Lighthouse SDK with ionic framework or app gear I think what what I'm not sure about these Frameworks uh I think these are primarily front-end Frameworks It Feels So then just post it on our Discord channel one of our team members should get back to you on how should you do it but essentially if ionic quality supports npm package then you should be able to do it and then there's a question on how do endowment Pool Works so yeah right now this endowment pool is not totally live it's like live on a test network uh but it like we just got it audited uh last week oh and then it will go live me in that in the coming uh month but yeah what you can imagine how how endowment tool works is you can imagine it like a dull which is controlling the spoon of funds and the spoiler funds and show that the files is total perpetuity so when you pay for a file at some part of it goes to the Falcon miners as per their applications we've asked for and the remaining amount the buffer amount goes to this smart contract with endowment pool which is well like Collective for all the users buffer amount not just you but every user's buffer them all goes to this endowment phone and it will be transparent so you can check okay what's the estimated uh amount in the pool and how many estimated number of years this pool can support and this also accrues fees through D5 protocols through work encryption bandwidth and other functionality uh usage as well as those generate fees and yeah another question is will we will support hyperspace testnet web support yeah definitely I think uh it should be added in couple of hours hyperspace testnet but right now wallaby is already live but hyperspace should be done soon so we'll update on the Discord as well when it's done in couple of hours or by the morning and then the question is how does Lighthouse decide her judge what a good implementation is so I think um yeah just make something which could be interesting again It's Tricky tools or say like how what would be the best implementation but uh I think there's like bunch of projects that you can refer to in the key Global um projects history as well so just see okay what are the winning projects and what are the common Trends between them one thing that I would definitely encourage us whatever you do you have enough time so make that thing live hosted on all it's a versatile or any other platform that you prefer or like just make it live so that people can actually users can actually go and use it so I think making the product life as much as possible as much as usable and not just keeping it localhost or on your GitHub would definitely be important and Lighthouse SDK you can use it either for storing your data or it can be used for like this encryption and token gated functionality as well so obviously if somebody goes far to you know leverage all the functionalities that we have that makes up extra mobs for them but generally you can also use it for uh like storage like even public file storage as well or that should be no problem what's the maximum storage we can use for free so like right now whenever you sign up like using your wallet you get 1GB free so we can uh like this increase in the storage capacity part will go live officially in the coming week but meanwhile you can uh message us on Discord if there's like more amount you want for this hackathon purpose you can manually top it up as well but yeah I think those are some of the questions and happy to answer if there's any more questions from the audience all right um I guess that's all the question for now um as native said if you have any more questions um oh it looks like someone's asking if you could post the GitHub URL um but otherwise if you have any questions um feel free to join the lighthouse um Discord it is posted in the forensic Lighthouse Discord channel on the um space warp Discord um and I'm sure it was someone from their team would be more than happy to answer and in the description and otherwise knit it thank you so much for uh um actually I think they're getting a couple more questions if you want to answer them yeah so I've posted uh GitHub link as asked by Julio and Shikhar is asking what specifically or data Dao is so I think that's a very interesting question and I can wear like bunch of resources as well that you can refer to on like Google around us but essentially I think how most of the uh the house that we have seen on ethereum are you know collaborating around just pool of funds I would say data Dao uh users can you know have um like control over data maybe they can even contribute to that data together and even monetize uh that data as well so let's say somebody like even let's say open AI which is like one of the most uh great examples of what's happening in the AI right now with the chat GPT model so imagine if uh a lot of users together come together and have let's say genetic data in one place and they let's say all hospitals in a place they collectively pull data resources and they control and they can let's monetize that data and also let's say if somebody wants to use that data uh they can let's say have no content royalty or something like that to access it uh but I think yeah this has something a top in that you can learn more about Don ionic fileco insight as well but generally you can imagine it like a way to collaboratively bring data together and even monetize data and I think that could be very interesting a use case that people should explore so for example I know one of the projects which is building one fpm right now they build something called as Glacier doll so like how GitHub had their pick code want I think Glacier Dao is doing that same thing with uh let's say users can bring in their code repos and then uh that has two together and maybe there's a way to monetize that and maybe in future somebody can run compute on that let's say GitHub has their own GitHub co-pilot but somebody in future can use the Asia daus or data and Glacier Dao contributors can be can get paid uh whoever like as per their contribution to this now so but I think given Heat global there was a summit previously so there's a video on this like heavy VM Summit unlocking data dolls with fpvm so must check this what these guys are doing with Geisha Dao language Tau Etc so those could be a starting point um but yeah I'll also drop in some of these resources in um or Discord as well and is there any other question so retrieving data from Lighthouse can be data time specific again this is something that maybe you can ask in our Discord uh right now I think it's like on the Block time so let's say if you wanna uh excess control it that the file can only be viewed after some specific number of blocks then maybe I think you can multiply or that with like whatever the block time is and then get the how about for which the file will be locked but if you are asking specific for uh like let's say log discontent for next one here this is something you can ask in order Squad but I think right now we support just below planes yeah no thank you so much Amanda for taking the time to do this Workshop um and thank you so much for the rest of you for tuning in and asking so many questions um definitely feel free to keep asking any questions you have in their Discord Channel um and with that being said um I hope everyone has a great rest of your day and the hackathon officially starts tomorrow so excited to see what you all build bye everyone goodbye thank you

Automatic transcript — names and jargon may be misspelled.