hyperledger / indy-did-method

Indy DID Method Specification
https://hyperledger.github.io/indy-did-method/
Creative Commons Attribution 4.0 International
18 stars 14 forks source link

Field for self-certification algorithm #63

Closed cjhowland closed 2 years ago

cjhowland commented 2 years ago

This issue is a product of discussion on PR #60 related to @paulbastian 's comment:

I have to say it feels confusing because there is another chapter of 10.3.1 "DID Version". I think "DID Versions" are supposed to be DID Document Versions.

One option is to add a new field with a name more specific than version, such as "self-certification algorithm." But since self-certification will likely be enforced in the future, it may not be advantageous to create a new field that will become a vestigial trait.

We have been investigating to see if there's an existing field that could be used to designate the self-certification algorithm. A potential option is to use TXN_PAYLOAD_VERSION to indicate the self-certification algorithm. (As far as we can tell, this is only used in rich schema.) This option would require that Indy VDR requests are modified to support this change.

dbluhm commented 2 years ago

Some additional context: https://github.com/hyperledger/indy-node/blob/master/docs/source/transactions.md#common-structure

As it turns out, there's a plethora of identifiers for "version" for different structures within Indy Transactions. The one of interest to us is the ver that is sibling to protocolVersion. This field has the following description in the doc linked above:

ver: Transaction's payload version as defined in the input request. If the input request doesn't have the version specified, then default one will be used.

This seems to be an exact match for our needs. However, this payload version is not stored as part of the state by default. We would still need an indicator stored in the state that would signal to the resolver the characteristics of the DID/NYM being resolved. Considering this and the lack of usage of this transaction attribute literally anywhere else inside of the domain transaction handlers today AND the required modifications to the Indy VDR, we should stick to our original plan (and implementation). I'll raise this on the call this coming Tuesday but I think we're actually good to close this issue.

RE: Paul's comments: I think the correct fix in this case is to adjust the language we added to the spec to disambiguate DID Versions vs Nym Transaction versions.