Closed swcurran closed 8 months ago
Why not have the ID (or another field) be the hash of the fields (concatenated) that must be unique?
Why not have the ID (or another field) be the hash of the fields (concatenated) that must be unique?
that will put a constraint on the schemaId
. Right now we are leaving it out to each method implementor.
The idea is to not have a constraint if we don’t need it. With my Indy background, I had been thinking the constraint was needed, but I don’t think it is, and I’d just like to get confirmation about that.
As long as the participants (issuers, holders, verifiers) are always referring to a specific schemaId, all is good. Whether the creator of the schema decides to reuse properties is up to them — everyone can see that the object is different, even if certain internal properties stay the same.
To be clarified in the spec to say these are not enforced as being unique. @swcurran to make PR.
Discussed at 2023.03.13 call.
I think this is resolved, but added this to the “finish checklist” #175 to verify.
In Indy, a Schema ID includes the publisher's DID, and the name and version and so the combination must be a unique. Likewise a Cred Def contains the issuer's DID, a schema ID and a tag. However, in other schemes, the IDs are contentless -- just unique identifiers. They may contain the DID of the schema publisher or issuer, but not the name/version or tag.
Question: Should the specification include a uniqueness requirement?
After a Discord discussion my feeling is it should not. It should require the IDs be unique, but not that combinations of properties within the objects unique. If a version exposes the properties in the identifier, that would enforce a uniqueness requirement on the properties.
Opening the issue to make sure there are no other side effects from making the decision either way. AFAIK, the only reason to enforce property combination uniqueness was if you were querying the ledger by the properties instead of the ID, but I don't think there is any requirement for that.