Skip to content

ipfs raw format fallback dag#2426

Open
Marketen wants to merge 1 commit intodevelopfrom
marc/ipfs-raw
Open

ipfs raw format fallback dag#2426
Marketen wants to merge 1 commit intodevelopfrom
marc/ipfs-raw

Conversation

@Marketen
Copy link
Copy Markdown
Contributor

Update the way directory listings are fetched and decoded from IPFS in the DappnodeRepository class. The main improvement is to support the new behavior of IPFS gateways (Kubo v0.40+), which no longer support cross-codec conversion from dag-pb to dag-json by default. The implementation now fetches and decodes raw dag-pb blocks client-side (Dappmanager), with a fallback to dag-json for older gateways. Additionally, the required dependency for dag-pb decoding is added.

IPFS Directory Listing Improvements

  • The list method in DappnodeRepository now first attempts to fetch the raw dag-pb block using ?format=raw and decodes it client-side with @ipld/dag-pb, making it compatible with Kubo v0.40+ and Trustless Gateways. Falls back to fetching as dag-json for older gateways, ensuring backward compatibility.
  • Updated the method documentation to explain the new logic and compatibility with IPFS gateway changes (IPIP-524).

Dependency Updates

  • Added @ipld/dag-pb as a new dependency in package.json to enable client-side decoding of raw dag-pb blocks.
  • Imported the decode function from @ipld/dag-pb in repository.ts to support the new decoding logic.

@Marketen Marketen requested a review from a team as a code owner April 20, 2026 10:26
@github-actions
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant