ipfs / ipld-explorer-components

React components for https://explore.ipld.io and ipfs-webui
Other
24 stars 23 forks source link

error on Blake3 CID #394

Closed lidel closed 1 year ago

lidel commented 1 year ago

Add something big with ipfs add --hash blake3 --chunker size-1048576 and try to explore the CID.

Ref. https://explore.ipld.io/#/explore/bafyb4idpl4jjcsxsqa3ju2ey2n7npnpsruhgyqc7gfo3axt76hpavm4p7q

It errors in bot webui and on the website:

2023-08-28_23-54

whizzzkid commented 1 year ago

@lidel I don't think the size is the issue here. it fails for me even for a small file.

Image

Error:

Failed to decode CID Error: unknown multihasher code '30'
    at hash-importer.js:32:13
    at h (regeneratorRuntime.js:44:17)
    at Generator.<anonymous> (regeneratorRuntime.js:125:22)
    at Generator.next (regeneratorRuntime.js:69:21)
    at r (asyncToGenerator.js:3:20)
    at s (asyncToGenerator.js:22:9)
    at asyncToGenerator.js:27:7
rvagg commented 1 year ago

Supported hashers are in https://github.com/ipfs/ipld-explorer-components/blob/master/src/lib/hash-importer.ts

Unfortunately we don't have a blake3 hasher in JS as far as I'm aware; yet. Although I did just release multiformats@>10 versions of both the full blake2 (s & b) set and sha3, they could be added.

lidel commented 1 year ago

Blake3 has been allowed in Kubo since https://github.com/ipfs/kubo/issues/8650#issuecomment-1216682943. No super urgent today, but the more people use it, the more often our users we will hit this error.

rvagg commented 1 year ago

well lookie lookie https://github.com/web3-storage/blake3-multihash

so that could be added to hash-importers.ts too and it should be 👌