Closed sandrask closed 3 years ago
@thehenrytsai @csuwildcat I added this issue to the agenda for today - hopefully you get a chance to look at it.
We are currently hard coding to v0 here:
https://github.com/transmute-industries/sidetree.js/blob/master/packages/cas/src/MockCas.ts#L70
During Sidetree weekly it was agreed that reference application will: 1) support valid v1 IPFS CID (e.g. "bafkreih6ot2yfqcerzp5l2qupc77it2vdmepfhszitmswnpdtk34m4ura4") 2) make CAS URI validation protocol independent so there is no need to change CAS write() interface to include protocol multihash algorithm (18)
@thehenrytsai @csuwildcat @troyronda
Fixed in implementation. Awaiting documentation to reflect it. https://github.com/decentralized-identity/sidetree/pull/953
@sandrask @isaacJChen Sandra, if the spec does not correctly reflect what Isaac modified in code, can you highlight the language that needs to change and do a PR, or specifically cite it here and I will?
@csuwildcat Spec and the implementation now match, thank you
Reference application is verifying CAS file URI against protocol hashing algorithm here: https://github.com/decentralized-identity/sidetree/blob/ed1999209a45fd1cb8426a30c2b50724a1a2f937/lib/core/versions/latest/InputValidator.ts#L54
There are two issues here: 1) this code would not work against valid v1 IPFS CID: bafkreih6ot2yfqcerzp5l2qupc77it2vdmepfhszitmswnpdtk34m4ura4
https://cid.ipfs.io/#bafkreih6ot2yfqcerzp5l2qupc77it2vdmepfhszitmswnpdtk34m4ura4
2) reference application is assuming that IPFS CID is created using protocol's multihashing algorithm. Is this a requirement? I couldn't find any reference in the spec related to this. Is this functionality in the reference application necessary?
Also, issue 2) requires changes to write() method in CAS interface to pass multihash algorithm/code.