namecoin / namecoin-legacy

Legacy client. New version here: https://github.com/namecoin/namecoin-core Note the release branch! - Official website:
https://namecoin.org
MIT License
448 stars 177 forks source link

Lightweight resolver deployment roadmap: Spec and deploy SPV36 wire command #217

Open hlandau opened 9 years ago

hlandau commented 9 years ago

Issue created at the request of Indolering.

Probably the first step which should be taken in the deployment of Namecoin lightweight resolvers is to spec and, with the release of Namecore, deploy, a new wire command which allows lightweight clients to query for name transactions by name, i.e. something like:

getname(key) ->
  (name transaction, merkle branch proving inclusion in block, block header, block height)
| does-not-exist

The block header could be replaced with a hash and the block height omitted but I think it's better to include these things as they consume negligible bandwidth and maximize the flexibility of implementation of lightweight clients.

It should be noted that UTXO CB changes this protocol only mildly:

getname(key, depth) ->
  (name transaction, merkle branch proving inclusion in block, block header, block height,
   branch proving inclusion in UTXO set, coinbase transaction containing attestation value,
   merkle branch proving inclusion of coinbase transaction in block of $depth, block header, block height)
| does-not-exist.

Changes for NX CB change the does-not-exist response in a similar way.

If depth is fixed at 12 then this simplifies the above protocol accordingly.