Skip to content

Latest commit

 

History

History
165 lines (142 loc) · 5.03 KB

mochatestnetguide.md

File metadata and controls

165 lines (142 loc) · 5.03 KB
  • It is the installation guide for Mocha from scratch.

Hardware Requirements

  • Memory: 8 GB RAM
  • CPU: Quad-Core
  • Disk: 250 GB SSD Storage
  • Bandwidth: 1 Gbps for Download/100 Mbps for Upload

Update

sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y
sudo systemctl restart systemd-journald

Golang Install

ver="1.19.4"
cd $HOME
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
go version
  • When we write the go version, the following should come out as a result go version go1.19.4 linux/amd64

Mocha Files

cd $HOME
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app/
APP_VERSION=v0.11.0
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
cd $HOME
rm -rf networks
git clone https://github.com/celestiaorg/networks.git
  • celestia-appd version when you type aa, it should output 0.11.0

Mocha Settings

celestia-appd init "node-name" --chain-id mocha
cp $HOME/networks/mocha/genesis.json $HOME/.celestia-app/config
SEEDS="[email protected]:26656, 3f472746f46493309650e5a033076689996c8881@celestia-testnet.rpc.kjnodes.com:20659"
PEERS="[email protected]:26656,[email protected]:11656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:36656,[email protected]:11656,[email protected]:26656,[email protected]:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.celestia-app/config/config.toml

Configure Pruning

PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="10"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.celestia-app/config/app.toml

Reset Network

celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app

Snapshot

cd $HOME
rm -rf ~/.celestia-app/data
mkdir -p ~/.celestia-app/data
SNAP_NAME=$(curl -s https://snaps.qubelabs.io/celestia/ | \
    egrep -o ">mocha.*tar" | tr -d ">")
wget -O - https://snaps.qubelabs.io/celestia/${SNAP_NAME} | tar xf - \
    -C ~/.celestia-app/data/

Create Celestia-App Systemd File

sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-appd.service
[Unit]
Description=celestia-appd Cosmos daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$HOME/go/bin/celestia-appd start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Node Start

sudo systemctl enable celestia-appd
sudo systemctl start celestia-appd

Check If Daemon Has Been Started Correctly

sudo systemctl status celestia-appd
  • You can exit the status screen by pressing ctrl+c

Check Daemon Logs in Real Time

sudo journalctl -u celestia-appd.service -f

To check If Your Node is in Sync Before Going Forward

curl -s localhost:26657/status | jq .result | jq .sync_info

latest_block_height = compare its value with the explorer value. When they are identical to each other, synchronization to the system is complete.

Wallet

celestia-appd keys add walletname
celestia-appd keys add walletname --recover
  • Do not forget to save your wallet information (words)!
  • To get a test token, you must enter the Faucet section and type as follows. https://discord.gg/JeRdw5veKu

Create Validator

MONIKER="Validator Name"
VALIDATOR_WALLET="Wallet Name"
EVM_ADDRESS=You can add any Ethereum-based address
ORCHESTRATOR_ADDRESS=Validators certainly can use their existing Celestia addresses here but it is recommended to create a new one.


celestia-appd tx staking create-validator \
    --amount=1000000utia \
    --pubkey=$(celestia-appd tendermint show-validator) \
    --moniker=$MONIKER \
    --chain-id=mocha \
    --commission-rate=0.1 \
    --commission-max-rate=0.2 \
    --commission-max-change-rate=0.01 \
    --min-self-delegation=1000000 \
    --from=$VALIDATOR_WALLET \
    --orchestrator-address=$ORCHESTRATOR_ADDRESS \
    --evm-address=$EVM_ADDRESS \
    --fees=990utia \
    --gas=900000

Delegate to a Validator

celestia-appd tx staking delegate VALIDATOR_ADDRESS 1000000utia --chain-id mocha --fees=300utia --from walletname