curl -s localhost:15657/status | jq -r '.result.node_info | "\(.id)@'"$(curl -4 -s ifconfig.me)"':\(.listen_addr | split(":")[-1])"'
PEERS=$(curl -sS https://prysm-rpc.node9x.com/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | paste -sd, -)
echo $PEERS
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.prysm/config/config.toml
sudo systemctl stop prysmd
cp $HOME/.prysm/data/priv_validator_state.json $HOME/.prysm/priv_validator_state.json.backup
rm -rf $HOME/.prysm/data $HOME/.prysm/wasm
curl https://snapshot.node9x.com/prysm_testnet.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.prysm
mv $HOME/.prysm/priv_validator_state.json.backup $HOME/.prysm/data/priv_validator_state.json
sudo systemctl restart prysmd && sudo journalctl -u prysmd -f