Files
darkfi/bin/lilith
parazyd 55ee919906 net: Perform full p2p code cleanup and improve certain pieces.
Notable changes:

* Rewritten transport protocols into Dialer and Listener (Nym is TODO)

  This simplifies using the transports a lot, as can be seen for example
  in src/rpc, and generally around the p2p library. It also defines features
  for each transport (all of which are enabled by default). We drop the
  socks client for Tor and Nym and use first-class support with the Arti Tor
  library, and nym-sphinx/nym-websockets (to be used with nym-client).

* Outbound session healing

  The outbound session will now poll and try to fill all the requested
  slots more efficiently, and if needed, will activate peer discovery to
  find more peers if we can't connect to any known ones. Also if we're
  unable to connect to any, we shall drop them from our set.

  Additionally, transport mixing is enabled by default, so when we're
  allowing transport mixing, and we use Tor, we will also be able to connect
  to other transports that Tor can connect to (e.g. tcp://).

* Unix socket transport dropped

  We haven't been using this, and it seems we're not going down this path,
  so the code has been obsoleted and removed.

* TLS session verification

  We fully verify server and client TLS certificates upon connection so
  we're able to perform TLS1.3 with forward secrecy.

* lilith pruning

  lilith now periodically prunes known peers from its sets if it's unable
  to connect to them.
2023-06-29 13:13:15 +02:00
..

lilith

A tool to deploy multiple P2P network seed nodes for DarkFi applications with a single daemon.

Usage

lilith 0.4.1
Daemon that spawns P2P seeds


USAGE:
    lilith [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
    -v               Increase verbosity (-vvv supported)

OPTIONS:
        --accept-addrs <accept-addrs>...    Accept addresses (URL without port)
    -c, --config <config>                   Configuration file to use
        --hosts-file <hosts-file>           Hosts .tsv file to use [default: ~/.config/darkfi/lilith_hosts.tsv]
        --rpc-listen <rpc-listen>           JSON-RPC listen URL [default: tcp://127.0.0.1:18927]

On first execution, daemon will create default config file ~/.config/darkfi/lilith_config.toml. Configuration must be verified, and application networks should be configured accordingly.

Run lilith as follows:

$ lilith
[INFO] Found configuration for network: foo_network
[INFO] Starting seed network node for "foo_network" on ["tcp://0.0.0.0:18911"]
[INFO] [P2P] Seeding P2P subsystem
[WARN] [P2P] Skipping seed sync process since no seeds are configured.
[INFO] [P2P] Running P2P subsystem
[INFO] [P2P] Starting Inbound session #0 on tcp://0.0.0.0:18911
[INFO] [P2P] Starting 0 outbound connection slots.
[INFO] [P2P] P2P subsystem started
[INFO] Starting periodic host purge task for "foo_network"