Zone file and profile


#1

I have some very basic questions regarding the zone file and profile and the relation between them.

  1. Does the zone file get created automatically when one creates a Blockstack ID via the Blockstack Browser?

  2. How can I view the zone file corresponding to my Blockstack ID?

  3. Is there a document with the exact format of the zone file?

  4. Is my understanding correct that the zone file is stored off chain in the Atlas network and its hash stored on the underlying blockchain?

  5. Does the zone file contain a link to the user’s profile?

  6. Where is the link to the user’s data storage located? In the zone file or in the profile?

  7. Are the contents of the profile.json the same as what is viewable through the “settings” of the user name in the browser?


#2

Providing a pointer to the docs which does discuss the zone file and lookups:

You can lookup a lot of information (including the hub file) about your ID here:


#3

Thanks for the links.

I have a few further questions after going through these documentation as well as the white paper again and playing around with the explorer a bit.

As per Figure 1 of the Blockstack white paper, the “URIs in zone file point to stored data”. Does the “stored data” here refer to the profile.json file?

Assuming the above is true, the following is my understanding of the flow.

  1. The zone file corresponding to a Blockstack ID points to the location of the profile.json file for the user.
  2. Currently the location of the profile.json is fixed to a per-user default of https://gaia.blockstack.org/hub/<User’s Blockstack Address>/profile.json.
  3. The only way to change this default location right now, in case you stand up your own Gaia server, is through the CLI.
  4. When you sign in to an application with your Blockstack ID in the Blockstack Browser, the Browser creates a link in the profile.json file of the form https://gaia.blockstack.org/hub/, where the application can write its data.

Can you please let me know if this is correct?

By the way, in the explorer I didn’t see a way to view the raw zone fine. Can it perused only from the CLI?


#4

You can view raw zone files by using core.blockstack.org. Here’s an example: https://core.blockstack.org/v1/names/jehunter5811.id


#5

Thanks!

Is this the cached copy of the zone file in the Atlas network? As far as I understood from the documentation, the hash of the zone file is also stored in the underlying blockchain. What would be the way to access that?

Does an application ever need to compare the hash of the zone file fetched from the Atlas network with that stored in the blockchain, or does the Blockstack Browser always verify that and simply provides a link to a Gaia URI to which the application can write?


#6

No, my understanding is that the Atlas network only caches files that have been whitelisted on the blockchain and if you request the zone file through the blockstack.js API getzonefile then the hash and the content of the zonefile is compared and an exception is thrown if it does not match.

I would assume that the gaia url is save to use and verified as long as the user does not change the gaia provider while the user is logged in into the app.