How To Run Celestia Node ? Detailed Tutorial !!
š¤ BlokDrops Socials :
BlokDrops | Telegram #ANN | Community | Twitter
Join Private Group ā https://t.me/+_dqEiYHP7WY5N2Nl
Join this we will help you in by solving your doubts and Stay tuned with regular updates. We are 5 admins helping community.
What is Celestia :
Celestia is a modular consensus and data network, built to enable anyone to easily deploy their own blockchain with minimal overhead. Celestia provides consensus and security on-demand, enabling anyone to deploy a blockchain without the overhead of bootstrapping a new consensus network.
About Mamaki Testnet :
Mamaki is a milestone in Celestia, allowing everyone to test out core functionalities on the network. The Celestia testnet, codenamed Mamaki, will serve as an upgraded version of the now-retired devnet, featuring many new enhancements and bug fixes. Please note that Mamaki is not Celestiaās incentivized testnet, which is planned closer to mainnet.
Setting Up Celestia Node For Mamaki Testnet :-
1. Purchase VPS
I will suggest you to order your VPS on Contabo
Link :- https://contabo.com/
Choose Most Popular Plan
Options to choose :- 1 Month >> European >> 400 GB >> Ubuntu 20.04 >> Generate Password >> Next
After it click on Next
And Now enter your details like name address and all!
Click Next and Now complete the transaction.
Once you have complete your order. You will receive a first email.
After it you will receive a mail which contain your IP.
For me its takes approx 6 hours
And right now when I am writing this Contabo is down !!
2. Connect Your VPS
For Windows :-
Now we have to connect our IP , for this we use Putty.
Link :- https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe
Now,
- Paste server IP to āHost Nameā and click āOpenā
- In the opened tab, write the command:
root
; - Press āEnterā and paste the password from the server, then āEnterā
Note :- Password will never we displayed , Just type and press āEnter ā
For MacOS :-
On macOS, launch the Terminal.
- Enter the server with the command (change IP_ADDRESS to the server IP):
ssh root@IP_ADDRESS
- Next, enter āyesā, press āEnter,ā and paste the server password (the icon with the key will hide the entered password). Press āEnterā.
You can use a VPS that you already have also. Make sure you are not running any other node on that or these two might clash and both may fail to stay awake.
3. Installing Dependencies :-
Letās Update The Packages :
Copy the commands that are in the grey box and paste them in Putty your whatever method you are using to connect to your VPS.
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu -y
Celestia-app and celestia-node are written in Golang so we must install Golang to build and run them. Run the following :
cd $HOME
ver="1.18.3"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
Press Enter.
To check if Go was installed correctly run:
go version
The output should be as following :
4. Installing Celestia App :
The steps below will create a binary file named celestia-appd
inside $HOME/go/bin
folder which will be used later to run the node. Run the following :
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
git checkout v0.6.0
make install
This part takes a bit of time.
To check if it has been installed successfully :
celestia-appd version
Now, clone the following file by running :
git clone https://github.com/celestiaorg/networks
5. Setting up P2P Network :
cd $HOME
rm -rf networks
git clone https://github.com/celestiaorg/networks.git
Set variables by running the following and replacing NODE_NAME and WALLET_NAME :
CELESTIA_NODENAME="NODE_NAME"
CELESTIA_WALLET="WALLET_NAME"
CELESTIA_CHAIN="mamaki"
For Example :
CELESTIA_NODENAME="DuhItsAniketNode"
CELESTIA_WALLET="DuhItsAniketWallet"
CELESTIA_CHAIN="mamaki"
Save the above created Variables by running this:
echo 'export CELESTIA_CHAIN='$CELESTIA_CHAIN >> $HOME/.bash_profile
echo 'export CELESTIA_NODENAME='${CELESTIA_NODENAME} >> $HOME/.bash_profile
echo 'export CELESTIA_WALLET='${CELESTIA_WALLET} >> $HOME/.bash_profile
source $HOME/.bash_profile
To initialize the network, run this :
celestia-appd init $CELESTIA_NODENAME --chain-id $CELESTIA_CHAIN
Copy the genesis.json file :
cp $HOME/networks/mamaki/genesis.json $HOME/.celestia-app/config/
6. Setting Up Validator Node :
sed -i 's/mode = \"full\"/mode = \"validator\"/g' $HOME/.celestia-app/config/config.toml
7. Setting up seeds and peers :
BOOTSTRAP_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/mamaki/bootstrap-peers.txt | tr -d '\n')
To check if it has been done successfully :
echo $BOOTSTRAP_PEERS
Now, run this :
sed -i.bak -e "s/^bootstrap-peers *=.*/bootstrap-peers = \"$BOOTSTRAP_PEERS\"/" $HOME/.celestia-app/config/config.toml
Run this :
sed -i 's/timeout-commit = ".*/timeout-commit = "25s"/g' $HOME/.celestia-app/config/config.toml
sed -i 's/peer-gossip-sleep-duration *=.*/peer-gossip-sleep-duration = "2ms"/g' $HOME/.celestia-app/config/config.toml
8. Set P2P Configuration Option :
max_num_inbound_peers=40
max_num_outbound_peers=10
max_connections=50
Also run :
sed -i -e "s/^use-legacy *=.*/use-legacy = false/;\
s/^max-num-inbound-peers *=.*/max-num-inbound-peers = $max_num_inbound_peers/;\
s/^max-num-outbound-peers *=.*/max-num-outbound-peers = $max_num_outbound_peers/;\
s/^max-connections *=.*/max-connections = $max_connections/" $HOME/.celestia-app/config/config.toml
9. Configuring pruning and snapshots :
Letās configure pruning first.
pruning_keep_recent="100"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/;\
s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/;\
s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.celestia-app/config/app.toml
Run this to set snapshot-interval :
sed -i 's/snapshot-interval *=.*/snapshot-interval = 0/' $HOME/.celestia-app/config/app.toml
10. Reset :
This will delete all data folders so we can start fresh:
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
11. Configuring Client :
celestia-appd config chain-id $CELESTIA_CHAIN
celestia-appd config keyring-backend test
12. Creating and Running Services :
tee $HOME/celestia-appd.service > /dev/null <<EOF
[Unit]
Description=celestia-appd Cosmos daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which celestia-appd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo mv $HOME/celestia-appd.service /etc/systemd/system/
sudo systemctl enable celestia-appd
sudo systemctl daemon-reload
sudo systemctl restart celestia-appd && journalctl -u celestia-appd -f -o cat
Press CTRL + C to stop the logs
13. Quick Syncing and Starting Celestia App:
Letās stop celestia-appd by running :
sudo systemctl stop celestia-appd
Letās go ahead and download the majority of the blocks for sync :
cd $HOME
rm -rf ~/.celestia-app/data
mkdir -p ~/.celestia-app/data
SNAP_NAME=$(curl -s https://snaps.qubelabs.io/celestia/ | \
egrep -o ">mamaki.*tar" | tr -d ">")
wget -O - https://snaps.qubelabs.io/celestia/${SNAP_NAME} | tar xf - \
-C ~/.celestia-app/data/
This is going to take some time. Your node is downloading blocks from Celestia Blockchain.
After this is done, run the following :
sudo systemctl restart celestia-appd && journalctl -u celestia-appd -f -o cat
Press CTRL + C to stop the logs
Before continuing, lets make sure your node is fully synced with the network. Run this :
curl -s localhost:26657/status | grep block_height
You can run the above command ( curl -s localhost:26657/status | grep block_height ) again and again to check if your node has caught up with the network or not. Only proceed after you get false there.
Note : If your synchronization stops and is not proceeding further, do this :
sudo systemctl stop celestia-appd
and then,
sudo systemctl restart celestia-appd && journalctl -u celestia-appd -f -o cat
Also, proceed only further when the blocks are in SYNC. Check it through :
curl -s localhost:26657/status | grep block_height
14. Wallet and Faucet :
Letās create a wallet and get some faucet. Run the following :
celestia-appd keys add $CELESTIA_WALLET
Do store this information in a notepad file.
Now, letās save these values in Variables.
CELESTIA_ADDR=$(celestia-appd keys show $CELESTIA_WALLET -a)
echo $CELESTIA_ADDR
echo 'export CELESTIA_ADDR='${CELESTIA_ADDR} >> $HOME/.bash_prof
CELESTIA_VALOPER=$(celestia-appd keys show $CELESTIA_WALLET ā bech val -a)
echo $CELESTIA_VALOPER
echo 'export CELESTIA_VALOPER='${CELESTIA_VALOPER} >> $HOME/.bash_profile
source $HOME/.bash_profile
Letās get some faucet. Go to Celestiaās Discord and head towards #š°ļ½mamaki-faucet channel.
Now, type $request <wallet> . Replace <wallet> with your wallet address that you stored in notepad above. For Example :
Youāll get some response like :
You can claim again after 7-Days. You can check your balance like this :
celestia-appd q bank balances $CELESTIA_ADDR
15. Creating Validator
celestia-appd tx staking create-validator \
ā amount=9000000utia \
ā pubkey=$(celestia-appd tendermint show-validator) \
ā moniker=$CELESTIA_NODENAME \
ā chain-id=$CELESTIA_CHAIN \
ā commission-rate=0.1 \
ā commission-max-rate=0.2 \
ā commission-max-change-rate=0.01 \
ā min-self-delegation="1" \
ā from=$CELESTIA_WALLET
Press y and Enter.
Done. Your node is up and running.
To check the status of your node, click here. Type in your node name. If it doesnāt show in Active field, check in Inactive.
Itās showing Inactive as I donāt have enough tokens staked. Its inactive because they have 150 active validators already .The staked amount determines you are active or not. And we canāt have more through the faucet because limitation is one request each 7 days. Donāt worry. Your Node is still running.
Cheers.
Guys donāt forget to clap max on this tutorial pls it takes hardwork.
Thanks its done for today.
Donāt forget to follow admin and join telegram for fastest update. lol
Link :- telegram.me/Blokhash
Link : telegram.me/Blokdrops
š¤ BlokDrops Socials :
BlokDrops | Telegram #ANN | Community | Twitter
Join Private Group ā https://t.me/+_dqEiYHP7WY5N2Nl