Remodification of ( @HerculesNode ) in conjuction with Official Docs
- CPU: 8-core CPU or equivalent
- Architecture: x86-64 (also known as x64, x86_64, AMD64, and Intel 64)
- RAM: 16 GB of RAM
- Operating System: Ubuntu 22.04.2 LTS or later (x86-64 compatible)
- Storage: 1 TB
- Network Bandwidth: 40 Mbps with a stable connection
To set up your Redbelly Node, run the following commands in your terminal:
sudo apt update
sudo apt install screen snapd net-tools cron curl unzip
sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
screen -S red
[email protected]
fqn=example.xyz
sudo certbot certonly --standalone -d $fqn. --non-interactive --agree-tos -m $email
sudo chown -R $USER:$USER /etc/letsencrypt/
Set your email (replace '[email protected]' with your actual email)
sudo ufw enable
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 8545
sudo ufw allow 1888
sudo ufw allow 1111
Node Url : domain name from namecheap Public address : first new metamask wallet Signing address : second new metamask wallet (private key of this needed) The below ports are recommended, however, make sure you supply the same port values in the node registration form which you will find in Node Registration defined in the next section:
- 8545: HTTP-RPC port
- 8546: WS-RPC port
- 1111: Recovery port
- 1888: Consensus port
To configure the config.yaml
file, open it using the nano
text editor. Run the following command in your terminal:
nano config.yaml
ip: <ENTER FULLY QUALIFIED DOMAIN NAME (FQDN) HERE>
id: <ENTER THE ID PROVIDED HERE>
genesisContracts:
bootstrapContractsRegistryAddress: 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5
consensusPort: 1888
grpcPort: 1111
privateKeyHex: <Private key for signing address for activity monitor>
poolConfig:
initCap: 5
maxCap: 30
idleTimeout: 180
clientKeepAliveConfig:
keepAliveTime: 1
keepAliveTimeOut: 20
serverKeepAliveConfig:
serverKeepAliveTime: 70
serverKeepAliveTimeOut: 10
minTime: 60
rpcPoolConfig:
maxOpenCount: 1
maxIdleCount: 1
maxIdleTime: 30
- ip: Set it to your domain name from namecheap (example.xyz) depending on your configuration.
- id: You will receive this ID by email after filling out the form.
- privateKeyHex: Use the private key of the wallet provided as the signing address in the form.
Download Node resources HERE
To initialize your Redbelly Node and create an observe.sh
script, follow these steps:
-
Create the
observe.sh
script using thetouch
command:touch observe.sh
-
Open the
observe.sh
script in thevim
text editor:vim observe.sh
-
Within the
vim
editor, you can add your Node initialization script. Pressi
to enter insert mode, paste below script, and pressEsc
to exit insert mode. -
Save and exit the
vim
editor by typing:wq
and pressingEnter
. -
These steps will create an empty
observe.sh
script and open it in thevim
editor for you to add your Node initialization script.
#!/bin/sh
# filename: observe.sh
if [ ! -d rbn ]; then
echo "rbn doesnt exist. Initialising redbelly"
mkdir -p rbn
mkdir -p consensus
cp config.yaml ./consensus
./binaries/rbbc init --datadir=rbn --standalone
rm -rf ./rbn/database/chaindata
rm -rf ./rbn/database/nodes
cp genesis.json ./rbn/genesis
else
echo "rbn already exists. continuing with existing setup"
cp config.yaml ./consensus
fi
# Run EVM
rm -f log
./binaries/rbbc run --datadir=rbn --consensus.dir=consensus --tls --consensus.tls --tls.cert=<PATH TO SSL CERTIFICATE> --tls.key=<PATH TO SSL CERTIFICATE KEY> --http --http.addr=0.0.0.0 --http.corsdomain=* --http.vhosts=* --http.port=8545 --http.api eth,net,web3,rbn --ws --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins="*" --ws.api eth,net,web3,rbn --threshold=200 --timeout=500 --logging.level info --mode production --consensus.type dbft --config.file config.yaml --bootstrap.tries=10 --bootstrap.wait=10 --recovery.tries=10 --recovery.wait=10
- Replace
PATH TO SSL CERTIFICATE
- Replace
PATH TO SSL CERTIFICATE KEY
rm -f log
./binaries/rbbc run --datadir=rbn --consensus.dir=consensus --tls --consensus.tls --tls.cert=/etc/letsencrypt/live/red.mztacat.xyz/fullchain.pem --tls.key=/etc/letsencrypt/live/red.mztacat.xyz/privkey.pem --http --http.addr=0.0.0.0 --http.corsdomain=* --http.vhosts=* --http.port=8545 --http.api eth,net,web3,rbn --ws --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins="*" --ws.api eth,net,web3,rbn --threshold=200 --timeout=500 --logging.level info --mode production --consensus.type dbft --config.file config.yaml --bootstrap.tries=10 --bootstrap.wait=10 --recovery.tries=10 --recovery.wait=10
To create and edit the start-rbn.sh
script, follow these steps:
- Create the
start-rbn.sh
script using thetouch
command:touch start-rbn.sh
- Open the
start-rbn.sh
script in thevim
text editor:vim start-rbn.sh
#!/bin/sh
# filename: start-rbn.sh
mkdir -p binaries
mkdir -p consensus
chmod +x rbbc
cp rbbc binaries/rbbc
mkdir -p logs
nohup ./observe.sh > ./logs/rbbcLogs 2>&1 &
- Save and exit the
vim
editor by typing:wq
and pressingEnter
.
These steps will create an empty start-rbn.sh
script and open it in the vim
editor for you to add your Redbelly Node start script.
chmod +x observe.sh
chmod +x start-rbn.sh
./start-rbn.sh
tail -f $HOME/logs/rbbcLogs
- Use the signing addres for faucet
Enter the following network details:
- Network name: Redbelly Network
- New RPC URL: (e.g., https://myredbellynode.com:8545)
- This is https://<FQDN without hostname and trailing '.'> followed by ':' and the RPC Port used while starting the Redbelly blockchain node.
- Chain ID: 152
- Currency symbol: RBNT
- Block explorer URL: https://explorer.devnet.redbelly.network/