When downloading something from api/v1/data/{cid} (which signals a local only download), the node may still invoke the block exchange engine to get parts of the dataset.
This happens when the manifest is in the local store, but some of the dataset blocks are not.
Node.retrieve() will first check whether a (manifest) cid is in the store:
|
if local and not await (cid in self.networkStore): |
And if it is, it will use Node.streamEntireDataset(), which will go to the network if the blocks are not local:
|
await self.streamEntireDataset(manifest, cid) |
When downloading something from
api/v1/data/{cid}(which signals a local only download), the node may still invoke the block exchange engine to get parts of the dataset.This happens when the manifest is in the local store, but some of the dataset blocks are not.
Node.retrieve()will first check whether a (manifest) cid is in the store:archivist-node/archivist/node.nim
Line 350 in 01c1198
And if it is, it will use
Node.streamEntireDataset(), which will go to the network if the blocks are not local:archivist-node/archivist/node.nim
Line 359 in 01c1198