installation
Last updated
Last updated
Network name: C4E | Chain ID: perun-1
| Latest version: v1.3.1
| Custom Port: 266
Replace YOUR_MONIKER_GOES_HERE with your validator name
MONIKER="YOUR_MONIKER_GOES_HERE"
Update system and install build tools
sudo apt -q update
sudo apt -qy install curl git jq zst build-essential
sudo apt -qy upgrade
Install Go
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.19.8.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
# Clone project repository
cd $HOME
rm -rf chain4energy
git clone https://github.com/chain4energy/c4e-chain chain4energy
cd chain4energy
git checkout v1.3.1
# Build binaries
make install
# Prepare binaries for Cosmovisor
mkdir -p $HOME/.c4e-chain/cosmovisor/genesis/bin
mv ~/go/bin/c4ed $HOME/.c4e-chain/cosmovisor/genesis/bin/
rm -rf build
# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.4.0
# Create service
sudo tee /etc/systemd/system/c4ed.service > /dev/null << EOF
[Unit]
Description=osmosis node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$HOME/.c4e-chain
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.c4e-chain"
Environment="DAEMON_NAME=c4ed"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.c4e-chain/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable c4ed
# Set node configuration
c4ed config chain-id perun-1
c4ed config node tcp://localhost:26657
# Initialize the node
c4ed init $MONIKER --chain-id perun-1
# Download genesis and addrbook
curl -Ls https://raw.githubusercontent.com/chain4energy/c4e-chains/main/perun-1/genesis.json > $HOME/.c4e-chain/config/genesis.json
curl -Ls https://snapshots.lavenderfive.com/addrbooks/chain4energy/addrbook.json > $HOME/.c4e-chain/config/addrbook.json
# Add seeds
seeds="8ac87f7f8da5c2a901d64f2c1e86f8b6ee39fef1@seed-m.c4e.apeironnodes.com:41003,edca3b826d61d1e5e7d3dc173954de1324f2e512@seed-m.c4e.apeironnodes.com:27003,30e98bbcf5bb29ed4e4ff685fa8fa84fa0ddff51@tenderseed.ccvalidators.com:26008,54515079bae4cadae2f9b511cffeb9447d4bc98d@c4e.seed.bccnodes.com:30656,86bd5cb6e762f673f1706e5889e039d5406b4b90@c4e.seed.node75.org:10156,54ca81dd509cc6160de7f4b479a96b341d8e830e@rpc.c4e.nodexcapital.com:13956,6da239cb4fe03d957cdb1fdc26af3d083a7f5945@seed.c4e.hexnodes.co:02656,9aa8a73ea9364aa3cf7806d4dd25b6aed88d8152@c4e.seed.mzonder.com:11256,fbf9a48eca1ba873ad766e2cb72a0562596a248f@c4e.seed.stavr.tech:17096,a85a651a3cf1746694560c5b6f76d566c04ca581@c4e-seed.takeshi.team:10256,ebc272824924ea1a27ea3183dd0b9ba713494f83@chain4energy-mainnet-seed.autostake.com:27276,8cb175d973c3c638a4e5d014c030d8599369419f@seeds.cros-nest.com:28656,5e71b5585d186cc32b9f071610f43042b445c05c@seeds.c4e.silentvalidator.com:39656,6b0ffcce9b59b91ceb8eea5d4599e27707e3604a@seeds.stakeup.tech:10210,6cb7ff21d19f139f4ca5e6e2a336e59d2857aba1@seeds.anode.team:10256,e47f4fa12187234dd205f51cb984c8235c3a3511@c4e-seeds.validatrium.club:26656,3ef7e5e7e163500af9baf53480779448461dac18@185.245.182.192:46656,0d1a44cc32e927dd062e0fd45d21475f9836e73d@89.117.58.109:26656,d81f51b4a1aae66792fb1717589fa28975f328b0@164.68.125.243:26656,2e08beed75525c2d583e6413fa5f090801965aba@c4e.doubletop:30655,6f181c91dee34ebf2ea5c4f951c51b8c2c897702@c4e.seed.kalia.network:30656,8739107d0484a4c58c4f980d61f488655597f80c@seed.c4e.validatus.com:2000,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656"
sed -i -e "s|^seeds *=.*|seeds = \"$seeds\"|" $HOME/.c4e-chain/config/config.toml
# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0uc4e\"|" $HOME/.c4e-chain/config/app.toml
# Set pruning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.c4e-chain/config/app.toml
# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:26658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:26657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:26660\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:26656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":26666\"%" $HOME/.c4e-chain/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:26617\"%; s%^address = \":8080\"%address = \":26680\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:26690\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:26691\"%; s%:8545%:26645%; s%:8546%:26646%; s%:6065%:26665%" $HOME/.c4e-chain/config/app.toml
sudo systemctl start c4ed && sudo journalctl -u c4ed -f --no-hostname -o cat
To catch up quickly, you can either use a snapshot or state sync