# Geth database snapshot

This archive contains only `geth/chaindata`, including ancient data. It does not contain the importer database, credentials, JWT secret, or node identity. It is not a complete rollup node deployment. Advancing the chain requires a compatible Ethscriptions importer and its own configuration/state.

Use the Linux AMD64 image pinned in `manifest.json`. This is the Ethscriptions Geth fork; an arbitrary upstream Geth release is not a substitute. The database uses hash state and archive mode. Production's history flags are recorded in the manifest.

Download `geth-snapshot.tar.zst`, `geth-snapshot.tar.zst.sha256`, `manifest.json`, and `ethscriptions-mainnet.json` into one directory. Allow room for the compressed file plus the uncompressed database. Check the manifest for both sizes; the uncompressed database is approximately 720 GiB.

Verify and extract into a new empty directory:

```bash
sha256sum -c geth-snapshot.tar.zst.sha256
mkdir restored-geth
tar --zstd -xf geth-snapshot.tar.zst -C restored-geth
```

This produces `restored-geth/geth/chaindata`. Ensure the account running Geth can read and write it. Do not run `geth init` on the restored database.

For an isolated verification, use Docker with no network and no published ports:

```bash
docker run -d --name restored-geth-check --network none \
  --entrypoint /usr/local/bin/geth \
  -v "$PWD/restored-geth:/root/ethereum" \
  ghcr.io/ethscriptions-protocol/ethscriptions-geth@sha256:cf12908075c9ef49b4d21820a3fa0e2d878e4b59d92a0249e65bd8034403b80c \
  --datadir /root/ethereum --state.scheme hash --gcmode archive \
  --syncmode full --history.state 100000 --history.transactions 100000 \
  --cache 4096 --maxpeers 0 --nodiscover \
  --rollup.disabletxpoolgossip --rollup.enabletxpooladmission=false

docker logs restored-geth-check
docker exec restored-geth-check geth attach \
  --exec 'JSON.stringify({height:eth.blockNumber,hash:eth.getBlock(eth.blockNumber).hash})' \
  /root/ethereum/geth.ipc
```

Compare the height and hash with `recovered_head` in the manifest. The database was recovered from a live disk snapshot; its recovered head can precede the production head at capture time. The manifest records the recovered database's actual head.

Geth may resume its internal state-snapshot generation in the background on startup. The exported database was cleanly closed with that work journaled; fixed-height state queries were verified against production.

Stop this verification container cleanly before using its directory elsewhere:

```bash
docker kill --signal SIGINT restored-geth-check
docker wait restored-geth-check
docker logs --tail 30 restored-geth-check
```

Require exit code zero and clean shutdown logs. This bypasses the image's shell entrypoint so Geth receives the shutdown signal directly. Generate your own JWT secret and node identity when preparing a networked deployment. Keep RPC/Engine API access restricted.
