Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git makes explorer unhappy #9

Closed
whyrusleeping opened this issue Jul 30, 2018 · 15 comments · Fixed by #14
Closed

Git makes explorer unhappy #9

whyrusleeping opened this issue Jul 30, 2018 · 15 comments · Fixed by #14

Comments

@whyrusleeping
Copy link
Contributor

Loading this: https://ipfs.io/ipfs/QmYJETQ15RAnKXoJxqpXzcvQ2DuQA35UHwJBTjTPCSs9Ky/#/explore/QmViWi5az9iiPzESM6ruHf84TcmHSAVQ2KQdNveoDH7eaY/refs/heads/master

(or traversing the graph to it from above) results in it getting pretty angry and not working (and spinning cpus)

@olizilla
Copy link
Member

Looks like an error is getting smothered

from js-cid
errorMsg = "multihash length inconsistent: 0x1114dc23ffefcd2feaef8036fda45e949afd86aae5d7"

@olizilla
Copy link
Member

Failed to parse CID 8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE Error: multihash length inconsistent: 0x1114dc23ffefcd2feaef8036fda45e949afd86aae5d7
    at Function.validateCID (index.js:235)

@olizilla
Copy link
Member

@olizilla
Copy link
Member

We get the same error from the cid util, http://cid-utils.ipfs.team/#8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE which isn't suprising as they both use js-cid

@olizilla
Copy link
Member

@whyrusleeping i got to sleeps now, if you have a moment to adjudicate over whether js-multihash is bugsy, or 8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE is a wonky CID, then let me know and I'll get it fixed tomorrow.

@olizilla
Copy link
Member

Ooh is it because I'm passing a raw git hash and asking it to be a cid, when it is not one.

@whyrusleeping
Copy link
Contributor Author

@olizilla huh, it looks like go-ipfs doesnt like that hash either. cc @magik6k, whats up with that hash?

@whyrusleeping
Copy link
Contributor Author

Oh right, it needs the 'z' prefix: z8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE

@olizilla
Copy link
Member

@whyrusleeping IPLD Explorer shouldn't panic'n'freak out in that case, but can you confirm that this is a rogue block with a wonky link, rather than a legit arrangement of things that it should be rendering.

@whyrusleeping
Copy link
Contributor Author

@olizilla It does not appear to be a rogue block, if you look here: https://ipfs.io/api/v0/dag/get?arg=QmViWi5az9iiPzESM6ruHf84TcmHSAVQ2KQdNveoDH7eaY/refs/heads

You can see the 'z' multibase prefix is correctly applied

@olizilla
Copy link
Member

ruh roh. I shall go digging.

@olizilla
Copy link
Member

@whyrusleeping js-ipld-dag-pb assumes that the link value in a dag-pb link will be a multihash, not a cid: https://github.com/ipld/js-ipld-dag-pb/blob/70b0cd53148fa26dc3e75fe250c0f1ad8161a59e/src/dag-link/index.js#L8-L23

@olizilla
Copy link
Member

I haven't tested it and I'm not super familiar with that code, but my guess is that's a problem

@olizilla
Copy link
Member

More ipld/js-ipld-dag-pb#79

@olizilla
Copy link
Member

ERH MER GLERB! IT GIT!

screenshot 2018-07-31 18 03 31

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 a pull request may close this issue.

2 participants