-
Notifications
You must be signed in to change notification settings - Fork 92
Filecoin and IPFS interactions
The following things are separate but related in the following way:
- The IPFS codebase
-
The Filecoin codebase e.g. Lotus <- assumes a Filecoin-configured IPFS node is running locally (code / “all Filecoin nodes are IPFS nodes under the hood”)
- That code seems to be where lotus interacts with ipfs, which it does. It adapts between its blockstore accessor and ipfs assuming there’s a local ipfs node running. I guess that local ipfs node will be configured to connect to the Filecoin-IPFS DHT and not the public IPFS DHT
-
The IPFS network <- a standalone network for storage but with no incentive structure for persistence (you just make data you’ve got locally available on IPFS by publishing it, others can download it, but if you go offline, that data isn’t accessible any more - "Filecoin and IPFS are two separate, complementary protocols")
- This network is specified/seeded by a bootstrap list
-
The Filecoin network <- separate networks (“Filecoin nodes don’t join or participate in the public IPFS DHT”, “Filecoin is the missing incentive layer for IPFS and verifies that your data is being stored, while maintaining the efficiency, authenticity and resiliency provided by IPFS”)
- In fact it looks like the filecoin network is an IPFS network (separate to the public IPFS DHT, let's call this the Filecoin-IPFS network) and separately a Filecoin blockchain network?
I do not believe that you can actually “ignore IPFS completely” for what you intend to do
Unless you will design a side-protocol to distributed the computations to be run
The thinking here is that:
- IPFS is composed of libp2p+IPLD+IPFS itself
- You will use libp2p to connect with Filecoin nodes, which is the largest chunk of IPFS codebase
- IPLD https://ipld.io/ is what IPFS files and Filecoin Car files are made of, and you can use it to describe versions of datasets that were changed or even the computation itself. Check https://research.protocol.ai/publications/ipfs-fan-a-function-addressable-computation-network/delarocha2021a.pdf for inspiration
OPEN QUESTION - does Lotus run IPFS in-process? The Lotus install docs don't specify needing to separately install an IPFS node, but the code looks like it's assuming an IPFS server is (can be) running locally.
OPEN QUESTION - is the filecoin network two layered networks (IPFS + blockchain on top) or is it all one libp2p mesh?
OPEN QUESTION - when specifying, say, a list of CIDs for a Bacalhau job to run on, would we expect to be able to specify CIDs in the IPFS network, or the Filecoin network? In the latter case, they would be sealed, and need to be unsealed. Assuming we specify the CIDs as IPLD addresses, can IPLD reference files in the Filecoin network?
OPEN QUESTION - out of curiosity, how do the Filecoin and IPFS networks avoid interfering with eachother, by, say, a node that connects to both at the same time by accident?
OPEN QUESTION - what does Filecoin actually store in its IPFS network? Is it sealed sectors, or something else? Is IPFS used as a way to specify data that is an input to a Filecoin deal?
--