28 lines
2.2 KiB
Markdown
28 lines
2.2 KiB
Markdown
This is an implementation of a distributed hash table (DHT) based on the Kademlia routing protocol. It is the final project submission for the lecture "Peer-to-peer Systems and Security" offered at the Technical University of Munich. More elaborate documentation is found in the final report handed in.
|
|
|
|
This is my first time using GO, expect some yet unpolished code and style inconsistencies.
|
|
|
|
This is a copy of the repository used for the submission, as the universities with all my projects gitLab is not publicly accessible.
|
|
|
|
Further points to be implemented:
|
|
- activate hashing keys before storing them (currently removed for debugging)
|
|
- add more checks whether nodes are still alive or not other than routing table buckets filling
|
|
|
|
|
|
# Running
|
|
To run an instance of the DHT, in needs to be called with `-c <path-to-config-file`. A config file has the following possible options:
|
|
- p2p_address (required): The address and port that the p2p-server of the instance will be reachable under
|
|
- api_address (required): The address and port that the api-server of the instance will be reachable under
|
|
- bootstrapper: The address and port of the bootstrapper's p2p-server. If this is left blank, the node will skip bootstrapping and assume it well be used as a bootstrapper by other nodes instead. This is needed for the first node to join/start the network.
|
|
Addresses are in the following form: `ipv4:port or [ipv6]:port`
|
|
- prefix_length: the amount of bits matched at each step in the routing table tree. Larger values mean more memory consumption but faster routing. If blank defaults to 5
|
|
- republish_interval: Time in seconds between checking held entries for republishing/expiring. If blank, defaults to 3600
|
|
- key_file (required): path for the nodes private key to be stored
|
|
- cert_file (required): path for the nodes certificate to be stored
|
|
- bootstrapper_cert (required when bootstrapper is set): Path where the bootstrapper's certificate can be found
|
|
|
|
# Testing
|
|
There are different docker-compose files available for testing. In general, we recommend using `composeLarge.yaml`. The related config files used can be found in shared_data/
|
|
|
|
The provided shell scripts run small scenarios of the DHT in action.
|