gnunet-developers
[Top][All Lists]
Advanced

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

First milestone for "R5N (2021-02-038)"/Go implementation reached


From: Bernd Fix
Subject: First milestone for "R5N (2021-02-038)"/Go implementation reached
Date: Sat, 11 Jun 2022 18:29:26 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

Dear GNUnet community,

I am happy to announce the completion of the first milestone of the "Go implementation of the R5N DHT" for the NLnet-funded project "R5N (2021-02-038)". The implementation is not based on the current GNUnet DHT/Transport protocol, but on a new protocol defined in https://lsd.gnunet.org/lsd0004. The new specification corrects some design decisions in the old protocol and improves security in many places (e.g. signed DHT-PATHes and HELLOs).

The source code is written for Go1.18+ (it makes use of generics in some places); it can be found in the GNUnet Git-Repository at "https://git.gnunet.org/gnunet-go.git/"; with tag "v0.1.27" in the master branch. The code for Milestone 1 covers the following areas (the main source references are given in square brackets as a starting point):

# Defining and implementing base data structures:

## Routing table:

### K-Buckets:
  The code provides a Kademlia-like bucket implementation.
  [gnunet/dht/routingtable.go]

### network addresses:
  A generic, GNUnet-compatible address implementation based on URIs
  with many helpers (like thread-safe maps). [gnunet/util/address.go]

### distance metric:
  PeerAddress type [gnunet/dht/routingtable.go]

## Infrastructure messages

### add/update peers:
  A complete event signalling framework for transport layer events has
  been implemented. Listeners can define filters for events they are
  interested in. [gnunet/core/event.go]

# Defining and implementing base processes:

## Bootstrapping a node:
  Connect to the first node via HELLO URL or plain network address. The
  code implements HELLO messages, blocks and URLs as defined in the
  LSD0004 spec to send and receive HELLO messages (including signing
  and verification).
  [gnunet/core/core.go, gnunet/service/dht/blocks/hello.go]

## Message transport:
  The transport layer has been completely re-written from the previous
  version. It supports the "ip+udp" protocol and has a three tier layout
  (Endpoint/Transport/Core) to separate functionality. Currently only
  PacketEndpoints (UDP) are implemented.  [gnunet/transport/*.go]

## Persistence:
  A key/value store API [gnunet/service/store.go] for DHT blocks and
  stringed key/value pairs. DHT block storage is disk-based, whereas
  for string key/value pairs multiple implementations are avaiable
  (Redis,SQL). Eviction is based on expiry (mandatory) and the
  "lifeSpan * size / usedCount" ratio for optional removals.

## Block verification API:
  Verify methods incorporated into DHT query instances and DHT blocks
  [gnunet/service/dht/blocks/generic.go]

## Routing table lookup:
  The lookup methods as described in LSD0004 are implemented.
  [gnunet/service/dht/routingtable.go]


Please bear in mind that the code for this milestone compiles and run the unit tests, but it is not complete to run as a fully functional application. This is just the starting point for the next milestones; I hope to complete the next milestone in a rather short time.

If you have any questions or suggestions, please get back to me via email. I am happy to answer them in due time.

Happy hacking, Bernd.



reply via email to

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