diff --git a/doc/src/misc/ircd.md b/doc/src/misc/ircd.md index 3e3a4625b..db3e7a7f9 100644 --- a/doc/src/misc/ircd.md +++ b/doc/src/misc/ircd.md @@ -1,16 +1,20 @@ -# p2p IRC +# P2P IRC -This is a local daemon which can be attached to with any IRC frontend. -It uses the darkfi p2p engine to synchronize chats between hosts. +In DarkFi, we organise our communication using resilient and +censorship-resistant infrastructure. For chatting, `ircd` is a +peer-to-peer implementation of an IRC server in which any user can +participate anonymously using any IRC frontend and by running the +IRC daemon. `ircd` uses the DarkFi P2P engine to synchronize chats +between hosts. -## Install +## Installation ```shell % git clone https://github.com/darkrenaissance/darkfi % cd darkfi % make BINS=ircd -% make install BINS=ircd PREFIX=/home/XX/.local +% sudo make install BINS=ircd ``` ## Usage (Darkfi Network) @@ -36,33 +40,36 @@ Inside weechat run the following commands to connect to ircd: ### Seed Node -First you must run a seed node. The seed node is a static host which nodes can -connect to when they first connect to the network. The `seed_session` simply -connects to a seed node and runs `protocol_seed`, which requests a list of -addresses from the seed node and disconnects straight after receiving them. +First you must run a seed node. The seed node is a static host which +nodes can connect to when they first connect to the network. The +`seed_session` simply connects to a seed node and runs `protocol_seed`, +which requests a list of addresses from the seed node and disconnects +straight after receiving them. The first time you run the program, a config file will be created in -.config/darkfi. You must specify an inbound accept address in your config -file to configure a seed node: +.config/darkfi. You must specify an inbound accept address in your +config file to configure a seed node: ```toml ## P2P accept address inbound="127.0.0.1:11001" ``` -Note that the above config doesn't specify an external address since the -seed node shouldn't be advertised in the list of connectable nodes. The seed -node does not participate as a normal node in the p2p network. It simply allows -new nodes to discover other nodes in the network during the bootstrapping phase. +Note that the above config doesn't specify an external address since +the seed node shouldn't be advertised in the list of connectable +nodes. The seed node does not participate as a normal node in the +p2p network. It simply allows new nodes to discover other nodes in +the network during the bootstrapping phase. ### Inbound Node -This is a node accepting inbound connections on the network but which is not -making any outbound connections. +This is a node accepting inbound connections on the network but which +is not making any outbound connections. The external address is important and must be correct. -To run an inbound node, your config file must contain the following info: +To run an inbound node, your config file must contain the following +info: ```toml ## P2P accept address @@ -76,9 +83,10 @@ seeds=["127.0.0.1:11001"] ``` ### Outbound Node -This is a node which has 8 outbound connection slots and no inbound connections. -This means the node has 8 slots which will actively search for unique nodes to -connect to in the p2p network. +This is a node which has 8 outbound connection slots and no inbound +connections. This means the node has 8 slots which will actively +search for unique nodes to c +onnect to in the p2p network. In your config file: @@ -92,16 +100,17 @@ seeds=["127.0.0.1:11001"] ### Attaching the IRC Frontend -Assuming you have run the above 3 commands to create a small model testnet, -and both inbound and outbound nodes above are connected, you can test them -out using weechat. +Assuming you have run the above 3 commands to create a small model +testnet, and both inbound and outbound nodes above are connected, +you can test them out using weechat. To create separate weechat instances, use the `--dir` command: weechat --dir /tmp/a/ weechat --dir /tmp/b/ -Then in both clients, you must set the option to connect to temporary servers: +Then in both clients, you must set the option to connect to temporary +servers: /set irc.look.temporary_servers on @@ -114,6 +123,7 @@ And send messages to yourself. ### Running a Fullnode -See the script `script/run_node.sh` for an example of how to deploy a full node which -does seed session synchronization, and accepts both inbound and outbound -connections. +See the script `script/run_node.sh` for an example of how to deploy +a full node which does seed session synchronization, and accepts both +inbound and outbound c +onnections.