This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
"Missing IPLD format" error for known/registred format #3300
Closed
Description
-
Version:
0.50.2 -
Platform:
Darwin XXXX 19.5.0 Darwin Kernel Version 19.5.0: root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64 -
Subsystem:
The affected core module is thehttp
part of theipfs
core. The code that I pinpointed is here.
Severity:
High - The main functionality of the application does not work, API breakage, repo format breakage, etc.
Description:
In situation where ipfs-http-client uses dag-jose codec as a format, the IPFS instance cannot respond, since it cannot find the codec even if it's registered on bootstrap of the instance:
{
ipld: {formats: [dagJoseFormat]}
}
Note: formats are added to theIPFS
node and ipfs-http-client
both.
Steps to reproduce the error:
Creating the ipfs-http-client
:
import dagJose from 'dag-jose'
import multiformats from 'multiformats/basics'
import legacy from 'multiformats/legacy'
multiformats.multicodec.add(dagJose)
const format = legacy(multiformats, dagJose.name)
const ipfsClient = ipfsClient({
url: opts.ipfsHost, ipld: { formats: [format] }
})
Creating the IPFS
instance:
import dagJose from 'dag-jose'
import multiformats from 'multiformats/basics'
import legacy from 'multiformats/legacy'
multiformats.multicodec.add(dagJose)
const format = legacy(multiformats, dagJose.name)
const ipfs = await Ipfs.create({ ipld: { formats: [format] } })
The IPFS instance cannot find the codec for the payload sent via ipfs-http-client
.