You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To calculate CID we use a popular npm library called ipfs-only-hash this library exports a Hash object that does the calculation
import{CID}from'multiformats'importHashfrom'ipfs-only-hash'exportasyncfunctionhashOf(content: ImportContent|string): Promise<CID>{// note: generating the hash.of// from cid v1 and then converting it to cid v0// generates a wrong cid with big file sizesreturnCID.parse(awaitHash.of(content,{onlyHash: true,cidVersion: 1}))}// toV0() is a conversion that broke the CID on big fileconstcid=(awaithashOf(content)).toV0().toString()
As you may observe there is nothing wrong on the snippet above, however when we were trying to convert v1 CID (starting baf) to the v0 (Qm), the library made a wrong calculation.
The fix
As @hassnian was the original author of pinning worker (ipos) he took the challenge and made a fix
What happened?
@filippoweb3 reached to me that images from WUD collection are not loading on the wallets.
As a result external teams have opened issues/PRs:
He assured me in the DMs that content was uploaded via
KodaDot > Create > Single NFT
The root issue was however in the pinning service.
To calculate
CID
we use a popular npm library calledipfs-only-hash
this library exports aHash
object that does the calculationAs you may observe there is nothing wrong on the snippet above, however when we were trying to convert v1 CID (starting
baf
) to the v0 (Qm
), the library made a wrong calculation.The fix
As @hassnian was the original author of pinning worker (
ipos
) he took the challenge and made a fixcid
workers#343Both of us have tested the PR to ensure the that CID mismatch is not happening again. Fix was deployed on production.
Who was affected
The IPOS worker was added in the 03333e1
Therefore users who minted files bigger than 9 MB in the dates between 17/07/2024 - 17/10/2024 could be affected
If you artwork is not loading correctly on Talisman/ Nova wallet please reach to us on the telegram channel
The text was updated successfully, but these errors were encountered: