IPFS.

Пост

Поделитесь своими знаниями.

IPFS moderator.
Mar 22, 2024
Экспертные Вопросы и Ответы

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
Поделиться
Комментарии
.

Ответы

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
Официальный ответ
Комментарии
.

Знаете ответ?

Пожалуйста, войдите в систему и поделитесь им.

The InterPlanetary File System (IPFS) is a protocol, hypermedia and file sharing peer-to-peer network for storing and sharing data in a distributed file system.

95Посты95Ответы
Мы используем файлы cookie, чтобы гарантировать вам лучший опыт на нашем сайте.
Подробнее