-
Notifications
You must be signed in to change notification settings - Fork 4
Possible wrong CID #13
Comments
That's actually a really good point (BTW: it's the same for Bitcoin). The reason for it is, that we want to have the same hash as Zcash is generating. This violates how IPLD is supposed to work. I need to put more thought into this and play around a bit with some actual data, to see if it really is an issue. |
Are you sure about Bitcoin? My reading of the code says that it is okay. |
@richardschneider You are right, js-ipld-bitcoin does it differently, but I think it's wrong. I really need to dig into this. Edit: js-ipld_bitcoin also only uses the header: https://github.com/ipld/js-ipld-bitcoin/blob/77354ac7a3464d98db89bf0bc575b85265a36c32/src/util.js#L83 |
I think ethereum might have a similar issue. |
Follow up issues for this one are Ethereum already distinguishes between the different blocks. Thanks @richardschneider for pointing this out. |
Closing this issue in favour of: |
Looking at the code for
util.cid
I see that the multihash is created fromdagNode.header
notdagNode
like all the other IPLD packages.This implies that the hash of the serialised block is not the same hash that is generated by
util.cid
; which BREAKS ipld/interface-ipld-format#32@vmx any comments?
The text was updated successfully, but these errors were encountered: