Files
zeekayandHanzo AI 15131f6af4
CI/CD / render (push) Waiting to run
chain letters are lowercase
The primary-network chains answer to either case; one spelling beats two.
/v1/chain/c/rpc, /v1/chain/p, /v1/chain/x across the estate.

Co-authored-by: Hanzo AI <[email protected]>
2026-09-08 15:23:20 -07:00

88 lines
3.0 KiB
YAML

# pulse on Hanzo mainnet (36963) — 1 transaction every 3 seconds.
#
# Replaces the bash `chain-traffic` bot. Same job, but with an HTTP start/stop
# switch so it can be driven from lux.cloud without a redeploy, and per-chain
# funding checks so it refuses to spam a chain it cannot pay for.
#
# ONE SENDER PER CHAIN. chain-traffic must be scaled to 0 before this runs:
# two senders sharing an account race the same nonce, and neither makes
# progress (observed on Lux — pulse read sent=0 for minutes while the old bot
# held the nonce).
#
# Key: the EXISTING `hanzod-faucet` secret (~941 AI). Deliberately NOT the
# treasury EOA 0x9011 — a key that signs every 3s does not belong in the same
# blast radius as the org's funds.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: pulse-chains
namespace: hanzo-mainnet
data:
# In-cluster RPC: hanzod-rpc:9630 serves /v1/chain/c/rpc (verified tip 17206).
# NOTE 127.0.0.1:9630 inside a hanzod-mv pod 404s on that path — the SERVICE
# is the correct target, not pod-local.
chains.json: |
[
{"name":"hanzo-evm","rpc":"http://hanzod-rpc.hanzo-mainnet.svc.cluster.local:9630/v1/chain/c/rpc","key":"$TRAFFIC_KEY","weight":1,"dex":0}
]
---
apiVersion: v1
kind: Service
metadata:
name: pulse
namespace: hanzo-mainnet
labels: {app: pulse}
spec:
selector: {app: pulse}
ports:
- {name: http, port: 8080, targetPort: 8080}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pulse
namespace: hanzo-mainnet
labels: {app: pulse}
spec:
replicas: 1
strategy: {type: Recreate} # one sender: never two pods racing one nonce
selector:
matchLabels: {app: pulse}
template:
metadata:
labels: {app: pulse}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: /metrics
spec:
containers:
- name: pulse
image: ghcr.io/luxfi/trader:v0.3.4
command: ["/usr/local/bin/pulse"]
# 4 concurrent sends: each WAITS for a receipt (~5-15s on a 5s-block
# chain), so a deeper queue just stacks nonces the chain cannot drain.
args: ["-config", "/etc/pulse/chains.json", "-max-inflight", "4"]
env:
- {name: PULSE_TPS, value: "0.333"} # 1 tx every 3s
- {name: PULSE_AUTOSTART, value: "true"}
- {name: PULSE_LISTEN, value: ":8080"}
- {name: PULSE_MIN_BALANCE, value: "1000000000000000000"}
- name: TRAFFIC_KEY
valueFrom:
secretKeyRef: {name: hanzod-faucet, key: key}
ports: [{name: http, containerPort: 8080}]
volumeMounts:
- {name: chains, mountPath: /etc/pulse}
readinessProbe:
httpGet: {path: /healthz, port: 8080}
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests: {cpu: 25m, memory: 64Mi}
limits: {cpu: 500m, memory: 256Mi}
volumes:
- name: chains
configMap: {name: pulse-chains}