Skip to content

Install

Website

Twitter

Discord

GitHub

Explorer


Chain ID: galactica_9302-1 Latest Version: v0.2.7 Custom Port: 134
Section titled “Chain ID: Latest Version: Custom Port: ”
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
Section titled “Specify the name of your “MONIKER” (validator) which will be visible in the explorer”
MONIKER="YOUR_MONIKER_NAME"
sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu btop -y
cd $HOME
version="1.23.3"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
cd $HOME
git clone https://github.com/Galactica-corp/galactica
cd galactica
git checkout v0.2.7
make build
sudo mv $HOME/galactica/build/galacticad $HOME/go/bin
galacticad version --long | grep -e commit -e version
# Set node configuration
galacticad config set client chain-id galactica_9302-1
galacticad config set client keyring-backend test
galacticad config set client node tcp://localhost:13457
# Initialize node
galacticad init $MONIKER --chain-id galactica_9302-1
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.org/testnet/galactica/genesis.json > $HOME/.galactica/config/genesis.json
curl -Ls https://snapshots.moonbridge.org/testnet/galactica/addrbook.json > $HOME/.galactica/config/addrbook.json
# Set seeds and peers
SEEDS=""
PEERS=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.galactica/config/config.toml
# Setting minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"10agnet\"|" $HOME/.galactica/config/app.toml
# Setting pruning
sed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.galactica/config/app.toml
sed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.galactica/config/app.toml
sed -i -e 's|^pruning-interval *=.*|pruning-interval = "19"|' $HOME/.galactica/config/app.toml
# Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.galactica/config/config.toml
# Enable Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.galactica/config/config.toml
# Setting custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:13458\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:13457\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:13460\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:13456\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):13456\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":13466\"%" $HOME/.galactica/config/config.toml
sed -i -e "s%:1317%:13417%g; s%:8080%:13480%g; s%:9090%:13490%g; s%:9091%:13491%g; s%:8545%:13445%g; s%:8546%:13446%g; s%:6065%:13465%g" $HOME/.galactica/config/app.toml
mkdir -p $HOME/.galactica/cosmovisor/genesis/bin
mkdir -p $HOME/.galactica/cosmovisor/upgrades
cp $HOME/go/bin/galacticad $HOME/.galactica/cosmovisor/genesis/bin/
sudo tee /etc/systemd/system/galacticad.service > /dev/null << EOF
[Unit]
Description=Galactica Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --chain-id galactica_9302-1
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_NAME=galacticad"
Environment="DAEMON_HOME=$HOME/.galactica"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable galacticad
curl -o - -L https://snapshots.moonbridge.org/testnet/galactica/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -C $HOME/.galactica
[[ -f $HOME/.galactica/data/upgrade-info.json ]] && cp $HOME/.galactica/data/upgrade-info.json $HOME/.galactica/cosmovisor/genesis/upgrade-info.json
sudo systemctl start galacticad && sudo journalctl -u galacticad -f --no-hostname -o cat
galacticad keys add wallet
galacticad q bank balances $(galacticad keys show wallet -a)
galacticad tx staking create-validator \
--amount 1000000000000000000agnet \
--pubkey $(galacticad tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--security-contact "YOUR_EMAIL_ADDRESS" \
--chain-id galactica_9302-1 \
--commission-rate 0.10 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas 200000 \
--gas-prices 10agnet \
-y
sudo systemctl stop galacticad
sudo systemctl disable galacticad
sudo rm -rf /etc/systemd/system/galacticad.service
sudo systemctl daemon-reload
sudo rm -f $(which galacticad)
sudo rm -rf $HOME/.galactica
sudo rm -rf $HOME/galactica