Full Node Setup Guide
This guide provides instructions on how to setup a compute node to support the PocketNet blockchain network and Bastyon decentralized social media app. PocketNet Core node operators are rewarded in the platform cryptocurrency, PKOIN, by participating in a process called staking, which generates new blocks on the blockchain. More detail about the PocketNet network can be found at the whitepaper here
The Bastyon social media site can be visited at https://bastyon.com
Supported Operating Systems
The below operating systems have been validated to work with PocketNet Core software by the developer and node operator community:
-
Docker
-
Linux Debian Bullseye and Bookworm
-
Linux Mint Cinnamon
-
Linux Ubuntu 20.04 and 18.04
-
Windows 10
-
Windows 11
Minimum System Requirements
Below are the minimum system requirements to run a PocketNet node to use as a wallet, for coin staking to earn PKOIN, and to use as a local node on your home network. A node with these requirements may need to be upgraded within the next 1 - 2 years.
-
2 core x86-64 CPU
-
4GB RAM
-
150 GB harddrive
-
10 Mbps internet connection
Recommended System Requirements
The below system requirements are recommended for a node which will act as a public node to service the Bastyon front end, in addition to wallet, and coin staking capabilities. The recommended requirements should provide enough headroom to support the PocketNet network for at least 2 years into the future.
-
4 core x86-64 CPU
-
16 GB RAM
-
500 GB SSD Harddrive
-
100 Mbps internet connection
-
publicly accessible IP address and ports (see Network Setup below)
Linux Setup (Ubuntu, Debian, Mint, etc.)
Download the latest pocketnetcore_*_linux_x64_setup.deb
package from the project releases page at: https://github.com/pocketnetteam/pocketnet.core/releases
Install package with root privilegies. To do this, open the terminal in the directory where you downloaded the installer and execute the command:
$ sudo dpkg -i pocketnetcore_*_linux_x64_setup.deb
On Ubuntu and many Linux distributions it will be necessary to set the open files limit to 10000 in order to prevent errors. Run "ulimit -n" to view the current open file limit. Run below command to set ulimit to 10000 open files:
$ ulimit -n 10000
After installation, start the GUI pocketcoin client from the command line. (If you would like to run the PocketNet Core node from the command line or in headless mode, go to the "Running a Headless Node from the Command Line" section later in this document.)
$ pocketcoin-qt
At this point the PocketNet Core client will start synchornizing with the network. Depending on network performance full synchronization can take anywhere from a few days to over a week to complete. If it is necessary to bring a node up in a short period of time, it is possible to download a checkpoint following the instructions in the "Starting from Checkpoint" section. However, it is recommended to allow a node to synchronize with the network on it’s own as this validates the public block chain and provides additional security and decentralization.
If it is desired to run a full node to support the Bastyon front-end app, proceed to the Network Setup section.
Windows Setup
Download the pocketnetcore_*_win_x64_setup.exe
installer from the GitHub releases page here: https://github.com/pocketnetteam/pocketnet.core/releases
Run the installer and follow the instructions, change the installation location if necessary.
Start the PocketNet Core application from the Windows Start menu. A Windows Security Alert will pop up for Windows Defender Firewall. Select "Allow access" to allow PocketNet Core through the Windows Defender Firewall for Private networks.
At this point the PocketNet Core client will start synchornizing with the network. Depending on network performance full synchronization can take anywhere from a few days to over a week to complete. If it is necessary to bring a node up in a short period of time, it is possible to download a checkpoint following the instructions in the "Starting from Checkpoint" section below. However it is recommended to allow a node to synchronize with the network on it’s own as this validates the public block chain and provides additional security and decentralization.
Docker Setup
Make sure that enough CPU, memory and disk space are allocated to your Docker container according to the "Minimum System Requirements" section above. You can start your node with a single command from Docker.
$ docker run -d \
--name=pocketnet.main \
-p 37070:37070 \
-p 38081:38081 \
-p 8087:8087 \
-v /var/pocketnet/.data:/home/pocketcoin/.pocketcoin \
pocketnetteam/pocketnet.core:latest
The node can be controlled in Docker using the pocketcoin-cli and pocketcoin-tx commands demonstrated below:
$ docker ps --format '{{.ID}}\t{{.Names}}\t{{.Image}}'
ea7759a47250 pocketnet.main pocketnetteam/pocketnet.core:latest
$
$ docker exec -it pocketnet.main /bin/sh
$
$ pocketcoin-cli --help
$ pocketcoin-tx --help
More information: https://hub.docker.com/r/pocketnetteam/pocketnet.core
Starting Node from a Blockchain Snapshot
It is recommended to allow a PocketNet Core node to sync with the blockchain on it’s own to maximize network security and decentralization. If it is desired to bring up a node in a short amount of time, the development team provides periodic archives of the block chain which can be downloaded from https://snapshot.pocketnet.app/latest.tgz. Be sure to back up your wallet.dat file before attempting loading the blockchain from archive. The Linux bash shell commands below will delete the existing blockchain data on disk, download the blockchain archive, and extract it to the default location:
$ cd ~/.pocketcoin
$ rm -r blocks
$ rm -r chainstate
$ rm -r indexes
$ rm -r pocketdb
$ wget https://snapshot.pocketnet.app/latest.tgz
$ tar -xzf latest.tgz -C ./
Running a Headless Node From the Command Line
Running the pocketcoind command will start PocketNet core in text only mode from a command terminal. On Linux, it is possible to launch pocketcoind as a daemon process running in the background by using the -daemon parameter:
$ pocketcoind -daemon
To see other available options with pocketcoind:
$ pocketcoind -?
Commands can be sent to pocketcoind by using the pocketcoin-cli program. These same commands can also be run through the pocketcoin-qt debug terminal. Below are some common and useful commands.
Display list of available commands to send to the node:
$ pocketcoin-cli help
Get specific help on command name "command":
$ pocketcoin-cli help "command"
Send a command to the pocketcoind process to gracefully shutdown:
$ pocketcoin-cli stop
Display your current balance of PKOIN:
$ pocketcoin-cli getbalance
Generate a new receive address to have another party send PKOIN to (such as after buying PKOIN on an exchange) with a descriptive "label" to identify it later on:
$ pocketcoin-cli getnewaddress "label"
List receive addresses which have been previously generated or used on your node:
$ pocketcoin-cli listreceivedbyaddress
Send amount of PKOIN to "address":
$ pocketcoin-cli sendtoaddress "address" amount
View a report of the number of PKOINs won through staking by your node:
$ pocketcoin-cli getstakereport
View whether or not your node is currently staking:
$ pocketcoin-cli getstakinginfo
View a list of connected peers (useful to verify you are connected to the PocketNet network):
$ pocketcoin-cli getpeerinfo
Pocketcoin-cli has the capability to send commands to a remote node to enable remote managment and headless node operation. This is an advanced topic beyond the scope of this guide, however the pocketcoin-cli --help
lists necessary commands for remote operation.
Getting Help
If PocketNet Core fails in some manner, the first step is to check the debug.log file in the pocketcoin directory (~/.pocketcoin
on Linux, %HOMEPATH%\appdata\roaming\pocketcoin
on Windows). This can oftentimes provide clues as to what went wrong with the program.
Post to the Bastyon/Pocknet tag on the Bastion social media app to get help with node setup.
Join the Node Owners chat on Bastyon to connect with other node operators and keep up with developments and alerts! Message SnowflakeCrusher, Vortex_v, or Malaka on Bastyon to be added to the group.
To report software defects and view current issues check our GitHub issues page: https://github.com/pocketnetteam/pocketnet.core/issues
@Tawmaz on Bastyon for issues with this document.