Starting this thread to clarify and get help on what should the content of a zone file be. Hope this will help others like me that could not figure out what to add to the file and successfully run the update command.
Hey! Blockstack uses zone files to link off-chain data with your on-chain blockchain ID. Let’s take a look at my zone file:
$ORIGIN judecn.id
$TTL 3600
pubkey TXT "pubkey:data:04cabba0b5b9a871dbaa11c044066e281c5feb57243c7d2a452f06a0d708613a46ced59f9f806e601b3353931d1e4a98d7040127f31016311050bedc0d4f1f62ff"
_file URI 10 1 "file:///home/jude/.blockstack/storage-disk/mutable/judecn.id"
_https._tcp URI 10 1 "https://blockstack.s3.amazonaws.com/judecn.id"
_http._tcp URI 10 1 "http://node.blockstack.org:6264/RPC2#judecn.id"
_dht._udp URI 10 1 "dht+udp://fc4d9c1481a6349fe99f0e3dd7261d67b23dadc5"
You can get anyone’s zone file with blockstack lookup
or blockstack get_name_zonefile
(you’ll need to enable the advanced methods if you want to use the latter).
The fields are as follows:
- The
$ORIGIN
field must contain your blockchain ID - The
$TTL
field, if given, is how long a client can cache your zone file (in seconds) - The
pubkey
line identifies the ECDSA public key that will be used to authenticate your off-chain data. This isn’t required as of 0.14.0, but it will be required in the next release (0.14.1) if you want to store new data. - The various lines afterwards that have
URI
in them point to copies of your profile. Other peoples’ clients will try to use each of them to find my profile when they runblockstack lookup judecn.id
.
The formatting is consistent with a DNS zone file, but with the following extra requirements:
- Your public key in the
pubkey TXT
record must start withpubkey:hex:
and must be hex-encoded. - You may have only one public key at this time (if you put two or more, then they will all be ignored).
- Other records like
MX
andCNAME
will be ignored. The client only pays attention toTXT
andURI
records.
We’re going to include a zone file wizard in 0.14.1 that will help you fill in the various fields without having to be bothered by these details.
Looking forward to the zonefile wizard and relevant docs/tutorials going out! That’d help a lot.
Thanks Jude,
this is very helpful! How do I find my pubkey?
You can view your wallet information (and keys) with a blockstack wallet
in your shell (which then prints out some keys).
Here you can find information about the keys and which to use.
How can I use this zonefile wizard?
As of 0.14.1, it should be activated automatically as part of the blockstack update
command.