[bisq-network/bisq-docs] Updating the "How to Seednode" docs (#148)

Devin Bileck notifications at github.com
Sun Jul 28 07:43:38 UTC 2019


devinbileck approved this pull request.

utACK
Overall this looks good. Just some minor corrections. I am not familiar with the monitoring/collectd so cant comment much on that, but plan to incorporate it with my seeds in the future.
@m52go perhaps you can review for wording/structure?

>  
-A default seed node can be blocked by a network message in case the seed node does not fulfill the required quality.
+- find yourself a deputy in case you are on not available (travel, holiday, others, ...). Usually, on of the developers is there to help. Just inform them on your setup and all is good.
+- keep the server up and running, including patching and hardening the operating system
+- keep the seed node software up to date
+- keep an eye on the Bisq's communication channels for updates, issues, countermeasures,... (see <<Getting in Touch>>)
+- keep an eye on the logs of the seed node and the operating system, and act if something shows up
+- if necessary, report and escalate (see <<Getting in Touch>>)
+- set up a bond of 2000 BSQ to get the privilege to run a seed node. In case of severe failure of service, the bond gets confiscated (burned).

```suggestion
- set up a bond of 20000 BSQ to get the privilege to run a seed node. In case of severe failure of service, the bond gets confiscated (burned).
```

>  
-=== Duties of the seed node operator
+- file a compensation request over 200 BSQ for setting up a seed node
+- file a monthly compensation request. We define 50 BSQ per month as an appropriate compensation per seed node per month.
+
+[NOTE]
+====
+With the advent of the DAO and the subsequent need of another 400GB of ROM, the numbers here are currently under discussion. Until new figures are decided on, state your expenses for running the server and add the 50 BSQ on top to get your sum for compensation.

```suggestion
With the advent of the DAO and the subsequent need of an additional 300GB of disk space for the Bitcoin full node, the numbers here are currently under discussion. Until new figures are decided on, state your expenses for running the server and add the 50 BSQ on top to get your sum for compensation.
```

>  
+. Deliver the initial P2P network data like open offers, mailbox messages and arbitrators

Perhaps should also mention that they deliver the DAO state.

>  
+. Deliver the initial P2P network data like open offers, mailbox messages and arbitrators
+
+Being the gateways to the Bisq P2P network, seed nodes are among the first nodes a Bisq client connects to on each startup. Therefore, seed nodes have distinct properties:
+
+- Seed nodes face a heavy load and are therefore operated on servers offering a high level of reliability and better connectivity than a normal Bisq client.
+- A bad seed node can have a substantial impact on the Bisq network. A Bisq user may encounter anything from a longer startup time of her Bisq client (which is unconvenient but not critical) to missing messages sent to her by a trading partner or arbitrator while her Bisq client has been offline (which can lead to disputes, failed trades, blocking of the Bisq client and bad reputation of the Bisq client and therefore the user). 

```suggestion
- A bad seed node can have a substantial impact on the Bisq network. A Bisq user may encounter anything from a longer startup time of her Bisq client (which is inconvenient but not critical) to missing messages sent to her by a trading partner or arbitrator while her Bisq client has been offline (which can lead to disputes, failed trades, blocking of the Bisq client and bad reputation of the Bisq client and therefore the user). 
```

>  
+. Deliver the initial P2P network data like open offers, mailbox messages and arbitrators
+
+Being the gateways to the Bisq P2P network, seed nodes are among the first nodes a Bisq client connects to on each startup. Therefore, seed nodes have distinct properties:
+
+- Seed nodes face a heavy load and are therefore operated on servers offering a high level of reliability and better connectivity than a normal Bisq client.
+- A bad seed node can have a substantial impact on the Bisq network. A Bisq user may encounter anything from a longer startup time of her Bisq client (which is unconvenient but not critical) to missing messages sent to her by a trading partner or arbitrator while her Bisq client has been offline (which can lead to disputes, failed trades, blocking of the Bisq client and bad reputation of the Bisq client and therefore the user). 

I wonder if these points are really "properties" and perhaps this section should be reworked.

>  
+. Deliver the initial P2P network data like open offers, mailbox messages and arbitrators
+
+Being the gateways to the Bisq P2P network, seed nodes are among the first nodes a Bisq client connects to on each startup. Therefore, seed nodes have distinct properties:
+
+- Seed nodes face a heavy load and are therefore operated on servers offering a high level of reliability and better connectivity than a normal Bisq client.
+- A bad seed node can have a substantial impact on the Bisq network. A Bisq user may encounter anything from a longer startup time of her Bisq client (which is unconvenient but not critical) to missing messages sent to her by a trading partner or arbitrator while her Bisq client has been offline (which can lead to disputes, failed trades, blocking of the Bisq client and bad reputation of the Bisq client and therefore the user). 
+
+All in all, seed nodes are important for the Bisq network to function in a user-friendly way. Without the seed nodes, a fresh Bisq client would not find its way into the network, at least not without manual intervention. Bad seed nodes can make it harder for a fresh client to join the network. In the end, seed nodes allow new users easy access to the services of Bisq and should therefore be kept up and running.

```suggestion
All in all, seed nodes play a vital role in the Bisq network. They allow users easy access to the Bisq network and therefore must be kept online and available at all times. Without the seed nodes, a new Bisq client would not find its way into the network, at least not without manual intervention. Bad seed nodes can make it harder for a new client to join the network.
```

>  
-A default seed node can be blocked by a network message in case the seed node does not fulfill the required quality.
+- find yourself a deputy in case you are on not available (travel, holiday, others, ...). Usually, on of the developers is there to help. Just inform them on your setup and all is good.

```suggestion
- find yourself a deputy in case you are not available (travel, holiday, others, ...). Usually, one of the developers is there to help. Just inform them on your setup and all is good.
```

>  
-A default seed node can be blocked by a network message in case the seed node does not fulfill the required quality.
+- find yourself a deputy in case you are on not available (travel, holiday, others, ...). Usually, on of the developers is there to help. Just inform them on your setup and all is good.
+- keep the server up and running, including patching and hardening the operating system
+- keep the seed node software up to date
+- keep an eye on the Bisq's communication channels for updates, issues, countermeasures,... (see <<Getting in Touch>>)

```suggestion
- keep an eye on Bisq's communication channels for updates, issues, countermeasures,... (see <<Getting in Touch>>)
```

>  
 == System requirements for hosting machine
 
-. Min. 2 GB of RAM
-. 10 GB disk space (SSD)
-. 2 TB network traffic
-. UPS (uninterruptible power supply)
-. Uptime of > 99.9%
+- Min. 4 GB of RAM
+- 400 GB of disk space
+- 2 TB network traffic
+- Uptime of > 99.9%
+- > 10000 file handles available (check `ulimit -Sn`)
+
+And please try to stay away from cheap hosting providers! They tend to not care about QOS, the hardware is slow, the occasionally even turned a service off without warning - ask us how we know...

```suggestion
And please try to stay away from cheap hosting providers! They tend to not care about QOS, the hardware is slow, they occasionally even turned a service off without warning - ask us how we know...
```

> -. Min. 2 GB of RAM
-. 10 GB disk space (SSD)
-. 2 TB network traffic
-. UPS (uninterruptible power supply)
-. Uptime of > 99.9%
+- Min. 4 GB of RAM
+- 400 GB of disk space
+- 2 TB network traffic
+- Uptime of > 99.9%
+- > 10000 file handles available (check `ulimit -Sn`)
+
+And please try to stay away from cheap hosting providers! They tend to not care about QOS, the hardware is slow, the occasionally even turned a service off without warning - ask us how we know...
+
+## Get a seed node up and running
+
+You can run your seed node in many ways. The guide you are currently reading applies to a (debian-based) unix system with systemd available. Furthermore, we assume that only one seed node is operated per host. Please be aware that the guide is only a guide and not a step by step copy and paste how to, as we ignore for example the need for the occational root access and file permissions, swap, general opsec, among other things. In case your host differs from our reference system, we are sure you can handle yourself.

```suggestion
You can run your seed node in many ways. The guide you are currently reading applies to a (debian-based) unix system with systemd available. Furthermore, we assume that only one seed node is operated per host. Please be aware that the guide is only a guide and not a step by step copy and paste how to, as we ignore for example the need for the occasional root access and file permissions, swap, general opsec, among other things. In case your host differs from our reference system, we are sure you can handle yourself.
```

> +====
+
+=== Bitcoin Node
+
+Start by setting up a user for the bitcoin core stuff.
+
+	useradd -r -m bitcoind
+	cd /home/bitcoind
+
+Download the Bitcoin Core binaries https://bitcoin.org/en/download[here] to this directory, unpack it and, for updating convenience, create a symlink to the necessary binaries (so you only have to change the symlink on update):
+
+	tar xzf bitcoin-0.18.0-x86_64-linux-gnu.tar.gz
+	ln -s bitcoin-0.18.0/bin/bitcoind bitcoind
+	ln -s bitcoin-0.18.0/bin/bitcoin-cli bitcoin-cli
+
+Create a systemd service file `bitcoind.service` in the systemd service path or your operating system (something like `/usr/lib/systemd/system/`) and adapt it to your needs. We recommend to create a user `bitcoind` for service hardening reasons (). In the end, it should look like

```suggestion
Create a systemd service file `bitcoind.service` in the systemd service path for your operating system (something like `/usr/lib/systemd/system/`) and adapt it to your needs. We recommend to create a user `bitcoind` for service hardening reasons. In the end, it should look like
```

> +
+  #!/bin/sh
+  echo $1 | nc -w 1 127.0.0.1 5120
+
+and make it executable (`chmod +x /home/bitcoind/.bitcoin/blocknotify.sh`).
+
+Finally, enable and start the service
+
+  systemctl enable bitcoind.service
+  systemctl start bitcoind.service
+
+and observe the logs
+
+  journalctl --unit bitcoind --follow
+
+an check if anything works as expected.

```suggestion
and check if everything works as expected.
```

> +
+=== Bisq Seed Node
+
+Start by getting OpenJDK 10 up and running.
+
+For getting the Bisq binaries, we recommend cloning the Bisq Git repository and compiling the code on your server. This way, you have precise control over what version you want to deploy. Furthermore, updating is very simple, just pull the changes, recompile and restart your service.
+
+Furthermore, we recommend creating a user `bisq` in group `bisq` for service hardening reasons and using the `bisq`-users home directory to:
+
+  useradd -r -m bisq
+  cd /home/bisq
+  git clone git at github.com:bisq-network/bisq.git
+  cd bisq
+  ./gradlew build -x test
+
+Create a systemd service file `bisq-seednode.service` (or copy the one shipped with bisq `$bisqdir/seednode/bisq-seednode.service`) in the systemd service path or your operating system (something like `/usr/lib/systemd/system/`) and adapt it to your needs.

```suggestion
Create a systemd service file `bisq-seednode.service` (or copy the one shipped with bisq `$bisqdir/seednode/bisq-seednode.service`) in the systemd service path for your operating system (something like `/usr/lib/systemd/system/`) and adapt it to your needs.
```

> +  git clone git at github.com:bisq-network/bisq.git
+  cd bisq
+  ./gradlew build -x test
+
+Create a systemd service file `bisq-seednode.service` (or copy the one shipped with bisq `$bisqdir/seednode/bisq-seednode.service`) in the systemd service path or your operating system (something like `/usr/lib/systemd/system/`) and adapt it to your needs.
+
+In the end, your file should look something like
+
+----
+[Unit]
+Description=Bisq Seed Node
+After=network.target
+
+[Service]
+Environment="JAVA_OPTS=-Xms512M -Xmx2000M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.rmi.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
+ExecStart=/home/bisq/bisq/bisq-seednode --appName=bisq-seednode --nodePort=8000 --userDataDir=/home/bisq/ --maxConnections=50 --fullDaoNode=true --rpcUser=YOUR_USER_NAME --rpcPassword=YOUR_PW --rpcPort=8332 --rpcBlockNotificationPort=5120

Not sure if maxConnections 50 is too high. Typically we use 30.

>  
-You need to have the latest JDK installed according to the link:https://github.com/bisq-network/exchange/blob/master/doc/build.md[build.md] file.
+Keep an eye on the logs and see if anything works as expected:

```suggestion
Keep an eye on the logs and see if everything works as expected:
```

>  
-=== Step 3. Backup private key for onion address
+Configure the reverse proxy with clientssl enabled. You can simply append the snipped below to your `/etc/nginx/nginx.conf` file:

```suggestion
Configure the reverse proxy with clientssl enabled. You can simply append the snippet below to your `/etc/nginx/nginx.conf` file:
```

>  
-== Monitoring
+Start your nginx and observe the logs to see if anything works as expected:

```suggestion
Start your nginx and observe the logs to see if everything works as expected:
```

> +PrivateTmp=true
+ProtectSystem=full
+NoNewPrivileges=true
+PrivateDevices=true
+MemoryDenyWriteExecute=true
+
+[Install]
+WantedBy=multi-user.target
+----
+
+Create a file `/home/bitcoind/.bitcoin/bitcoin.conf` that contains
+
+----
+server=1
+txindex=1
+dbcache=1000

I am not familiar nor sure if this is necessary as none of my nodes specify this.

> +Download the Bitcoin Core binaries https://bitcoin.org/en/download[here] to this directory, unpack it and, for updating convenience, create a symlink to the necessary binaries (so you only have to change the symlink on update):
+
+	tar xzf bitcoin-0.18.0-x86_64-linux-gnu.tar.gz
+	ln -s bitcoin-0.18.0/bin/bitcoind bitcoind
+	ln -s bitcoin-0.18.0/bin/bitcoin-cli bitcoin-cli
+
+Create a systemd service file `bitcoind.service` in the systemd service path or your operating system (something like `/usr/lib/systemd/system/`) and adapt it to your needs. We recommend to create a user `bitcoind` for service hardening reasons (). In the end, it should look like
+
+----
+[Unit]
+Description=Bitcoind
+After=network.target
+
+[Service]
+ExecStart=bitcoind -daemon \
+                   -printtoconsole \

Is this desired?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq-docs/pull/148#pullrequestreview-267491627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190728/fa66fd4d/attachment-0001.html>


More information about the bisq-github mailing list