This document provides detailed instructions for setting up a validator node for the Studio Blockchain network using Hyperledger Besu with QBFT consensus.
- CPU: 4+ cores
- RAM: 8+ GB
- Storage: 100+ GB SSD (will grow over time)
- Network: Stable internet connection with 10+ Mbps
- Operating System: Ubuntu 20.04 LTS or later / Debian 11 or later
- Ports: 30303 (TCP/UDP) for P2P communication, 8545 (TCP) for RPC
apt-get update
apt-get upgrade -y
apt-get install -y openjdk-21-jdk jq curl tar wget gitgit clone https://github.com/StudioPlatforms/Studio-Mainnet.git
cd Studio-Mainnet/besu-qbftchmod +x deploy.sh deploy-local.sh package.shFor a new validator, run:
./deploy.sh <validator_number> <ip_address>Where:
<validator_number>is a unique number for your validator. Use 8 or higher, as numbers 1-7 are reserved for the initial validators.<ip_address>is the public IP address of your server where the validator will run.
For example:
./deploy.sh 8 203.0.113.10If you're deploying on the current server, you can use:
./deploy-local.shCheck if the validator service is running:
systemctl status besu-validatorView the logs:
journalctl -u besu-validator -fIf you prefer to install manually or need to customize the installation, follow these steps:
apt-get update
apt-get install -y openjdk-21-jdkapt-get install -y jq curl tar wgetwget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/25.4.1/besu-25.4.1.tar.gz
tar -xzf besu-25.4.1.tar.gz
mkdir -p /usr/local/bin/
cp -r besu-25.4.1/bin/besu /usr/local/bin/mkdir -p /opt/besu/data
mkdir -p /opt/besu/keyscp genesis.json /opt/besu/
cp static-nodes.json /opt/besu/data/For a new validator, generate a new key:
besu --node-private-key-file=/opt/besu/keys/nodekey public-key export --to=/tmp/publickey.txtOr copy an existing key:
cp Node-X/keys/nodekey /opt/besu/keys/Create a file at /etc/systemd/system/besu-validator.service with the following content:
[Unit]
Description=Besu Validator Node
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/besu \
--data-path=/opt/besu/data \
--genesis-file=/opt/besu/genesis.json \
--node-private-key-file=/opt/besu/keys/nodekey \
--rpc-http-enabled=true \
--rpc-http-api=ETH,NET,QBFT \
--rpc-http-cors-origins="*" \
--p2p-port=30303 \
--rpc-http-port=8545 \
--min-gas-price=1000 \
--min-priority-fee=1000 \
--nat-method=NONE
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable besu-validator
systemctl start besu-validatorMake sure the following ports are open:
- 30303 TCP/UDP: For P2P communication with other validators
- 8545 TCP: For RPC communication (optional, can be restricted to localhost)
For UFW:
ufw allow 30303/tcp
ufw allow 30303/udp
# Only if you need remote RPC access
# ufw allow 8545/tcpFor iptables:
iptables -A INPUT -p tcp --dport 30303 -j ACCEPT
iptables -A INPUT -p udp --dport 30303 -j ACCEPT
# Only if you need remote RPC access
# iptables -A INPUT -p tcp --dport 8545 -j ACCEPTIt's recommended to use a static IP address for your validator. If your server has a dynamic IP, consider using a service like DynDNS or setting up a static IP with your provider.
Check the validator status:
systemctl status besu-validatorView the logs:
journalctl -u besu-validator -fCheck the current block number:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8545Check the number of connected peers:
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' http://localhost:8545For advanced monitoring, consider setting up:
- Prometheus: For metrics collection
- Grafana: For visualization
- Alertmanager: For alerts
Regularly backup your validator keys:
cp /opt/besu/keys/nodekey /path/to/backup/Store the backup in a secure location.
If needed, you can backup the data directory:
tar -czf besu-data-backup.tar.gz /opt/besu/dataTo recover from a backup:
-
Stop the validator service:
systemctl stop besu-validator
-
Restore the keys:
cp /path/to/backup/nodekey /opt/besu/keys/
-
If needed, restore the data directory:
rm -rf /opt/besu/data mkdir -p /opt/besu/data tar -xzf besu-data-backup.tar.gz -C /
-
Start the validator service:
systemctl start besu-validator
-
Validator not connecting to peers:
- Check if the static-nodes.json file is correctly placed in the data directory
- Verify that port 30303 is open in your firewall
- Restart the validator service
-
Validator not producing blocks:
- Check if the validator is in the validator list
- Verify that the validator is connected to other validators
- Check the logs for any errors
-
RPC endpoint not responding:
- Verify that the validator service is running
- Check if port 8545 is open in your firewall
- Restart the validator service
To check the logs for errors:
journalctl -u besu-validator -n 100 | grep ERRORIf you encounter issues, try restarting the service:
systemctl restart besu-validatorTo upgrade Hyperledger Besu:
-
Stop the validator service:
systemctl stop besu-validator
-
Download and install the new version:
wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/NEW_VERSION/besu-NEW_VERSION.tar.gz tar -xzf besu-NEW_VERSION.tar.gz cp -r besu-NEW_VERSION/bin/besu /usr/local/bin/
-
Start the validator service:
systemctl start besu-validator
For questions or support, please contact:
- Email: office@studio-blockchain.com