MONIKER="YOUR_MONIKER_NAME"
sudo apt update && sudo apt upgrade -ysudo apt install curl build-essential git jq lz4 ncdu bashtop -y
cd $HOMEversion="1.22.5"wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo 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_profilesource $HOME/.bash_profile
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
cd $HOMEgit clone https://github.com/gitopia/gitopia.gitcd gitopiagit checkout v4.0.0make installgitopiad version --long | grep -e commit -e version
# Set node configurationgitopiad config chain-id gitopiagitopiad config keyring-backend filegitopiad config node tcp://localhost:15457 # Initialize nodegitopiad init $MONIKER --chain-id gitopia # Download genesis and addrbookcurl -Ls https://snapshots.moonbridge.team/mainnet/gitopia/genesis.json > $HOME/.gitopia/config/genesis.jsoncurl -Ls https://snapshots.moonbridge.team/mainnet/gitopia/addrbook.json > $HOME/.gitopia/config/addrbook.json # Set seeds and peersSEEDS=""PEERS=""sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.gitopia/config/config.toml # Setting minimum gas pricesed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.001ulore\"|" $HOME/.gitopia/config/app.toml # Setting pruningsed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.gitopia/config/app.tomlsed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.gitopia/config/app.tomlsed -i -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' $HOME/.gitopia/config/app.tomlsed -i -e 's|^pruning-interval *=.*|pruning-interval = "10"|' $HOME/.gitopia/config/app.toml # Disable indexersed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.gitopia/config/config.toml ## Enable Prometheussed -i -e "s/prometheus = false/prometheus = true/" $HOME/.gitopia/config/config.toml # Setting custom portssed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:15458\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:15457\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:15460\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:15456\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):15456\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":15466\"%" $HOME/.gitopia/config/config.tomlsed -i -e "s%:1317%:15417%g; s%:8080%:15480%g; s%:9090%:15490%g; s%:9091%:15491%g; s%:8545%:15445%g; s%:8546%:15446%g; s%:6065%:15465%g" $HOME/.gitopia/config/app.toml
mkdir -p $HOME/.gitopia/cosmovisor/genesis/binmkdir -p $HOME/.gitopia/cosmovisor/upgradescp $HOME/go/bin/gitopiad $HOME/.gitopia/cosmovisor/genesis/bin/
sudo tee /etc/systemd/system/gitopiad.service > /dev/null << EOF[Unit]Description=Gitopia NodeAfter=network-online.target [Service]User=$USERExecStart=$(which cosmovisor) run startRestart=alwaysRestartSec=5LimitNOFILE=65535Environment="DAEMON_NAME=gitopiad"Environment="DAEMON_HOME=$HOME/.gitopia"Environment="UNSAFE_SKIP_BACKUP=true"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"Environment="DAEMON_RESTART_AFTER_UPGRADE=true" [Install]WantedBy=multi-user.targetEOFsudo systemctl daemon-reloadsudo systemctl enable gitopiad
curl -o - -L https://snapshots.moonbridge.team/mainnet/gitopia/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -C $HOME/.gitopia[[ -f $HOME/.gitopia/data/upgrade-info.json ]] && cp $HOME/.gitopia/data/upgrade-info.json $HOME/.gitopia/cosmovisor/genesis/upgrade-info.json
sudo systemctl start gitopiad && sudo journalctl -u gitopiad -f --no-hostname -o cat
gitopiad keys add wallet
gitopiad q bank balances $(gitopiad keys show wallet -a)
gitopiad tx staking create-validator \ --amount 1000000ulore \ --pubkey $(gitopiad 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 gitopia \ --commission-rate 0.05 \ --commission-max-rate 0.20 \ --commission-max-change-rate 0.01 \ --min-self-delegation 1 \ --from wallet \ --gas-adjustment 1.4 \ --gas auto \ --gas-prices 0.001ulore \ -y
sudo systemctl stop gitopiadsudo systemctl disable gitopiadsudo rm -rf /etc/systemd/system/gitopiad.servicesudo systemctl daemon-reloadsudo rm -f $(which gitopiad)sudo rm -rf $HOME/.gitopiasudo rm -rf $HOME/gitopia