IPFS.

Publicación

Comparte tu conocimiento.

IPFS moderator.
Mar 22, 2024
P&R expertos

Converting Filecoin CID to IPFS CID for ipfs:// Queries

I'm looking to understand the process of converting a Filecoin piece CID into a standard IPFS CID that can be utilized for ipfs:// queries. Can someone provide guidance or a method to achieve this conversion? Any insights or code snippets would be greatly appreciated.

  • IPFS
  • Filecoin
  • IPLD
0
1
Cuota
Comentarios
.

Respuestas

1
IPFS moderator.
Mar 22 2024, 13:35

Filecoin's piece of Content Identifiers (CIDs) differs from the CID of the IPFS files. IPFS files are segmented into a Merkle-DAG (Directed Acyclic Graph made of cryptographic Hashes). Filecoin utilizes Zero-Knowledge Proofs (ZKProofs) to ensure storage providers' accountability. These providers are required to submit daily proofs to demonstrate data retention; failure to do so results in collateral loss.

The ZKProofs function solely on blobs that are powers of two. Larger chunks are preferred due to various competitive factors. However, limitations exist due to GPU chip memory constraints, leading Filecoin providers to predominantly use 32 or 64 GiB chunks. Data padding is necessary for ZKProofs, with 1 bit added every 128 bits. Additionally, a truncated hash tree with specific properties is required.

In contrast, IPFS chunks range from 0 bytes (minimum) to 256 KiB (default) to 2 MiB (maximum). While functional, this size range is inadequate for Filecoin. Although padding can be applied to reach the next power of two, numerous small chunks are inefficient for storage providers.

0
Respuesta Oficial
Comentarios
.

Sabes la respuesta?

Inicie sesión y compártalo.

Usamos cookies para asegurarnos de que obtenga la mejor experiencia en nuestro sitio web.
Más información