Skip to content
Open
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Awesome DeFi apps you can deploy on Akash
- [Starknet Node by Juno](juno)
- [Substrate Node](substrate-node)
- [Witness Chain Watchtower](witnesschain-watchtower)
- [Zcash - Zcashd](zcash-zcashd)
- [Zcash - Zakura](zcash-zakura)
- [Zcash - Zebra](zcash-zebra)

### Business
Expand Down
114 changes: 114 additions & 0 deletions zcash-zakura/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Zcash - Zakura

[![Deploy on Akash](https://raw.githubusercontent.com/akash-network/console/refs/heads/main/apps/deploy-web/public/images/deploy-with-akash-btn.svg)](https://air.akash.network/new-deployment?step=edit-deployment&templateId=akash-network-awesome-akash-zcash-zakura)

Zakura is a Zcash full node written in Rust (forked from Zebra), with faster sync, native pruning, snapshot bootstrap, optional zcashd compatibility mode, and an experimental high-performance P2P stack.

Source: <https://github.com/zakura-core/zakura>
Snapshots: <https://zakura.com/snapshots/>
Docker: <https://hub.docker.com/r/zakuracore/zakura>

## What this template does

Deploys `zakuracore/zakura:1.0.3` on Akash with:

- Mainnet P2P on container port **8233** (provider maps a public high port)
- **Persistent** state volume at `/home/zebra/.cache/zakura`
- **Snapshot bootstrap** on first start when the volume is empty:
1. Fetches a Valar Group `snapshots.json` manifest
2. Selects the entry with role `latest` (configurable)
3. Downloads the `tar.zst` to the persistent volume (resumable; progress logs every 30s)
4. Verifies sha256, extracts into the cache dir, deletes the archive
5. Starts `zakurad` (via the image entrypoint) so the node continues from the snapshot height instead of genesis

### Default: pruned snapshot (quick tip sync)

| Setting | Default |
| --- | --- |
| Image | `zakuracore/zakura:1.0.3` |
| Network | Mainnet |
| Snapshot kind | `pruned` (~11 GiB download) |
| Manifest | `https://zakura.valargroup.dev/mainnet-pruned/snapshots.json` |
| Storage mode | `pruned` |
| Persistent disk | 64 GiB |
| CPU / RAM | 4 / 16 GiB |

Pruned snapshots keep consensus state and a retention window of blocks (not full history). Ideal for a validating node that only needs to stay near the tip.

### Archive snapshot (full history)

To bootstrap from the **archive** manifest the site documents as raw data
(`https://zakura.valargroup.dev/mainnet/snapshots.json`, ~251 GiB):

1. Set env:
- `SNAPSHOT_KIND=archive`
- Remove or set `ZAKURA_STATE__STORAGE_MODE=archive`
2. Raise storage to **350 GiB+** (and prefer more RAM if possible)
3. Optionally set
`SNAPSHOT_MANIFEST_URL=https://zakura.valargroup.dev/mainnet/snapshots.json`

## Snapshot environment variables

| Variable | Default | Description |
| --- | --- | --- |
| `SNAPSHOT_ENABLE` | `true` | Set `false` to sync from genesis / existing peers only |
| `SNAPSHOT_KIND` | `pruned` | `pruned` or `archive` (selects default manifest URL) |
| `SNAPSHOT_ROLE` | `latest` | Manifest role: `latest`, `daily`, or `monthly` |
| `SNAPSHOT_NETWORK` | `mainnet` | Used in default manifest paths |
| `SNAPSHOT_MANIFEST_URL` | _(derived)_ | Override full manifest URL |
| `SNAPSHOT_URL` | _(empty)_ | Pin a specific tarball; skips manifest selection |
| `SNAPSHOT_SHA256` | _(empty)_ | Optional pin checksum (used with verify / `SNAPSHOT_URL`) |
| `SNAPSHOT_VERIFY` | `true` | Run `sha256sum -c` after download (uses manifest `sha256`) |
| `SNAPSHOT_MIN_SPEED` | `1024` | Curl abort threshold (bytes/sec) when stalled |
| `SNAPSHOT_STALL_SECS` | `120` | Seconds under min speed before abort + resume retry |
| `SNAPSHOT_DOWNLOAD_ATTEMPTS` | `8` | Max curl attempts for the archive |

Download lands under `{cache}/.snapshot-download/` so a pod restart can **resume** instead of restarting a multi‑GB transfer from zero.

Bootstrap is **idempotent**: if `state/` already exists or `.snapshot-bootstrap.json` is present on the volume, download is skipped.

Manifest fields used (from Valar JSON): `roles`, `height`, `size`, `sha256`, `filename`, `url` / `urls`, `snapshot_kind`.

## Other configuration

Zebra-style config via `ZAKURA_*` env vars (legacy `ZEBRA_*` is translated by the image entrypoint):

| Variable | Purpose |
| --- | --- |
| `ZAKURA_NETWORK__NETWORK` | `Mainnet` / `Testnet` |
| `ZAKURA_NETWORK__LISTEN_ADDR` | P2P bind (default `[::]:8233`) |
| `ZAKURA_NETWORK__EXTERNAL_ADDR` | Public `host:port` if peers should dial you |
| `ZAKURA_STATE__CACHE_DIR` | Must match the storage mount |
| `ZAKURA_STATE__STORAGE_MODE` | `pruned` or `archive` |
| `ZAKURA_RPC__LISTEN_ADDR` | Enable JSON-RPC (off by default) |
| `ZAKURA_METRICS__ENDPOINT_ADDR` | Prometheus (optional) |
| `ZAKURA_HEALTH__LISTEN_ADDR` | `/healthy` and `/ready` (optional) |

## Testnet

Uncomment the Testnet network env vars and P2P port **18233** in `deploy.yaml`. Point manifests with `SNAPSHOT_NETWORK=testnet` if Valar publishes testnet snapshots at the same layout.

## Local testing (same image + SDL command)

From `zcash-zakura/`:

```bash
# Config/start smoke (injects fake Akash ZAKURA_SERVICE_PORT envs, no snapshot)
./test-local.sh --config-only --fresh

# Full path including pruned snapshot download (large)
./test-local.sh --fresh

# Skip snapshot, sync from genesis / existing volume
./test-local.sh --no-snapshot
```

The script parses `image`, `env`, and `command` from `deploy.yaml` so local runs stay aligned with Akash.

## Notes

- Akash/Kubernetes injects `ZAKURA_SERVICE_PORT`, `ZAKURA_NP_SERVICE_PORT`, etc. The bootstrap **unsets** any `ZAKURA_*` env that is not `ZAKURA_SECTION__KEY` form before starting, otherwise `zakurad` fails with `unknown field …`.
- Akash does **not** bind your service to the literal public port 8233; check the lease URI for the published host:port. Set `ZAKURA_NETWORK__EXTERNAL_ADDR` to that endpoint if you want better inbound peer reachability.
- Pruned mode is one-way: you cannot reopen a pruned DB as archive without resyncing.
- Image starts as root only long enough for volume ownership, then drops to UID **10001** (`zebra`) via `entrypoint.sh`.
- For zcashd wallet/RPC compatibility, see Zakura’s [zcashd-compat](https://github.com/zakura-core/zakura/blob/main/book/src/user/zcashd-compat.md) docs (not enabled in this template).
2 changes: 1 addition & 1 deletion zcash-zcashd/config.json → zcash-zakura/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../config.schema.json",
"ssh": false,
"logoUrl": "https://raw.githubusercontent.com/akash-network/awesome-akash/master/zcash-zcashd/logo.png"
"logoUrl": "https://raw.githubusercontent.com/akash-network/awesome-akash/master/zcash-zakura/logo.svg"
}
Loading