Go to file
Richard Ramos cc5be22bf8
chore: bump go-libp2p
2024-01-10 15:48:57 -04:00
cmd/server chore: upgrade deps 2022-11-04 07:46:24 +01:00
e2e chore: upgrade deps 2022-11-04 07:46:24 +01:00
prometheus Plug prometheus metrics from cmd/server 2018-09-12 10:18:39 +03:00
protocol feat: add request type to obtain IP address used for connecting to rendezvous 2021-09-06 09:48:29 -04:00
server chore: bump go-libp2p 2024-01-10 15:48:57 -04:00
.gitignore Implement rendevouz server 2018-06-26 10:40:04 +03:00
.travis.yml remove deprecated libp2p packages (#27) 2019-06-06 15:44:00 +03:00
Dockerfile update golang image in Dockerfile to 1.17.0-alpine 2021-08-23 20:08:43 +02:00
Makefile remove deprecated libp2p packages (#27) 2019-06-06 15:44:00 +03:00
README.md Add notes about differences with original rendezvous 2018-08-08 16:46:53 +03:00
client.go chore: upgrade deps 2022-11-04 07:46:24 +01:00
go.mod chore: bump go-libp2p 2024-01-10 15:48:57 -04:00
go.sum chore: bump go-libp2p 2024-01-10 15:48:57 -04:00
stream.go chore: upgrade deps 2022-11-04 07:46:24 +01:00

README.md

Rendezvous server

In order to build a docker image, run:

make image

Server usage:

  -a, --address string     listener ip address (default "0.0.0.0")
  -d, --data string        path where ENR infos will be stored. (default "/tmp/rendevouz")
  -g, --generate           dump private key and exit.
  -h, --keyhex string      private key hex
  -k, --keypath string     path to load private key
  -p, --port int           listener port (default 9090)
  -v, --verbosity string   verbosity level, options: crit, error, warning, info, debug (default "info")

Option -g can be used to generate hex of the private key for convenience. Option -h should be used only in tests.

The only mandatory parameter is keypath -k, and not mandatory but i suggest to change data path -d not to a temporary directory.

Differences with original rendezvous

Original rendezvous description by members of libp2p team - rendezvous. We are using current implementation for a similar purposes, but mainly as a light-peer discovery protocol for mobile devices. Discovery v5 that depends on the kademlia implementation was too slow for mobile and consumed noticeable amount of traffic to find peers.

Some differences with original implementation:

  1. We are using ENR (Ethereum Node Records) for encoding information about peers. ENR must be signed.
  2. We are using RLP instead of protobuf. Mainly for convenience, because ENR already had util for rlp serialization.
  3. Smaller liveness TTL for records. At the time of writing liveness TTL is set to be 20s. This way we want to provide minimal guarantees that peer is online and dialable.
  4. ENRs are fetched from storage randomly. And we don't provide a way to fetch "new" records. It was done as a naive measure against spamming rendezvous servers with invalid records. And at the same time spread load of new peers between multiple servers.
  5. We don't use UNREGISTER request, since we assume that TTL is very low.

Those are mostly implementation details while idea is pretty much the same, but it is important to note that this implementation is not compatible with one from libp2p team.