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

Clarification for Revocation Registry Entry/Delta #52

Closed domwoe closed 2 years ago

domwoe commented 2 years ago

The DID Url path for a Revocation Registry Entry is used for two different ledger requests - entry or deltas - depending on the query parameters.

I don't think that is necessarily bad but it is not clear what should be returned if there is no query parameter present.

The spec says if versionId (should be versionTime) is not present, then the entry with the current time should be returned. However, the spec also says if from and to aren't present, then the delta with to as current time should be returned.

We need to either:

  1. Have two different paths REV_REG_ENTRY and REV_REG_DELTA or
  2. Define unambiguously what's returned without a query parameter present. From the path, I'd expect the entry which means to get a delta you must provide (at least) a to query parameter.

I'd prefer 1, but I don't know the reason to mix the two requests in the first place. I think @paulbastian mentioned this as well.

paulbastian commented 2 years ago

I agree with Option#1 as stated here already: https://github.com/hyperledger/indy-did-method/issues/39#issuecomment-1032666895

swcurran commented 2 years ago

I'm OK with either. I think I was just trying to reduce the number of pathes, so combined them, but certainly understand that having two different paths is probably clearer.

If we go with option 2, the answer would be that it returns the last RevRegEntry.

If we go with option 1, we should also define that if from and to are left of the implication is that the DELTA will be from start of time to now() -- e.g. all entries.

domwoe commented 2 years ago

The decision was on Option 2, since Rev Reg Entry and Rev Reg Delta are basically the same ledger objects. The GET_REVOC_REG request returns one accumulator value and a specific time, the GET_REVOC_REG_DELTA request returns one or two (if from is set) accumulator values plus revoked and issued indices.

The distinction between the two responses is unambiguously distinguished by the usage of the appropriate request parameters.