Skip to content

Commit

Permalink
READMEs updates toward 0.10.0 release (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykiselev authored Aug 2, 2022
1 parent 0383f0a commit 43178ac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 112 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ By default, the node is run as a MainNet node. To run a TestNet node put `testne
./node -state-path [path to node state directory] -blockchain-type testnet
```

Read more about [running the node as Linux service](https://github.com/wavesplatform/gowaves/tree/master/cmd/node#readme).

### How to set block generation

Go Node has two parameters which allow the loading of private keys from a wallet file.
Expand Down Expand Up @@ -162,10 +164,10 @@ Send the transaction to the network:

### What's done

* Full blockchain support of Waves version 1.3
* Full support of RIDE version 5
* RIDE DApp-to-DApp invocations
* Full blockchain support of Waves Protocol version 1.4
* Full support of RIDE version 6
* Full support of gRPC API
* Full support of Metamask API
* Block generation
* Partial and very limited support of REST API
* Fast and optimized import of blockchain
Expand All @@ -177,9 +179,8 @@ Send the transaction to the network:

### Future plans

* Full support of REST API
* Extensive integration testing
* RIDE v6, MetaMask support
* Full support of REST API

### Building from sources

Expand Down
124 changes: 17 additions & 107 deletions cmd/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,131 +33,41 @@ To start a TestNet node use the command below.
./node -state-path [path to node state directory] -peers 52.51.92.182:6863,52.231.205.53:6863,52.30.47.67:6863,52.28.66.217:6863 -blockchain-type testnet
```

## Start `node` as systemd service
## Running node on Linux

To turn `node` executable into a systemd service we have to create a unit service file at `/lib/systemd/system/waves.service`.
The content of the file that starts MainNet node is shown below.

```config
[Unit]
Description=Gowaves MainNet node
ConditionPathExists=/usr/share/waves
After=network.target
[Service]
Type=simple
User=waves
Group=waves
LimitNOFILE=1024
Restart=on-failure
RestartSec=60
startLimitIntervalSec=60
WorkingDirectory=/usr/share/waves
ExecStart=/usr/share/waves/node -state-path /var/lib/waves/ -api-address 0.0.0.0:8080
# make sure log directory exists and owned by syslog
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/waves
ExecStartPre=/bin/chown syslog:adm /var/log/waves
ExecStartPre=/bin/chmod 755 /var/log/waves
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=waves
[Install]
WantedBy=multi-user.target
```

Execute the following commands to create the user, and service file for MainNet.
The easiest way to run node on Linux is to install it from DEB package.
Download relevant DEB package from the [Releases](https://github.com/wavesplatform/gowaves/releases) page and install it with one of the following commands.

```bash
sudo useradd waves -s /sbin/nologin -M
sudo mv waves.service /lib/systemd/system/
sudo chmod 755 /lib/systemd/system/waves.service
sudo mkdir /usr/share/waves/
sudo chown waves:waves /usr/share/waves
sudo mkdir /var/lib/waves
sudo chown waves:waves /var/lib/waves
sudo cp node /usr/share/waves/
```

To enable, start and stop the service use commands:
sudo dpkg -i gowaves-mainnet-v0.10.0.deb

```bash
sudo systemctl enable waves.service
sudo systemctl start waves.service
sudo systemctl stop waves.service
sudo dpkg -i gowaves-testnet-v0.10.0.deb

sudo dpkg -i gowaves-stagenet-v0.10.0.deb
```

To check the logs use `journalctl` utility.
Corresponding `systemd` will be created.
To start and stop, for example, the MainNet service use:

```bash
sudo journalctl -u waves -f
```

To setup a TestNet node as a systemd service use the following file `waves-testnet.service` and execute the following commands.

```config
[Unit]
Description=Gowaves TestNet node
ConditionPathExists=/usr/share/waves-testnet
After=network.target
[Service]
Type=simple
User=waves-testnet
Group=waves-testnet
LimitNOFILE=1024
Restart=on-failure
RestartSec=60
startLimitIntervalSec=60
WorkingDirectory=/usr/share/waves-testnet
ExecStart=/usr/share/waves-testnet/node -state-path /var/lib/waves-testnet/ -api-address 0.0.0.0:8090 -peers 159.69.126.149:6863,94.130.105.239:6863,159.69.126.153:6863,94.130.172.201:6863 -blockchain-type testnet
# make sure log directory exists and owned by syslog
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/waves-testnet
ExecStartPre=/bin/chown syslog:adm /var/log/waves-testnet
ExecStartPre=/bin/chmod 755 /var/log/waves-testnet
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=waves-testnet
[Install]
WantedBy=multi-user.target
```
sudo systemctl start gowaves-mainnet.service

```bash
sudo useradd waves-testnet -s /sbin/nologin -M
sudo mv waves-testnet.service /lib/systemd/system/
sudo chmod 755 /lib/systemd/system/waves-testnet.service
sudo mkdir /usr/share/waves-testnet/
sudo chown waves-testnet:waves-testnet /usr/share/waves-testnet
sudo mkdir /var/lib/waves-testnet
sudo chown waves-testnet:waves-testnet /var/lib/waves-testnet
sudo cp node /usr/share/waves-testnet/
sudo systemctl stop gowaves-mainnet.service
```

```bash
sudo systemctl enable waves-testnet.service
sudo systemctl start waves-testnet.service
sudo systemctl stop waves-testnet.service
```
To check the logs use `journalctl` utility.

```bash
sudo journalctl -u waves-testnet -f
sudo journalctl -u gowaves-mainnet.service -f
```

## Building
## Building DEB packages

To build `node` execute the command:
To build DEB packages execute the command:

```bash
make release-node
```

The executable files are placed in `build/bin/[os-arch]` directories.
For example, Linux executable could be found at `build/bin/linux-amd64` directory.
The DEB files are placed in the `build/dist` folder.
For example, DEB package for MainNet will be named `gowaves-mainnet-0.10.0.deb`.

0 comments on commit 43178ac

Please sign in to comment.