Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support resolve() and resolveStream() functions #331

Merged
merged 5 commits into from
Jul 3, 2020

Conversation

peacekeeper
Copy link
Contributor

@peacekeeper peacekeeper commented Jun 23, 2020

Replaces #322 and #323. Builds on #296 and #297.

During the 2020-06-18 DID WG Topical Call on DID Resolution contracts we had consensus that we should have two abstract functions for DID resolutions - one called resolve that returns a DID document as the abstract data model, and one called resolveStream that returns a DID document as a byte stream in one of the conformant representations.

After merging this, we can add a few remaining improvements that have been discussed, such as compatibility with the Infra standard, and definition of metadata structures.


Preview | Diff

Copy link
Member

@msporny msporny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits, otherwise, LGTM.

I was expecting there to be language around how resolve() and resolveStream() are related. Specifically, that resolveStream() is expected to utilize resolve() under the hood without stating anything normative about that. We can add that language in later as it's editorial.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Contributor

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a step forward. I left some hopefully non-controversial comments.

Comment on lines +3101 to +3102
<a>DID resolver</a> implementations MUST NOT alter the signature of these
functions in any way. <a>DID resolver</a> implementations MAY map the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DID resolver implementations MUST NOT alter the signature of these
functions in any way.

I understand the intent here but I imagine it may trip up implementers ... at least until we get more specific by using, for example, Infra. Then it may be ok to say this. The fact that we already have a normative statement saying that resolvers must implement this function could also be seen as enough and could avoid issues here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence originally came from @jricher . I'd be fine with removing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to just remove it -- since I was also thinking about how there may be some implementations that could provide additional optional parameters, for example, that would not run afoul of any interoperability concerns here. We don't need to be this prescriptive.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is to ensure interop. If you have additional functions (which might be how you handle optional parameters) then that's fine.

index.html Outdated Show resolved Hide resolved
Comment on lines +3016 to +3025
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&gt; ( did-resolution-metadata, did-document, did-document-metadata )
</code></p>

<p><code>
resolveStream ( did, did-resolution-input-metadata ) <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&gt; ( did-resolution-metadata, did-document-stream, did-document-metadata )
</code></p>

<p>
The input variables of this function MUST be as follows:
The input variables of these functions MUST be as follows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend splitting the definition of these functions into separate subsections with different descriptions about their inputs and outputs instead of trying to put everything in one block as they are here. This is possible to do as an editorial change after this PR is merged, but the issue shouldn't be lost.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, let's do this in a separate PR given that this has taken so long to get into the spec. Let's set down the base, editorial changes will be easier after that's done.

@peacekeeper peacekeeper removed the metadata issues and PRs related to metadata label Jun 25, 2020
@msporny msporny merged commit 073681f into master Jul 3, 2020
@msporny
Copy link
Member

msporny commented Jul 3, 2020

Normative, lots of WG debate in special topic calls, lots of requested and applied changes, we have consensus with no objections, merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants