Lite Client - for names only

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Lite Client - for names only

Post by domob »

phelix wrote:gmaxwell has some good points for sure but it would require quite some drastic changes.

Maybe we can make a lite client from the normal client with some small changes like this:
* don't check TXs
* regard all name_op TXs six blocks burried in the longest chain as valid
* discard all TXs, only save headers
If the light client is only about names, I even think that snailbrain's idea is good - this would allow one to implement a client from scratch that doesn't even need to deal with transactions at all (not even interpret name operations). Just download block headers to know about the longest chain, and just check that the hashed name-value database is in the Merkle tree. (Note, though, that I haven't ever implemented anything related to a Bitcoin/Namecoin client, so maybe I'm misjudging how much work this would be compared to a client as you describe it.)
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

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

Re: Lite Client - for names only

Post by biolizard89 »

@phelix: After the libcoin rebase, some significant changes will be made anyway (e.g. for the fee restructuring)... might as well do it all at once.

@domob: Would what you're talking about allow updating the database without downloading the whole thing again? IMO any solution to this should be able to handle updates as soon as they enter a block, otherwise websites will experience downtime when they change IP's, and (worse) websites will have security issues if they need to change a TLS certificate in an emergency.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Lite Client - for names only

Post by domob »

biolizard89 wrote:@domob: Would what you're talking about allow updating the database without downloading the whole thing again? IMO any solution to this should be able to handle updates as soon as they enter a block, otherwise websites will experience downtime when they change IP's, and (worse) websites will have security issues if they need to change a TLS certificate in an emergency.
No, it doesn't allow incremental updates; at least not in the most naive form described above. I think it is more useful as an intermediate step, while it would be possible for clients to download the full name index regularly. However, one could provide / timestamp the full index only from time to time (e. g., every 100th block), and provide "diff" files (in some form) for all blocks. That way, a client can stay up-to-date with minimal bandwidth requirement. We would need a good way to distribute both the full index and the diffs, which could be done as an additional request available in the P2P protocol.

I think this idea is relatively simple to implement, probably easier than what gmaxwell suggests; I haven't thought through his protocol in detail, though. So maybe we should go straight for the most flexible and comprehensive solution, that also allows for coin transactions, for instance. (By providing the full UTXO set.)
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

virtual_master
Posts: 541
Joined: Mon May 20, 2013 12:03 pm
Contact:

Re: Lite Client - for names only

Post by virtual_master »

I find the lite client idea very good. For names only in the browser.
http://namecoinia.org/
Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba | NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S

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

Re: Lite Client - for names only

Post by indolering »

My apologies for digging up such an old post, but you could just store an updateable bloom filter instead of a hash. A hash might be useful for an immediate NXDOMAIN check, but a bloom filter would enable the client to only check if a given name has been updated.

I'll quote from another thread I started:
Say we wanted to create a bloom filter that would track what domains have changed for all of the 250 million registered domains in the past hour. We could simply leave in the cache timings for domains with TTS less than an hour old. And the rule of thumb for DNS changeovers used to be ~1 day, that is kinda the maximum now.

Assuming that 1% of all domains change their records every hour we would need a bloom filter capable of categorizing 2,500,000 domains. Assuming we are comfortable with a 1% false positive "rate" (which is WAY lower in practice as 20% of the domains get 80% of the traffic) would would need ... *maths* ... 7 hash filters and a 2.86MB array to be transmitted every hour. And that is for the ENTIRE internet, including those domains with TTS <1 hour old.
DNS is much more than a key->value datastore.

Post Reply