Overview of Spark v1 (the current version)

Database of eligible deals

{
  minerId: DealProposal.Provider // f0...
  payloadCid: DealProposal.Label // bafy...
  clientId: DealProposal.Client  // f0...
}

Retrieval check (v1)

  1. Query blockchain state (Filecoin.StateMinerInfo(minerId, null)) to obtain miner’s peer ID
  2. Query IPNI at https://cid.contact to find the advertised retrieval provider for payloadCid that matches the miner’s peer ID
  3. Fetch payloadCid using the advertised provider address and retrieval protocol (HTTP or Graphsync)

Spark v2 design (the upcoming version)

Database of eligible deals

Retrieval check (v2)

  1. Query blockchain state (Filecoin.StateMinerInfo(minerId, null)) to obtain miner’s peer ID.
  2. Build contextID from (pieceCid, pieceSize) using the same algorithm as Curio (source code).