PROPOSAL: Name Epochs

ryanc
Posts: 147
Joined: Wed Dec 18, 2013 8:10 pm
os: linux

PROPOSAL: Name Epochs

Post by ryanc »

What is a "Name Epoch"?

A name epoch is a period of 36,000 blocks. The epoch number would be floor(block height / 36,000), currently 5, soon to be 6.

A registration can be uniquely identified by (name, epoch of name_firstupdate). If the name expires and is re-registered the epoch will be different.

How can the epoch for a name be found?

Look at the transactions returned by name_history for a name, and find the most recent name_firstupdate transaction, then compute the epoch for that block. This value could easily be added to the result of name_show.

What's this good for?

My primary thought would be to use this for identity systems. When I create my account with ExampleSite using id/ryanc, it will record the current epoch for id/ryanc and require some verification procedure if the epoch changes.

For a .bit site, a .bit enabled browser could show an alert to the user if the epoch has changed since their last visit, protecting the user against a malicious re-registration.

Please let me know what you think, and if there's anything that I should clarify.

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: PROPOSAL: Name Epochs

Post by phelix »

Sounds like a good idea. It could also work without history if the epoch value is saved in the namedb with every firstupdate.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

ryanc
Posts: 147
Joined: Wed Dec 18, 2013 8:10 pm
os: linux

Re: PROPOSAL: Name Epochs

Post by ryanc »

phelix wrote:Sounds like a good idea. It could also work without history if the epoch value is saved in the namedb with every firstupdate.
Yes, ideally the namedb should just track the epoch value so it doesn't need to be looked up separately. The name history thing is just a way it could be implemented now.

indolering
Posts: 801
Joined: Sun Aug 18, 2013 8:26 pm
os: mac

Re: PROPOSAL: Name Epochs

Post by indolering »

It seems like you are trying to specify a unique ID for each owner of the name, so why not just count the number of public keys that have owned the address?

If you are trying to tie things to the initial registration, we could output a short hash of the public key, domain name, and the name_new hash. To keep things short, we would have to check the name's history to see if the hash matches any previous hashes and (if so) run it through the KDF one more time.

This would also help ameliorate the lack of revocation in our naming system.
DNS is much more than a key->value datastore.

indolering
Posts: 801
Joined: Sun Aug 18, 2013 8:26 pm
os: mac

Re: PROPOSAL: Name Epochs

Post by indolering »

Somewhat related to this discussion (insofar as I believe that part of the discussion that prompted this idea had to do with d/name and dd/name getting out of sync) is my proposal to allow owners of d/name to control the creation of d/name/child. We could just tie the child's registration period to the parent's.
DNS is much more than a key->value datastore.

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: PROPOSAL: Name Epochs

Post by biolizard89 »

indolering wrote:It seems like you are trying to specify a unique ID for each owner of the name, so why not just count the number of public keys that have owned the address?

If you are trying to tie things to the initial registration, we could output a short hash of the public key, domain name, and the name_new hash. To keep things short, we would have to check the name's history to see if the hash matches any previous hashes and (if so) run it through the KDF one more time.

This would also help ameliorate the lack of revocation in our naming system.
Every name_update generates a new public key, so I don't see how that would make any sense.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

indolering
Posts: 801
Joined: Sun Aug 18, 2013 8:26 pm
os: mac

Re: PROPOSAL: Name Epochs

Post by indolering »

biolizard89 wrote: Every name_update generates a new public key, so I don't see how that would make any sense.
Ahh, well I didn't know that and it certainly doesn't!
DNS is much more than a key->value datastore.

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: PROPOSAL: Name Epochs

Post by phelix »

biolizard89 wrote:
indolering wrote:It seems like you are trying to specify a unique ID for each owner of the name, so why not just count the number of public keys that have owned the address?

If you are trying to tie things to the initial registration, we could output a short hash of the public key, domain name, and the name_new hash. To keep things short, we would have to check the name's history to see if the hash matches any previous hashes and (if so) run it through the KDF one more time.

This would also help ameliorate the lack of revocation in our naming system.
Every name_update generates a new public key, so I don't see how that would make any sense.
You could count the firstupdates but Ryan's suggestion has the advantage of being independent from history.


Edge case: you can not always be sure of the epoch you get when registering. Should not matter too much, though.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

ryanc
Posts: 147
Joined: Wed Dec 18, 2013 8:10 pm
os: linux

Re: PROPOSAL: Name Epochs

Post by ryanc »

It is *mandatory* to use the name_firstupdate block instead of the name_new. This is because the time from name_new to when the name expires depends solely on when the name_firstupdate happens.

As phelix says, I chose this method because it is independent of whether or when the name had been registered in the past.

Midnightmagic pointed out on IRC that this scheme does not provide a way for changes of ownership (or name theft) to be made clear. If that is a problem we want to solve, I have some ideas about how to do that (mostly involving BIP32).

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: PROPOSAL: Name Epochs

Post by biolizard89 »

ryanc wrote:It is *mandatory* to use the name_firstupdate block instead of the name_new. This is because the time from name_new to when the name expires depends solely on when the name_firstupdate happens.

As phelix says, I chose this method because it is independent of whether or when the name had been registered in the past.

Midnightmagic pointed out on IRC that this scheme does not provide a way for changes of ownership (or name theft) to be made clear. If that is a problem we want to solve, I have some ideas about how to do that (mostly involving BIP32).
I don't want to make changes of ownership publicly identifiable because that would harm anonymity.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

Post Reply