Node Installation
Update system and install build tools
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
Install Go
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.22.4.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
Install Node
cd $HOME
rm -rf dungeonchain
git clone https://github.com/CryptoDungeon/dungeonchain
cd dungeonchain
git fetch --all
git checkout main
make install
dungeond version
Initialize Node
Replace NodeName with your own moniker.
dungeond init ApeironNodes --chain-id=dungeon-1
Download genesis
wget https://github.com/CryptoDungeon/dungeonchain/blob/main/network/dungeon-1/genesis.json.tar.gz
Copy genesis file
cp genesis.json ~/.dungeonchain/config/
Paste Peers to config
sudo nano .dungeonchain/config/config.toml
90bbe7348bb1738ef90d06fd4f25e626960c00b4@217.182.124.24:26656,3bf885de721fe07251a59824a8f30049ec297bfc@217.182.124.25:26656,9e585c60e600b592a8c67cbcc870f5e8c45d87f0@217.182.124.26:26656
Change external_address
value to contact your node using public ip of your node:
external_address
value to contact your node using public ip of your node:PUB_IP=`curl -s -4 icanhazip.com` sed -e "s|external_address = \".*\"|external_address = \"$PUB_IP:26656\"|g" ~/.dungeonchain/config/config.toml > ~/.dungeonchain/config/config.toml.tmp mv ~/.dungeonchain/config/config.toml.tmp ~/.dungeonchain/config/config.toml
Create Service
sudo tee /etc/systemd/system/dungeond.service > /dev/null <<EOF
[Unit]
Description=dungeond Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which dungeond) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable dungeond
Sync With Statesync
sudo systemctl stop dungeond
dungeond tendermint unsafe-reset-all --home ~/dungeonchain/ --keep-addr-book\
SNAP_RPC="https://rpc-dungeonchain.apeironnodes.com:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" ~/.dungeonchain/config/config.toml
more ~/.dungeonchain/config/config.toml | grep 'rpc_servers'
more ~/.dungeonchain/config/config.toml | grep 'trust_height'
more ~/.dungeonchain/config/config.toml | grep 'trust_hash'
Launch Node
sudo systemctl restart dungeond
journalctl -u dungeond -f
Last updated