~40GB space needed for state
Actual X,P,C chains state for recent 100blocks.
Really cheap (~30$) to start own state-sync-node compared to BSC full-node (700$+).
Pending transactions is rare event. ~1-10% pending txes will be catched.
Not enough to become validator
2+cpu, 2+gb RAM, 60GB sdd.
t3.2xlarge, c5.xlarge, m5zn.large is enough.
m5zn sync time x2-3 times faster others (clock speed Ghz)
cd ~
sudo apt update
sudo apt install git golang -y
git clone https://github.com/ava-labs/avalanchego
cd avalanchego
./scripts/build.sh
mkdir -p ~ /.avalanchego/configs/chains/C
cat > ~ /.avalanchego/configs/node.json << EOF
{
"log-level": "trace",
"http-port": 9650,
"staking-port": 9651
}
EOF
cat > ~ /.avalanchego/configs/chains/C/config.json << EOF
{
"state-sync-enabled": true
}
EOF
Start state-sync node light
cd ~ /avalanchego/build
nohup ./avalanchego &; disown %1
tail -f nohup.out
Start state-sync node as service
cd ~ /avalanchego/build
cat > avax.service << EOF
[Unit]
Description=avax
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
Restart=on-failure
RestartSec=5s
WorkingDirectory=/home/ubuntu/avalanchego/build
ExecStartPre=/bin/chmod +x /home/ubuntu/avalanchego/build/avalanchego
ExecStart=/home/ubuntu/avalanchego/build/avalanchego
Type=simple
User=ubuntu
KillSignal=SIGINT
TimeoutStopSec=120
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable ~ /avalanchego/build/avax.service
sudo service avax start
service avax status