Skip to content

Latest commit

 

History

History
183 lines (117 loc) · 16.4 KB

fvm.md

File metadata and controls

183 lines (117 loc) · 16.4 KB

This page is ported from FVM Hackathon Cheat Sheet (retired, use for reference only).

Hi there builders! Not sure where to begin? Too many docs to navigate?

Here’s a cheat sheet to get you from zero to hero. This cheat sheet provides a guide to the following, in order:

💡 Filecoin & FVM concepts

📍 Navigate what you need to use for your hackathon project

🚀 Resources to get you building

Filecoin Virtual Machine

FVM Project Ideas & Blueprints

  • Data + FVM See how we are thinking about new concepts on Programmable Storage Markets, including dataDAOs and decentralized data aggregators
  • Request for Startups L2 solution ideas built on top of FVM & FVM tooling ideas. These are some ideas that Filecoin finds valuable to the ecosystem, but is not a finite list.

FVM starter kits

  • FEVM Hardhat Kit A starter hardhat project for developing, deploying, and testing Solidity actors on the FEVM.
  • FEVM Foundry Kit A starter foundry project for developing, deploying, and testing Solidity smart contracts on the FEVM.
  • FVM Deal Making starter kit use the client contract here to make a deal proposal directly with the Storage Provider for data >4GB.
  • DataDao starter kit quickly spin up a DataDAO using client contract & OpenZepplin's Dao contracts.
  • RaaS starter kit fork this repo to build your own storage deal replication/renewal/repair services

Setting up

Navigate to what you need

Filecoin? FVM? IPFS? What should I use to store data for my projects.?

We got you. Follow the decision-making guide below, to see which resource is recommended for your use case:

shapes (13)

Recommended resources from the guide above:

  1. Open data sets Access existing datasets on Filecoin for sampling in your project
  2. Lighthouse.storage SDK easy frontend data upload, access control, replication/renewal/repair of storage deals through an SDK
  3. Direct dealmaking starter kit (Direct deal making with Storage Providers with): Use the Client Contract here to make a deal proposal, directly with the Storage Provider (SPs are actively picking up deals on calibration testnet but on mainnet, various factors affect their decision to pick up a deal including type of data, data size, SP's data capabilities)
  4. RaaS starter kit
  5. Storage Onramps: easy API integration for non-programmatic storage in your dApp.
  6. DataDAO Starter Kit: uses Client Contract for storage and Open Zepplin's Governor contract to quickly spin up a dataDAO. Keep building from there!
  7. Hackathon FVM Starter Ideas: detailed description for solutions and tools to build with and/or to support programmatic storage.

More FVM-compatible tools

FAQs

How can I use FVM to store data to Filecoin? / How can I store data with FVM?

The intent of FEVM/FVM is to compute over state data (the metadata of your stored data). Storage Providers are the ones that are able to store your data and upload the deal to the Filecoin network. You can check out the deal flow here, where various steps can benefit from integrating FEVM! Data retrieval happens via Retrieval Providers, accepting the client's ask to retrieve and working with Storage Providers to decrypt the data to deliver to the client. FEVM/FVM is able to build logic around these 2 processes and automate, add verification and proofs, time-lock retrievals etc.

  • Awesome! But what specifically can I do today to automate filecoin storage deals on FVM?

    As of today, we allow you to create deal bounties to incentivize the storage of data through FEVM. Read more here (this repo is specifically tracks the creation of deal bounties to build a DataDAO; the same pattern applies for any other dapps that need to incentivize the creation of data deals). This means that you need to incentivize the storage of the deal off-chain, and then a user of your dapp can claim the rewards on-chain. We recommend this approach for the hackathon. In the future, we aim to allow you to do this in a few different ways, which will make an exciting landscape to incentivize the storage of deals.

When a storage deal is made, is the data only stored by a single storage provider? What would happen if the storage provider (for some reason) removed all the data, would it be recoverable or is it lost completely?

When a SP stores your data and the deal is active, over time, the SP has to provide Proof of Replication (porep) of the stored data. They also have to provide Proofs of Spacetime (PoST), where randomly selected SPs have to provide PoReps for randomly selected storage sectors they maintain. So your data is replicated and not easily lost. and SPs get slashed if they are unable to provide the proofs so they are not incentivized to delete your data. However, let's say a miner does delete your data for some reason, then to prevent against that, the individual client can choose to store with various SPs. Or you can upload your data via storage helpers like web3storage and estuary, who do the replication across various SPs for you. more reading https://filecoin.io/blog/posts/filecoin-features-verifiable-storage/ https://docs.filecoin.io/developers/storage-helpers/overview/

How do I close a storage deal on Filecoin and stop Storage Providers from storing my data on-chain?

How can I manipulate storage deals? It’s not impossible but SPs are incentivized not to close the storage deal as they are slashed for not providing Proof of Spacetime (PoST). Someone has to pay for the broken promise a miner makes to the chain and you need a custom market actor for it most likely to make the deal. You need to make deals for a certain amount of time - right now the boundaries are 6-18 months. You cannot ask a storage provider to take down your data without contacting them off-chain.

What’s the benefit of deploying EVM to FVM/Filecoin instead of Ethereum network? Or write a dApp that way?

What are the unique features of Filecoin as compared to Ethereum? Need narrative/article on why Eth devs should care about FVM, covering gas expectations, performance, dApp benefits. Our current answer is around using FVM for storage-heavy parts of the dApp (at exabibyte level) which might not be priority for most devs.

Do I have to install Lotus to work with FVM? How do I install it? How do I install it on Hyperspace?

Here is a public lotus node you can use https://api.hyperspace.node.glif.io/rpc/v0

How do I check SP’s balance with their FEVM address?

You can query balance of any address https://docs.zondax.ch/openapi#get-/account/balance/-address-

Who is the beneficiary role, in the deal flow process?

The beneficiary role takes on the financial control from the Storage Provider, who then focuses on node control. The node owner, who is the SP, has overarching control over both roles. See more here.

How do I control access or encrypt data before storing on Filecoin?

You can check out lighthouse.storage. They are an FVM Early Builder who has built an access control SDK https://github.com/lighthouse-web3/encryption-sdk

For the frontend, what's a recommended framework(s) to use?

Most frontend that works for EVM works for FEVM too including Flutter, Dart, Ethers.js, web.js, ReactJs. These can also query events on the frontend.

How is the Filecoin network accessed through Solidity?

We have a feature-complete Ethereum JSON-RPC API that enables EVM tooling to deploy seamlessly to Filecoin. This is a good talk to learn more about the various architectural considerations and features https://youtu.be/TD-LsOpFeMU?t=6665

Could someone tell me the characteristics of fvm robust addresses and f4 addresses?

https://docs.filecoin.io/developers/smart-contracts/concepts/accounts-and-assets/

Can someone explain what the t0 and t1 addresses are?

  • 0 - ID Address
  • 1 - SECP256K1 Public Key Address
  • 2 - Actor Address
  • 3 - BLS Public Key Address
  • 4 - F4 translated address from foreign runtime to Filecoin

Where can I see other projects built on FEVM?