input-output-hk / prism-did-method-spec

Apache License 2.0
15 stars 1 forks source link

Inaccurate inline comments for `UpdateDIDOperation` and `DeactivateDIDOperation` operations #55

Closed antonbaliasnikov closed 1 year ago

antonbaliasnikov commented 1 year ago

For the Protobuf models of UpdateDIDOperation and DeactivateDIDOperation, the comment for the first field is inaccurate:

bytes previous_operation_hash = 1; // The hash of the operation that created the DID.

"The hash of the operation that created the DID." is not exactly as it's described after, because it may be not only the initial create DID operation, but also any other update DID operation that is clearly described next:

The previous_operation_hash field MUST contain the hash of the last AtalaOperation message that was used to successfully update the DID. This is, the hash of the AtalaOperation that contained the last UpdateDIDOperation applied or, if this is the first update, the hash of the AtalaOperation that contained the CreateDIDOperation that created the DID. The hash is obtained through the HASHING_ALGORITHM of the said message.

I suggest changing the comment to something like this: "The hash of the most recent operation that was used to create or update the DID"