description |
---|
First Modular AI chain: Starting with the fastest programmable DA layer for AI dapps |
https://twitter.com/0G_labs
https://discord.gg/0glabs
wget https://raw.githubusercontent.com/ValidatorVN/GuideNode/main/0G/0g && chmod +x 0g && ./0g
https://og-api.validatorvn.com
https://og-rpc.validatorvn.com/
https://explorer.validatorvn.com/0g-Testnet
sudo systemctl stop 0gchaind
cp $HOME/.0gchain/data/priv_validator_state.json $HOME/.0gchain/priv_validator_state.json.backup
rm -rf $HOME/.0gchain/data
0gchaind tendermint unsafe-reset-all --home ~/.0gchain/ --keep-addr-book
curl https://snapshot.validatorvn.com/og/data.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.0gchain
mv $HOME/.0gchain/priv_validator_state.json.backup $HOME/.0gchain/data/priv_validator_state.json
sudo systemctl restart 0gchaind && sudo journalctl -u 0gchaind -f -o cat
sudo systemctl stop 0gchaind
cp $HOME/.0gchain/data/priv_validator_state.json $HOME/.0gchain/priv_validator_state.json.backup
0gchaind tendermint unsafe-reset-all --home ~/.0gchain/ --keep-addr-book
SNAP_RPC="https://ogd-rpc.validatorvn.com:443"
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\"|" ~/.0gchain/config/config.toml
more ~/.0gchain/config/config.toml | grep 'rpc_servers'
more ~/.0gchain/config/config.toml | grep 'trust_height'
more ~/.0gchain/config/config.toml | grep 'trust_hash'
sudo mv $HOME/.0gchain/priv_validator_state.json.backup $HOME/.0gchain/data/priv_validator_state.json
sudo systemctl restart 0gchaind && journalctl -u 0gchaind -f -o cat
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:14256,[email protected]:21656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:18456,[email protected]:31656,[email protected]:36656,[email protected]:27656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:14256,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
SEEDS=""
sed -i -e "s/^seeds =./seeds = "$SEEDS"/; s/^persistent_peers =./persistent_peers = "$PEERS"/" $HOME/.0gchain/config/config.toml
curl -L https://snapshot.validatorvn.com/og/addrbook.json > $HOME/.0gchain/config/addrbook.json
wget https://snapshot.validatorvn.com/og/0gchaind
chmod +x 0gchaind
mv 0gchaind /usr/local/bin/
0gchaind version