status-go/vendor/github.com/status-im/rendezvous
Richard Ramos a9a87f39e5 chore: upgrade deps 2022-11-09 17:39:17 +03:00
..
protocol feat: obtain external address for rendezvous (#2333) 2021-09-06 09:46:35 -04:00
server chore: upgrade deps 2022-11-09 17:39:17 +03:00
.gitignore migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
.travis.yml migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
Dockerfile chore: bump go-waku (#2404) 2021-10-19 09:43:41 -04:00
Makefile migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
README.md migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
client.go chore: upgrade deps 2022-11-09 17:39:17 +03:00
stream.go chore: upgrade deps 2022-11-09 17:39:17 +03: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.