🧊Prysm
Network layer blockchain providing foundational infrastructure, enhanced connectivity, and scalability
Public Endpoints
RPC: https://prysm-rpc.validatorvn.com/
API: https://prysm-api.validatorvn.com/
gRPC: prysm-grpc.validatorvn.com:44090
WSS: wss://prysm-rpc.validatorvn.com/websocket
Snapshots (Daily at 2AM UTC)
sudo systemctl stop prysmd #or equivalent to your service names
mv $HOME/.prysm/data/priv_validator_state.json $HOME/.prysm/priv_validator_state.json.backup
rm -rf $HOME/.prysm/data
curl -L https://snapshot.validatorvn.com/prysm/data.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 start prysmd #or equivalent to your service names
Genesis & Addrbook files
curl -L https://snapshot.validatorvn.com/prysm/addrbook.json > $HOME/.prysm/config/addrbook.json
curl -L https://snapshot.validatorvn.com/prysm/genesis.json > $HOME/.prysm/config/genesis.json
Live Peers
URL="https://prysm-rpc.validatorvn.com/net_info"
response=$(curl -s $URL)
PEERS=$(echo $response | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):" + (.node_info.listen_addr | capture("(?<ip>.+):(?<port>[0-9]+)$").port)' | paste -sd "," -)
echo "PEERS=\"$PEERS\""
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.prysm/config/config.toml
Seeds
8685507ed33c029a5787275e9f3ea2b133d45d25@prysm-rpc.validatorvn.com:44656
State Sync
sudo systemctl stop prysmd
SNAP_RPC="https://prysm-rpc.validatorvn.com:443"
cp $HOME/.prysm/data/priv_validator_state.json $HOME/.prysm/priv_validator_state.json.backup
prysmd tendermint unsafe-reset-all --home ~/.prysm/ --keep-addr-book
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" ~/.prysm/config/config.toml
more ~/.prysm/config/config.toml | grep 'rpc_servers'
more ~/.prysm/config/config.toml | grep 'trust_height'
more ~/.prysm/config/config.toml | grep 'trust_hash'
sudo mv $HOME/.prysm/priv_validator_state.json.backup $HOME/.prysm/data/priv_validator_state.json
sudo systemctl restart prysmd && journalctl -u prysmd -f -o cat
Last updated