Files
Hanzo AI e387ff4859 Zoo asks luxd for chains where luxd serves them
The zoo manifests, the compose file and the e2e helpers all composed
/v1/bc addresses against luxd, which answers under /v1/chain and no
longer serves the old segment.

A line that records an observation keeps its original spelling.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-03 21:32:56 -07:00

179 lines
5.4 KiB
YAML

# Bridge — cross-chain transfers using chain-native T-Chain (threshold signing).
# No external MPC sidecar — validators ARE the MPC signers.
#
# Storage: Base/SQLite at /app/data/data.db. Litestream sidecar replicates
# the WAL to s3.<ns>.svc:9000 (MinIO) on a 1s sync interval. replicas=1 —
# SQLite does not support concurrent writers from multiple pods.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zoo-bridge-data
labels:
app: zoo-bridge
app.kubernetes.io/part-of: zoo
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: do-block-storage
resources:
requests:
storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zoo-bridge
labels:
app: zoo-bridge
app.kubernetes.io/name: zoo-bridge
app.kubernetes.io/part-of: zoo
spec:
# SQLite-backed; single writer.
replicas: 1
selector:
matchLabels:
app: zoo-bridge
strategy:
type: Recreate
template:
metadata:
labels:
app: zoo-bridge
spec:
imagePullSecrets:
- name: ghcr-secret
- name: hanzo
initContainers:
# Restore /app/data/data.db from S3 on cold start. Idempotent.
- name: replicate-restore
image: ghcr.io/hanzoai/replicate:0.6.0
args: ["restore", "-if-db-not-exists", "-if-replica-exists", "/app/data/data.db"]
env:
- name: LITESTREAM_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: s3-credentials
key: ACCESS_KEY
- name: LITESTREAM_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3-credentials
key: SECRET_KEY
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
volumeMounts:
- name: data
mountPath: /app/data
- name: replicate-config
mountPath: /etc/litestream.yml
subPath: litestream.yml
containers:
- name: bridge
# TODO: pin semver once zooai/bridge CI publishes vX.Y.Z tags.
# main-amd64 is the immutable per-arch tag from the shared
# hanzoai/.github docker-build workflow.
image: ghcr.io/zooai/bridge:main-amd64
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http
env:
- name: BRIDGE_TENANT
value: zoo
# SQLite file (Base). DATABASE_URL retained for app compatibility.
- name: DATABASE_URL
value: sqlite:///app/data/data.db
- name: ZOO_RPC_URL
value: http://zoo-rpc:9650/v1/chain/zoo/rpc
- name: LUX_RPC_URL
valueFrom:
configMapKeyRef:
name: zoo-config
key: lux-rpc-url
# Chain-native signing via T-Chain RPC (replaces MPC StatefulSet)
- name: THRESHOLD_RPC_URL
value: http://zoo-rpc:9650/v1/chain/zoo-threshold/rpc
# Chain-native identity via I-Chain RPC (replaces external IAM)
- name: IDENTITY_RPC_URL
value: http://zoo-rpc:9650/v1/chain/zoo-identity/rpc
# Chain-native key management via K-Chain RPC (replaces external KMS)
- name: KEY_RPC_URL
value: http://zoo-rpc:9650/v1/chain/zoo-keys/rpc
volumeMounts:
- name: data
mountPath: /app/data
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /healthz
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
# Litestream sidecar — continuous WAL replication to MinIO.
- name: replicate
image: ghcr.io/hanzoai/replicate:0.6.0
args: ["replicate"]
env:
- name: LITESTREAM_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: s3-credentials
key: ACCESS_KEY
- name: LITESTREAM_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3-credentials
key: SECRET_KEY
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
volumeMounts:
- name: data
mountPath: /app/data
- name: replicate-config
mountPath: /etc/litestream.yml
subPath: litestream.yml
resources:
requests:
cpu: 10m
memory: 16Mi
limits:
memory: 64Mi
volumes:
- name: data
persistentVolumeClaim:
claimName: zoo-bridge-data
- name: replicate-config
configMap:
name: replicate-config
---
apiVersion: v1
kind: Service
metadata:
name: zoo-bridge
labels:
app: zoo-bridge
app.kubernetes.io/name: zoo-bridge
app.kubernetes.io/part-of: zoo
spec:
selector:
app: zoo-bridge
ports:
- port: 3000
targetPort: 3000
name: http