Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,16 @@ WS_DRAIN_TIMEOUT_MS=25000
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── Solver liveness heartbeats (issue #445) ─────────────────────────────────
# Cadence clients heartbeat at (ms); a solver is auto-marked offline after
# interval × misses without a beat (default 10 000 × 3 = 30 s).
SOLVER_HEARTBEAT_INTERVAL_MS=10000
SOLVER_HEARTBEAT_MISSES=3
# Shared liveness store URL (defaults to REDIS_URL). Leave both empty for a
# process-local store — single replica only; multi-replica deployments must
# share liveness or each replica only sees its own heartbeats.
SOLVER_HEARTBEAT_REDIS_URL=

# ─── API keys & distributed rate limiting (issue #441) ─────────────────────────
# How often (ms) the local rate-limiter fallback prunes expired window entries.
# Only relevant during a Redis outage; keeps the fallback map bounded.
Expand Down Expand Up @@ -549,6 +559,26 @@ DATASETS_STORAGE_KIND=memory
DATASETS_LOCAL_DIR=./data/datasets


# ─── Solver reputation (issue #444) ──────────────────────────────────────────
# Weights for each reputation sub-component. Sum must be exactly 1.0 in production;
# dev/test renormalises any valid positive set so local experimentation doesn't
# prevent boot.
REP_WEIGHT_FILL_RATE=0.35
REP_WEIGHT_LATENCY=0.15
REP_WEIGHT_SLASHES=0.25
REP_WEIGHT_QUOTE_HONOUR=0.15
REP_WEIGHT_VOLUME=0.10
# Shared exponential-decay half-life (seconds) for all events.
# Default: 30 days — scores dominated by the last ~1 month of activity.
REP_DECAY_HALFLIFE_SECONDS=2592000
# Beta-distribution priors for the Bayesian cold-start lower bound on fill rate.
# (α=4, β=1) ≈ prior mean 80%, 2.5% lower bound ~37%.
REP_BAYES_ALPHA=4
REP_BAYES_BETA=1
# Volume-component knee in USD-equivalent notional; $100k default.
REP_VOLUME_LAMBDA_USD=100000
# How many trailing days of daily snapshots the /reputation endpoint exposes (1..365).
REP_HISTORY_WINDOW_DAYS=30
# ─── Read replicas (#411) ─────────────────────────────────────────────────────
# Comma-separated read-replica Postgres connection strings.
# Leave blank to route all reads to the primary.
Expand Down
10 changes: 10 additions & 0 deletions .env.mainnet.example
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,16 @@ WS_DRAIN_TIMEOUT_MS=25000
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── Solver liveness heartbeats (issue #445) ─────────────────────────────────
# Cadence clients heartbeat at (ms); a solver is auto-marked offline after
# interval × misses without a beat (default 10 000 × 3 = 30 s).
SOLVER_HEARTBEAT_INTERVAL_MS=10000
SOLVER_HEARTBEAT_MISSES=3
# Shared liveness store URL (defaults to REDIS_URL). Leave both empty for a
# process-local store — single replica only; multi-replica deployments must
# share liveness or each replica only sees its own heartbeats.
SOLVER_HEARTBEAT_REDIS_URL=

# ─── API keys & distributed rate limiting (issue #441) ─────────────────────────
RATE_LIMIT_LOCAL_PRUNE_MS=60000
# Redis URL for the shared rate-limit window. Empty = bounded local limiter.
Expand Down
10 changes: 10 additions & 0 deletions .env.staging.example
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ WS_DRAIN_TIMEOUT_MS=25000
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── Solver liveness heartbeats (issue #445) ─────────────────────────────────
# Cadence clients heartbeat at (ms); a solver is auto-marked offline after
# interval × misses without a beat (default 10 000 × 3 = 30 s).
SOLVER_HEARTBEAT_INTERVAL_MS=10000
SOLVER_HEARTBEAT_MISSES=3
# Shared liveness store URL (defaults to REDIS_URL). Leave both empty for a
# process-local store — single replica only; multi-replica deployments must
# share liveness or each replica only sees its own heartbeats.
SOLVER_HEARTBEAT_REDIS_URL=

# ─── API keys & distributed rate limiting (issue #441) ─────────────────────────
RATE_LIMIT_LOCAL_PRUNE_MS=60000
# Redis URL for the shared rate-limit window. Empty = bounded local limiter.
Expand Down
10 changes: 10 additions & 0 deletions .env.testnet.example
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,16 @@ DATASETS_PUBLIC_BUCKET=
DATASETS_STORAGE_KIND=memory
DATASETS_LOCAL_DIR=

# ─── Solver liveness heartbeats (issue #445) ─────────────────────────────────
# Cadence clients heartbeat at (ms); a solver is auto-marked offline after
# interval × misses without a beat (default 10 000 × 3 = 30 s).
SOLVER_HEARTBEAT_INTERVAL_MS=10000
SOLVER_HEARTBEAT_MISSES=3
# Shared liveness store URL (defaults to REDIS_URL). Leave both empty for a
# process-local store — single replica only; multi-replica deployments must
# share liveness or each replica only sees its own heartbeats.
SOLVER_HEARTBEAT_REDIS_URL=

# ─── Health probes (issue #492) ──────────────────────────────────────────────
# Roles served by this process (api, ws, worker); readiness checks follow them.
SERVICE_ROLES=api,ws,worker
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"ignorePatterns": ["dist", "node_modules"],
"overrides": [
{
"files": ["scripts/**/*.ts", "tools/**/*.ts"],
"files": ["scripts/**/*.ts", "tools/**/*.ts", "test/chaos/**/*.ts"],
"rules": {
"no-restricted-syntax": "off"
}
Expand Down
Loading
Loading