dnet: add venv instructions to README and do minor edit

This commit is contained in:
lunar-mining
2023-11-13 13:36:13 +01:00
parent 04780f241b
commit 5cc1100b6e

View File

@@ -13,21 +13,47 @@ engine that makes everything run.
## Run
### Using a venv
Depending on your setup you may need to install a virtual environment
for Python. Do so as follows:
```shell
% git clone https://github.com/darkrenaissance/darkfi
% cd darkfi/bin/dnet
% python -m venv env
```
Then install the requirements:
```shell
% env/bin/pip install -r requirements.txt
```
Run dnet:
```shell
% env/bin/python main.py
```
### Without a venv
If you don't require a venv, install the requirements and run dnet as follows:
```shell
% pip install -r requirements.txt
% python main.py
```
Navigate up and down using the arrow keys. Type `q` to quit.
## Usage
The `dnet` config file can be found in `bin/dnet/config.toml`. You must
enter the RPC ports of the nodes you want to connect to and title them as
you see fit. You must also specify whether it is a `NORMAL` or a `LILITH`
node. The default config file uses localhost, but you can replace this
with hostnames or external IP addresses.
Navigate up and down using the arrow keys. Type `q` to quit.
## Config
The `dnet` config file can be found in `bin/dnet/config.toml`. Enter the
RPC ports of the nodes you want to connect to and title them as you see
fit. The default config file uses localhost, but you can replace this
with hostnames or external IP addresses. You must also specify whether
it is a `NORMAL` or a `LILITH` node.
## Logging