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 --index-map-size 68719476736
The map size is a virtual reservation, not disk. Mainnet needs more than the 16 GiB default.
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. |
| --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. |
| --index-only | Build the index and exit. |
Logging is RUST_LOG, default info. Ctrl-C shuts down in order: index writer, then Zakura.
protocol
Every CompactTxStreamer method, with three exceptions.
| GetMempoolTx | Unimplemented. |
| GetBlock | No transparent data. No wallet reads it. |
| GetBlockRange | Rejects transparent filters. Range scans of transparent data cost more bandwidth than they are worth. |
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.