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

Resolve pending names #7

Closed
jcnelson opened this issue Mar 15, 2018 · 5 comments
Closed

Resolve pending names #7

jcnelson opened this issue Mar 15, 2018 · 5 comments

Comments

@jcnelson
Copy link
Member

In order to implement instantaneous sponsored name resolution, the registrar needs to be able to respond to GET /v1/names/{sponsored-name} and reply the same data that a Core node would reply.

My thinking is that we make core.blockstack.org reply with a 302 to the sponsored name registrar when it tries to (1) resolve a sponsored name that does not exist, and (2) detects that the sponsoring name (the on-chain name) has previously sent a zone file that lists a resolver endpoint.

Here's what I'm thinking for the implementation. In order to implement (2), the sponsoring name needs to send a zone file with the following resource record at some point:

_resolver IN URI 10 1 "https://sponsored-name-registrar.com/API/endpoint"

The Core node would send an HTTP 302 to the _resolver URI record. Specifically, it would choose the latest such record if there are multiple zone files with the _resolver record.

The client (e.g. blockstack.js, curl, etc.) would issue the GET /v1/names request to https://sponsored-name-registrar.com/API/endpoint in response to the HTTP 302.

I would implement the _resolver parsing and redirect logic in Core, and this program would implement GET /v1/names for sponsored names in the db. Do you think this is reasonable?

@jcnelson
Copy link
Member Author

Related issue for the Core logic: stacks-network/stacks-core#750

@kantai
Copy link
Member

kantai commented Mar 19, 2018

I would implement the _resolver parsing and redirect logic in Core, and this program would implement GET /v1/names for sponsored names in the db. Do you think this is reasonable?

Yep -- that sounds reasonable to me. So the 302 would look like:

HTTP/1.1 302 Found
Location: ${_resolver_url}/v1/names/aaron.personal.id

?

@jcnelson
Copy link
Member Author

Yeah, exactly!

@kantai
Copy link
Member

kantai commented Mar 23, 2018

Addressed in #8.

@kantai kantai closed this as completed Mar 23, 2018
@kantai kantai reopened this Mar 23, 2018
@kantai
Copy link
Member

kantai commented Mar 23, 2018

For setting the _resolver entry, I'll start a new issue.

@kantai kantai closed this as completed Mar 23, 2018
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

No branches or pull requests

2 participants