Enable ports on Firewall
Set up these ports on your firewall:
sudo ufw allow 26656/tcp
Check firewall status to see if the port has been enabled
sudo ufw status
Install Sentinel Hub
To install Sentinel Hub, please download the latest version from the repository and proceed by executing the following commands (the version as of 30 December 2024 is v12.0.0-rc8):
git clone https://github.com/sentinel-official/hub.git "${HOME}/sentinelhub"
cd "${HOME}/sentinelhub"
git checkout vX.X.X # Make sure to replace with the current version
make install
# For Ubuntu installation
sudo ln -s "${GOBIN}/sentinelhub" /usr/bin/sentinelhub
# For manual installation
sudo ln -s "${GOBIN}/sentinelhub" /usr/local/bin/sentinelhub
Configure Sentinel Hub
Genesis File
Let's initialize the Sentinel Hub using the Genesis file, a JSON file which defines the initial state of Sentinel blockchain. The state defined in the genesis file contains all the necessary information, like initial coin allocation, genesis time, default parameters, and more
sentinelhub init --chain-id bluenet-2-1 "Your Validator Name"
curl -fsLS -o "${HOME}/genesis.json" "https://raw.githubusercontent.com/sentinel-official/networks/main/bluenet-2-1/genesis.json"
cp "${HOME}/genesis.json" "${HOME}/.sentinelhub/config/genesis.json"
rm "${HOME}/genesis.json"
Edit the Node configuration file
Open the config.toml file
sudo nano ${HOME}/.sentinelhub/config/config.toml
Set seeds and peers separated by comma.
Seeds: are initial entry points for new nodes joining the network and are typically used during the bootstrap phase. In this phase, a new node connects to them to obtain information about the network's topology and to discover other nodes to connect to. The seeds you see below are taken from here
Peers*: are usually nodes that a given node wants to maintain a reliable and consistent connection with, often because they have specific roles in the network or are deemed important for communication. The below peers were taken by running the following command on the network:
curl -sS http://localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
${HOME}/.sentinelhub/config/config.toml
[p2p]
seeds = ""
persistent_peers = "5765c3c58643dd640b642fcd7c1e9fa1e9fbb16f@217.182.23.121:51056,ebc2c3b5a201b15a3096bb54637a5c85b8276ab6@45.157.11.146:51056,5fd16a5add7925a0c086ba6434a486a7d461b3f8@139.162.3.204:26656,7437c7563fff18c72aca659918a51e5a938d6b0e@139.162.57.160:26656"
If you plan to use State Sync (explained Run the Full Node) to run your node, simply set it to true in config.toml located at
${HOME}/.sentinelhub/config/config.toml:
[statesync]
enable = true
Add a system unit file
Open the sentinelhub.service with a text editor
sudo nano /etc/systemd/system/sentinelhub.service
Paste the below text into /etc/systemd/system/sentinelhub.service
[Unit]
Description=Sentinel Hub Daemon
After=network.target
[Service]
User=sentinel
Type=simple
# For Ubuntu installation
ExecStart=/usr/bin/sentinelhub start
# For Manual installation
ExecStart=/usr/local/bin/sentinelhub start
Restart=on-failure
StartLimitInterval=0
RestartSec=5
LimitNOFILE=1048576
LimitMEMLOCK=2048132
[Install]
WantedBy=multi-user.target
Let's make sure to assign ownership of all sentinelhub files to the current user (in our case, 'sentinel')
sudo chown -R sentinel:sentinel ~/.sentinelhub
Reload the systemd Daemon
sudo systemctl daemon-reload
Enable autostart of Sentinel Hub service
sudo systemctl enable sentinelhub.service