docs
install
Needs protoc on the path.
$ cargo install --git https://github.com/distractedm1nd/ztreamer ztreamerd
run
One process. Zakura boots inside it, syncs to the tip, then the index builds and the servers open.
$ ztreamerd --zakura-config zakura.toml
The default LMDB map ceiling is 64 GiB. This reserves virtual address space; disk space is used as index data is written.
flags
| --zakura-config FILE | Zakura TOML. Zakura defaults and ZAKURA_* apply when omitted. |
| --index-dir DIR | LMDB index. |
| --index-map-size BYTES | LMDB map ceiling. |
| --grpc-listen ADDR | CompactTxStreamer. |
| --tls-cert FILE | PEM certificate chain for gRPC TLS. Requires --tls-key. |
| --tls-key FILE | PEM private key for gRPC TLS. Requires --tls-cert. |
| --metrics-listen ADDR | Prometheus. |
| --fetch-workers N | Historical fetch workers. |
| --source-segment-blocks N | Consecutive blocks per fetch worker. |
| --max-pending-bytes N | Bytes awaiting ordered ingestion. |
| --max-batch-bytes N | Index write batch. Fetch workers can have at most --max-pending-bytes minus the larger of this value and 2 MB in flight, plus the one block the index needs next. |
| --ping-very-insecure | Answer Ping. Testing only. |
| --index-only | Build the index and exit. |
Logging is RUST_LOG, default info. Ctrl-C and SIGTERM shut down in order: index writer, then Zakura.
protocol
All CompactTxStreamer methods are implemented. GetBlock intentionally omits transparent data, and Ping is opt-in.
| Ping | Disabled unless --ping-very-insecure is set. It is a denial-of-service vector. |
| GetBlock | Returns shielded compact data; transparent transaction data is intentionally omitted. |
Zaino direct-mode JSON-RPC parity, 24 of 27. Missing: getblockdeltas, getspentinfo, gettxoutsetinfo.
p2p
The same service over Zakura's peer protocol, so a light wallet can sync from any Zakura peer running ztreamer. No server, no TLS, no DNS.
| service | zakura.ztreamer.v1 |
| capability bit | 1 << 17 |
| stream | kind 65, version 1, ordered |
| message limit | 4 MiB, framed with a MORE flag |
Messages are the gRPC request and response types, protobuf-encoded, one per frame sequence.
reorgs
The head follower reconciles the index against Zakura's canonical chain on every advance. A reorg deeper than Zakura's non-finalized window triggers a full recovery pass. Both paths are under test.