synor/docker-compose.zk.yml
Gulshan Yadav d73909d72c feat(phase13): complete Docker deployment and Phase 14 planning
Phase 13 Completion:
- Add ZK-Rollup Docker infrastructure (sequencer, provers, gateway)
- Create zk-sequencer binary with health checks and metrics
- Add docker-compose.zk.yml for full ZK stack deployment
- Include nginx gateway and Prometheus monitoring configs

Integration Tests:
- Add comprehensive Phase 13 integration test suite
- Cover DAGKnight, quantum crypto, ZK-rollup, gateway tests
- All 149 tests passing (39 DAG + 45 crypto + 25 ZK + 40 storage)

Phase 14 Planning:
- Document 4-milestone roadmap (20 weeks)
- M1: Cross-chain IBC interoperability
- M2: Privacy layer (RingCT, stealth addresses)
- M3: Sharding protocol (100K TPS target)
- M4: Developer tooling (formal verification, Hardhat)

Docker Services:
- synor-zk-sequencer: API port 3001, prover RPC 3002, metrics 9001
- synor-zk-prover-1/2: Dedicated proof generation workers
- synor-zk-gateway: nginx API gateway port 3080
- synor-zk-prometheus: Metrics collection port 9090
2026-01-19 16:09:44 +05:30

157 lines
3.7 KiB
YAML

# Synor ZK-Rollup Layer - Docker Compose
# Zero-knowledge rollup components for L2 scaling
version: '3.9'
services:
# ZK Sequencer - collects transactions and builds batches
zk-sequencer:
build:
context: .
dockerfile: docker/zk-rollup/Dockerfile
container_name: synor-zk-sequencer
hostname: zk-sequencer
restart: unless-stopped
environment:
- RUST_LOG=info
- NODE_ID=zk-sequencer-1
- L1_RPC=http://synor-node-1:8545
- PROOF_BACKEND=groth16
- MAX_BATCH_SIZE=1000
volumes:
- zk-sequencer-data:/data/zk
- zk-proofs:/proofs
- ./docker/zk-rollup/config.toml:/config/config.toml:ro
ports:
- "3001:3001" # Sequencer API
- "3002:3002" # Prover RPC
- "9001:9001" # Metrics
networks:
- synor-zk-net
- synor-testnet
# depends_on synor-node-1 when integrating with testnet
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# ZK Prover Pool - dedicated proof generation
zk-prover-1:
build:
context: .
dockerfile: docker/zk-rollup/Dockerfile
container_name: synor-zk-prover-1
hostname: zk-prover-1
restart: unless-stopped
environment:
- RUST_LOG=info
- NODE_ID=zk-prover-1
- PROVER_MODE=true
- SEQUENCER_RPC=http://zk-sequencer:3002
- PROVER_THREADS=4
volumes:
- zk-prover-1-data:/data/zk
- zk-proofs:/proofs
networks:
- synor-zk-net
depends_on:
- zk-sequencer
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '2'
memory: 4G
zk-prover-2:
build:
context: .
dockerfile: docker/zk-rollup/Dockerfile
container_name: synor-zk-prover-2
hostname: zk-prover-2
restart: unless-stopped
environment:
- RUST_LOG=info
- NODE_ID=zk-prover-2
- PROVER_MODE=true
- SEQUENCER_RPC=http://zk-sequencer:3002
- PROVER_THREADS=4
volumes:
- zk-prover-2-data:/data/zk
- zk-proofs:/proofs
networks:
- synor-zk-net
depends_on:
- zk-sequencer
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '2'
memory: 4G
# ZK API Gateway - public interface
zk-gateway:
image: nginx:alpine
container_name: synor-zk-gateway
hostname: zk-gateway
restart: unless-stopped
volumes:
- ./docker/zk-rollup/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "3080:80" # Public API
- "3443:443" # HTTPS
networks:
- synor-zk-net
depends_on:
- zk-sequencer
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost/health"]
interval: 15s
timeout: 5s
retries: 3
# Prometheus for ZK metrics
zk-prometheus:
image: prom/prometheus:latest
container_name: synor-zk-prometheus
hostname: zk-prometheus
restart: unless-stopped
volumes:
- ./docker/zk-rollup/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- zk-prometheus-data:/prometheus
ports:
- "9090:9090"
networks:
- synor-zk-net
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
volumes:
zk-sequencer-data:
driver: local
zk-prover-1-data:
driver: local
zk-prover-2-data:
driver: local
zk-proofs:
driver: local
zk-prometheus-data:
driver: local
networks:
synor-zk-net:
driver: bridge
ipam:
config:
- subnet: 172.24.0.0/16
synor-testnet:
name: blockchaincc_synor-testnet
external: true