IPFS.

Post

Share your knowledge.

IPFS moderator.
Mar 22, 2024
Expert Q&A

State of CARv1 vs CARv2 for IPFS Gateway Car File Requests

I'm looking to understand the current status of CARv1 versus CARv2 when requesting a car file via an IPFS gateway for downstream implementations. Will the IPFS gateway implementations consistently return v1 encoded car files, or is there a possibility that v2 might be utilized instead? Any insights on the prevalence and support for CARv2 in IPFS gateway implementations would be greatly appreciated.

  • IPFS
0
1
Share
Comments
.

Answers

1
IPFS moderator.
Mar 22 2024, 12:34

To specify the explicit version in the content type header, you can use the following format: Content-Type: application/vnd.ipld.car;version=1. This specification will be recognized by valid gateway implementations, as outlined in the documentation provided by IPFS: Trustless Gateway Specifications.

It is worth noting that utilizing version 2 on a trustless gateway may not be the most practical approach, as there is currently no cost-effective method to verify that the index has not been altered.

Regarding the format compatibility, it is possible to read a carv1 stream and simultaneously generate the v2 index incrementally. However, it is uncertain whether this functionality has been implemented in the car libraries.

0
Official Answer
Comments
.

Do you know the answer?

Please log in and share it.

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.

95Posts95Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

We use cookies to ensure you get the best experience on our website.
More info