oars 1c9391b0b6 example/dchat/dchatd: DEP-0007: add network profiles to net setting section of the toml configs 1 سال پیش
..
example 1c9391b0b6 example/dchat/dchatd: DEP-0007: add network profiles to net setting section of the toml configs 7 ماه پیش
src 179211b2c7 bin,example/dchat,script: DEP-006: retrieve app_name and app_version from CARGO_PKG_NAME and CARGO_PKG_VERSION for use in net Version message 7 ماه پیش
Cargo.toml add9bb596c chore: Update crate dependencies 7 ماه پیش
README.md 6419c759eb dchat: add scripts to autorun a localnet deployment. useful for debugging net code. 1 سال پیش
dchatd_config.toml 1c9391b0b6 example/dchat/dchatd: DEP-0007: add network profiles to net setting section of the toml configs 7 ماه پیش

README.md

Dchat

A simple chat program to document DarkFi net code. Tutorial can be found in the DarkFi book.

Step 1: Spin a seed node

cd darkfi
make BINS=lilith
./lilith

You should see the following output:

Config file created in '"/home/USER/.config/darkfi/lilith_config.toml"'. Please review it and try again.

Add dchat to the config as follows, keeping in mind that the port number must match the seed specified in Alice and Bob's settings (see: main.rs).

[network."dchat"]
port = 50515
localnet = true

Now run lilith:

./lilith

Step 2: Using dchat

make BINS="dchat"

Run dchat as an inbound node:

./dchat a

Run dchat as an outbound node:

./dchat b

Logging

Dchat creates a logging file for the inbound node at /tmp/alice.log. Logging for the outbound node is found at /tmp/bob.log.

Tail them like so:

tail -f /tmp/alice.log

Or use multitail for colored output:

multitail -c /tmp/alice.log

Example Localnet

./example/seed.sh
./example/node1.sh
./example/node2.sh