The minimum and recommended requirements to run a Mainnet Persistence Node increase as it produces more blocks and more features are added. Thus, there are no exact hardware requirements that are permanently sufficient. A mainnet node should always have redundant resources available.
- Recommended:
- 16 GB RAM (or more)
- 500 GB SSD (or more)
- 4 CPU (or more)
- 100mbps Network Bandwidth (or more)
- Operating System:
- Recommended: Linux(x86_64)
- Others: Windows/MacOS(x86)
To successfully run a Persistence Mainnet Node, we need to install a few prerequirements. Because running the Persistence software depends on them, prerequirements are also known as dependencies.
We need to install and/or setup 5 dependencies - Go, jq, gcc, make, and git.
-
Remove any previous installation:
rm -rf /usr/local/go
-
Add the Go PPA to Your System:
First, add the
longsleep/golang-backports
PPA to your system. This repository contains the latest version of Go. You can add it by running the following command in your terminal:sudo add-apt-repository ppa:longsleep/golang-backports
-
Update Your Package List:
After adding the PPA, update your package list to include the latest packages available in the repository:
sudo apt update
-
Install Go:
Now, install Go using the
apt
package manager. This command will install the latest version of Go available in the PPA:sudo apt install golang-go
-
Set Up Your Go Environment:
After installation, set up your Go workspace and add Go binaries to your PATH. You can do this by adding the following lines to your~/.profile
file:echo "" >> ~/.profile echo "export GOPATH=$HOME/go" >> ~/.profile echo "export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin" >> ~/.profile source ~/.profile
-
Verify the Installation:
Finally, verify that Go has been installed correctly by checking its version. You should see the latest version of Go as the output:
go version
-
Install Homebrew (if not already installed): If you don't have Homebrew on your macOS, you need to install it first. Visit the Homebrew website for installation instructions.
-
Install Go using Homebrew:
Open a terminal and run the following command:brew install go
-
To ensure Go is installed correctly, check its version. In the terminal, type:
go version
- Install:
- Ubuntu:
apt install jq git gcc make
- macOS:
brew install jq git gcc make
- Ubuntu:
- Verify Installations:
- Verify jq:
jq --version
(sample output:jq-1.6
) - Verify gcc :
gcc --version
(sample output:gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
) - Verify make:
make --version
(sample output:GNU Make 4.2.1
) - Verify git:
git --version
(sample output:git version 2.25.1
)
- Verify jq:
Note The latest version available in the releases page might not be the one running on the core-1 chain. To ensure you're running the correct version, join the Discord Mainnet Validator Announcements Channel.
-
Clone the persistenceCore repository:
git clone https://github.com/persistenceOne/persistenceCore.git $GOPATH/source/persistenceCore && cd $GOPATH/source/persistenceCore
-
Check what version is running on the core-1 chain by visiting the Discord Mainnet Validators Announcements Channel.
-
Switch to the branch of the latest version (v6.1.0 as of time of writing):
git checkout v6.1.0
-
Install the persistenceCore binary:
make all
-
Verify installation (sample output:
v6.1.0
):persistenceCore version
-
Create key (ensure you safely store the mnemonic seed phrase):
persistenceCore keys add <KEY_NAME>
-
Recover key (you'll be required to input your mnemonic seed phrase):
persistenceCore keys add <KEY_NAME> --recover
-
Verify the key was created successfully:
persistenceCore keys list
-
Initialize the node (moniker = node name):
persistenceCore init <MONIKER> --chain-id="core-1" # e.g. persistenceCore init "Persistence Node" --chain-id="core-1"
-
Download the core-1 genesis file:
cd ~/.persistenceCore/config && wget -O genesis.json https://raw.githubusercontent.com/persistenceOne/networks/master/core-1/final_genesis.json
-
Use StateSync to sync with the rest of the nodes. Follow the step-by-step guide below:
-
Run the following command and copy the values of
trust_height
andtrust_hash
. They are required in the next steps.curl -s https://persistence-mainnet-rpc.cosmonautstakes.com/status | jq '.result .sync_info | {trust_height: .latest_block_height, trust_hash: .latest_block_hash} | values'
-
Open config:
nano ~/.persistenceCore/config/config.toml
-
Replace the existing settings in the opened file with the following:
[p2p] seeds = "[email protected]:26656" persistent_peers = "[email protected]:26756" [statesync] enable = true rpc_servers = "https://persistence-mainnet-rpc.cosmonautstakes.com:443,https://persistence-mainnet-rpc.cosmonautstakes.com:443" trust_height = XXXXXXX # Replace with the value copied in the previous step trust_hash = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" # Replace with the value copied in the previous step trust_period = "112h0m0s"
-
Make sure you replace
trust_height
andtrust_hash
values with the ones you've copied in the previous step.
-
-
Open the
app.toml
file (application-related configuration file):nano ~/.persistenceCore/config/app.toml
-
Change
minimum-gas-prices
tominimum-gas-prices = "0.005uxprt"
-
Start the node:
persistenceCore start
-
Because we used StateSync to sync with the other nodes, it shouldn't take more than 10 minutes to complete. In the meantime, a lot of output messages will pop one after another.
-
When the node is completely synced, you should observe a similar output:
11:28PM INF received complete proposal block hash=AE7196316065BC778E2BA5AFD1626C06CA2113B4F67DB2F4052B98700FD4B982 height=9305912 module=consensus 11:28PM INF finalizing commit of block hash={} height=9305912 module=consensus num_txs=0 root=7B6B6A7C6D2CC68F266086794995E52F321B69FCA9530220093C47EC383278D0 11:28PM INF minted coins from module account amount=8173386uxprt from=mint module=x/bank 11:28PM INF executed block height=9305912 module=state num_invalid_txs=0 num_valid_txs=0 11:28PM INF commit synced commit=436F6D6D697449447B5B3235312031313220323236203434203735203139322031362036312031373620373020323138203130332031383220313233203134302032332031353620313032203133392033342031393020323220343920313230203137322038203130372032313720313835203135322038332036345D3A3844464633387D 11:28PM INF committed state app_hash=FB70E22C4BC0103DB046DA67B67B8C179C668B22BE163178AC086BD9B9985340 height=9305912 module=state num_txs=0 11:28PM INF indexed block exents height=9305912 module=txindex
Alternatively, you can use the following command (response must be
false
):curl http://localhost:26657/status | jq -r ".result.sync_info.catching_up"