# StateSync/Snapshot

## &#x20;                                           🔥Celestia🔥

## &#x20;                                             MAINNET

## [Node installation instructions](https://stavr-team.gitbook.io/nodes-guides/mainnets/celestia/validator-node)

## StateSync Celestia Mainnet

```bash
RPC="https://celestia.rpc.m.stavr.tech:443"
LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$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\"$RPC,$RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.celestia-app/config/config.toml
sudo systemctl stop celestia-appd && celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
wget -O $HOME/.celestia-app/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/refs/heads/main/Celestia/Mainnet/Node/addrbook.json"
sudo systemctl restart celestia-appd && sudo journalctl -fu celestia-appd -o cat
```

## SnapShot Mainnet - updated every 5 hours

{% hint style="success" %}
[`https://server-1.stavr.tech/Mainnet/Celestia/`](https://server-1.stavr.tech/Mainnet/Celestia/)
{% endhint %}

```sh
cd $HOME
snap install lz4
sudo systemctl stop celestia-appd
cp $HOME/.celestia-app/data/priv_validator_state.json $HOME/.celestia-app/priv_validator_state.json.backup
rm -rf $HOME/.celestia-app/data
LATEST_SNAPSHOT=$(curl -s https://server-1.stavr.tech/Mainnet/Celestia/ | grep -oE 'celestia-snap-[0-9]+\.tar\.lz4' | while read SNAPSHOT; do HEIGHT=$(curl -s "https://server-1.stavr.tech/Mainnet/Celestia/${SNAPSHOT%.tar.lz4}-info.txt" | awk '/Block height:/ {print $3}'); echo "$SNAPSHOT $HEIGHT"; done | sort -k2 -nr | head -n 1 | awk '{print $1}')
curl -o - -L https://server-1.stavr.tech/Mainnet/Celestia/$LATEST_SNAPSHOT | lz4 -c -d - | tar -x -C $HOME/.celestia-app
mv $HOME/.celestia-app/priv_validator_state.json.backup $HOME/.celestia-app/data/priv_validator_state.json
wget -O $HOME/.celestia-app/config/addrbook.json "https://server-1.stavr.tech/Mainnet/Celestia/addrbook.json"
sudo systemctl restart celestia-appd && journalctl -fu celestia-appd -o cat
```

## SnapShot Consensus Mainnet (Archive) updated every 5 days

{% hint style="success" %}
[`https://celestia-tools.stavr.tech/consensus/`](https://celestia-tools.stavr.tech/consensus/)
{% endhint %}

```bash
cd $HOME
snap install lz4
sudo systemctl stop celestia-appd
cp $HOME/.celestia-app/data/priv_validator_state.json $HOME/.celestia-app/priv_validator_state.json.backup
rm -rf $HOME/.celestia-app/data
curl -o - -L https://celestia-m.archive-snap.stavr.tech/celestia-m-archive.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.celestia-app
mv $HOME/.celestia-app/priv_validator_state.json.backup $HOME/.celestia-app/data/priv_validator_state.json
wget -O $HOME/.celestia-app/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/refs/heads/main/Celestia/Mainnet/Node/addrbook.json"
sudo systemctl restart celestia-appd && journalctl -fu celestia-appd -o cat
```

## Useful Tools

🔥EXPLORER-M🔥: [**https://explorer.stavr.tech/Celestia-Mainnet**](https://explorer.stavr.tech/Celestia-Mainnet) `Indexer "ON"`\
🔥EXPLORER-T🔥: [**https://explorer.stavr.tech/Celestia-Testnet**](/nodes-guides/mainnets.md) `Indexer "ON"`\
🔥API-M🔥: [**https://celestia.api.m.stavr.tech**](https://celestia.api.m.stavr.tech)\
🔥API-T🔥: [**https://celestia.api.t.stavr.tech**](https://celestia.api.t.stavr.tech)\
🔥RPC-M🔥: [**https://celestia.rpc.m.stavr.tech**](https://celestia.rpc.m.stavr.tech) `Snapshot-interval = 1000`\
🔥RPC-T🔥: [**https://celestia.rpc.t.stavr.tech**](https://celestia.rpc.t.stavr.tech) `Snapshot-interval = 1000`

&#x20;                                         **ARCHIVE NODE MAINNET**

* **api archive:** [**https://celestia.api-archive.m.stavr.tech:443**](https://celestia.api-archive.m.stavr.tech:443)
* **rpc archive:** [**https://celestia.rpc-archive.m.stavr.tech:443**](https://celestia.rpc-archive.m.stavr.tech:443)
* **grpc archive:** [**https://celestia.grpc-archive.m.stavr.tech:443**](https://celestia.grpc-archive.m.stavr.tech:443)

&#x20;                                         **ARCHIVE NODE TESTNET**

* **api archive:** [**https://celestia.api-archive.t.stavr.tech:443**](https://celestia.api-archive.t.stavr.tech:443)

* **rpc archive:** [**https://celestia.rpc-archive.t.stavr.tech:443**](https://celestia.rpc-archive.t.stavr.tech:443)

* **grpc archive:** [**https://celestia.grpc-archive.t.stavr.tech:443**](https://celestia.grpc-archive.t.stavr.tech:443)

* Peer-M

```bash
4fd28c0bd766193683cf9801441105d8878dd82c@celestia.peer.m.stavr.tech:11026
```

* Peer-T

```bash
d51838bb76758d58642c3a325ac664a964440bdf@celestia.peer.t.stavr.tech:10026
```

* Addrbook-m (every 2h)

```bash
wget -O $HOME/.celestia-app/config/addrbook.json "https://server-1.stavr.tech/Mainnet/Celestia/addrbook.json"
```

* &#x20;Addrbook-T (every 2h)

```python
wget -O $HOME/.celestia-app/config/addrbook.json "https://server-1.stavr.tech/Testnet/Celestia/addrbook.json"
```

* Genesis-M

```bash
wget -O $HOME/.celestia-app/config/genesis.json "https://server-1.stavr.tech/Mainnet/Celestia/genesis.json"
```

* Genesis-T

```bash
wget -O $HOME/.celestia-app/config/genesis.json "https://server-1.stavr.tech/Testnet/Celestia/genesis.json"
```

* Auto\_install\_script-M

```bash
source <(curl -s https://raw.githubusercontent.com/111STAVR111/props/refs/heads/main/Celestia/Mainnet/Node/celesm)
```

* Auto\_install\_script-T

```bash
source <(curl -s https://raw.githubusercontent.com/111STAVR111/props/main/Celestia/Testnet/Node/celest)
```

## &#x20;                                 🔥[Decentralization Info](https://github.com/111STAVR111/props/tree/main/Celestia/Mainnet/Decentralization)🔥

## &#x20;                                      🔥[RPC LOCATOR](https://github.com/111STAVR111/props/tree/main/Celestia/Mainnet)🔥

<details>

<summary>RPC Scanning</summary>

### We scan nodes in real time every 24 hours. And we provide the final result of RPC endpoints. We cannot influence the operation of these nodes in any way.

```python
If Voting Power is higher than 0 --> then the Node is a validator of the network and may be subject to attack and be a potential threat to the chain.
```

```python
We marked such validators with a red symbol
```

</details>

## [Json RAW](https://rpc-check.celesm.stavr.tech/celesm/rpc-celesm-result.json)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stavr-team.gitbook.io/nodes-guides/mainnets/celestia/validator-node/statesync-snapshot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
