Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR adds 2 suffixes
._sia.
and._siaregistry
which can be used to download a zone file to query.._sia.
suffixThis is the simpler one where the skylink of the zone file is directly added on the blockchain.
There's already one to test (regtest, TODO: replicate on mainnet)
hsw-rpc sendupdate testname '{"records": [{"type": "NS", "ns": "AABsAiWo6vzvbhsJwG60aSztGijhT90BWnXHdxfMPpuZZg._sia."}]}'
The zone file is downloaded, loaded with bns, then queried for the user request.
The only problem here is that updating blockchain DNS for every small change of zone file takes time + $$$.
._siaregistry.
suffixThis adds 1 more request to first get the skylink of the zone file from the Sia Registry (slows down response time though).
So the blockchain gives registry info (public key, data key), this is used to get the zone file skylink.
Registry entry for this domain
And this registry can be updated easily programmatically, or with a simple interface like SkyDB.
SkyDB
Portals
By default, https://siasky.net is used, but can be configured with
handover-sia-portal
config. While all portals with with._sia.
, not all support the registry yet. For example skyportal.xyz does, but skydrain.net does not.Cache
Both getting skylink content and registry are cached with LRU (similar to RootCache in hsd).
Use it
./bin/hsd --plugins handover --log-level debug --rs-port 53
)dig @127.0.0.1 testname TXT
anddig @127.0.0.1 siaregistry TXT
To Do