Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Loki Name Service aims to store .loki addresses within the blockchain, this will create an immutable record that allows clients to resolve .loki addresses to SNApp (hidden service) public keys. Similar to namecoin the Loki name service will circumvent issues associated with DNS architecture like DNS blocking, while allowing for Human readable names that are cryptographically secure.
I think the best way accomplish this is to allow lokid to create its own database of names and associated public keys, this database would be append only and would be created from transactions that occur on the blockchain.
My suggestion is that we should reuse registration transactions which expose the tx private key in the extra field of the transaction, revealing the recipient address and the amount of the transaction. The recipient address in this case can be and valid Loki public key for which there would not be generated a private spend key for. In this way the domain registrant can prove they are burning some funds.
Also included in the TX extra field should be the domain name they are reserving and the accompanying public key which that domain should resolve to, this part of the TX extra field should be signed by the corresponding SNApp (hidden service) private key.
Any client who has a full copy of the blockchain should now be able to scan the blockchain and reconstruct a list of reserved domains + associated public keys. This should be exposed via RPC to Lokinet and should be used when resolution occurs. (a separate issue should be created in the Lokinet repo for this)
We should also establish some rules domain name registration timeframe, re-registration and duplicate registrations. I suggest transactions which seek to overwrite a domain with a new public key should not append the database unless the transaction where the original domain was registered is more than 1 year old and there has not been a re-registration from the same keypair extending that window.
Regarding the burning of fees to create a domain i suggest that this sit in the range of 10 - 15 $ per year, this figure does not need to be exceedingly stable and i suggest that it should be adjusted up or down in terms of the Loki cost during hardforks to match the market value of Loki.
How can anyone be sure that the non-spendable address has no private spend key? Unless you create an obvious burn address like
Another way is to re-use the registration tx to lock the outputs for 12 months, so the holder is instead staking against their name, which is released after a year (like SNODE registrations). However burning may be better to counter the tail inflation of of the block rewards. If LNS and Loki Messenger takes off, then there may be a solid amount of annual burn against the inflation.
Suggest 12 months registration and up to 30 days after, the holder can claim their name again to re-set the 12 month lock.
The "rego fee" can be one of the items the SNODEs vote on with on-chain governance?
Yes the address would be a valid Loki address but non spendable like
This would mean only Service Nodes could register names, we want anyone to be able to register a name
this should probably be the case, i think in my suggestion it is 12 months but the re-registration period is one month inside that period, it should probably be 13 months with the last month being the re-registration period.
That's a good idea but adds complexity and means we would need to implement Service Node voting scheme before LNS, possibly at a later time this would work.
Although less secure I think Loki Name Service should also support subdomains if specified by the original registrant in the registration transaction. This would allow registrants to host a domains.txt file at the root of their SNApp or clearnet server (Assuming use of Lokinet exit) this domains.txt file would contain the instructions for resolving subdomains.
For example the registrant registers the name Marketplace.loki they can also add a domains.txt file that allows contains some entries like Food.Marketplace.loki which directs the resolver to another location.
there is a standard for this already that is probably close enough for what we need https://hueniverse.com/host-meta-aka-site-meta-and-well-known-uris-9db8a708064d