You are here

GNUnet's Distributed Hash Table (DHT)

Primary tabs

GNUnet includes a generic distributed hash table that can be used by developers building P2P applications in the framework. This section documents high-level features and how developers are expected to use the DHT. We have a research paper detailing how the DHT works. Also, Nate's thesis includes a detailed description and performance analysis (in chapter 6).

Key features of GNUnet's DHT include:

  • stores key-value pairs with values up to (approximately) 63k in size
  • works with many underlay network topologies (small-world, random graph), underlay does not need to be a full mesh / clique
  • support for extended queries (more than just a simple 'key'), filtering duplicate replies within the network (bloomfilter) and content validation (for details, please read the subsection on the block library)
  • can (optionally) return paths taken by the PUT and GET operations to the application
  • provides content replication to handle churn

GNUnet's DHT is randomized and unreliable. Unreliable means that there is no strict guarantee that a value stored in the DHT is always found --- values are only found with high probability. While this is somewhat true in all P2P DHTs, GNUnet developers should be particularly wary of this fact (this will help you write secure, fault-tolerant code). Thus, when writing any application using the DHT, you should always consider the possibility that a value stored in the DHT by you or some other peer might simply not be returned, or returned with a significant delay. Your application logic must be written to tolerate this (naturally, some loss of performance or quality of service is expected in this case).