[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] DHT documentation

From: Christian Grothoff
Subject: Re: [GNUnet-developers] DHT documentation
Date: Sun, 3 Sep 2017 16:09:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 09/03/2017 03:10 PM, Moritz Warning wrote:
> Hi,
> I had a quick look without much success. But that was to be expected.
> Some tcpdump will probably help. :-)

Eh, no. Unless your tcpdump can break the GNUnet core encryption layer ;-).

> I need a DHT where I can find some peers that are 'near' a given hash.
> So that requirement is very simple.

Ah, I can answer that. The DHT does use this internally (like Kademlia)
to build its routing table (using XOR distance metric).  What you are
looking for is the logic related to #GNUNET_DHT_RO_FIND_PEER.  Note that
what we expose to the application might not be sufficient, as we so far
had no application that needed this. So right now, this is purely
internal logic, but there is no strict reason to keep it that way.
Patches welcome.

> Until now I use a Kademlia DHT used for BitTorrent..
> Some questions:
> - what is the peer id length of the DHT?

Well, peer ID in GNUnet are 256-bit Curve25519 points, or 255 bit of
entropy.  However, hashes in the DHT are 512 bit. We use SHA-512 to
derive a 512-bit DHT key from the Curve25519 point.

> - does participation in the DHT needs crypto routines?


> - is there a (minimal?) implementation that can be used outside of th gnunet 
> environment?


> - what is a bloom filter used in the DHT code for?

There are two Bloom filters. One to filter out duplicate results
("seen"), and a second one to avoid queries looping.

> - do peers have to support get/set methods?

I am not sure what you mean. DHT operations are called GET/PUT in
GNUnet. Obviously you can't use a DHT without those, so maybe I'm not
understanding your question.

> - what peer id metric is used (e.g. xor)?

Yes, XOR, like in Kademlia.

> - is the DHT protocol expected to change?

I have some minor plans for an experimental change (RO_BART) that was
scheduled to be attempted for the last 7-8 years, but we'd first have to
find out if it works.  Aside from that, there are plans for some
modifications to distinguish peers with different capabilities, but
those ought to be backwards-compatible as far as the DHT is concerned,
and affect the protocol only on the core layer (so one below DHT).

That said, given clear needs, changes are naturally possible.

Happy hacking!


> Thanks so far,
> Moritz
> On 09/03/17 14:21, Christian Grothoff wrote:
>> Hi!,
>> You can find the exact packet wire format in the code under
>>   src/dht/gnunet-service-dht_neighbours.c
>> You could also explain what you need, and maybe I can quickly answer
>> whether it can be done or not.
>> Happy hacking!
>> Christian
>> On 09/03/2017 01:45 PM, Moritz Warning wrote:
>>> Hi,
>>> I need some information about the gnunet DHT protocol.
>>> So far I have found only API documentation:
>>> Is there information about the packet structure used by the DHT and how 
>>> messages exchange works?
>>> I like to use the DHT for some other purpose and want to evaluate if that 
>>> is possible.
>>> thanks,
>>> mwarning
>>> _______________________________________________
>>> GNUnet-developers mailing list
>>> address@hidden
>> _______________________________________________
>> GNUnet-developers mailing list
>> address@hidden
> _______________________________________________
> GNUnet-developers mailing list
> address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]