Skip to content
Merged
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
34 changes: 34 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,20 @@ WS_DRAIN_TIMEOUT_MS=25000
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── SEP-10 solver authentication (issue #442) ────────────────────────────────
# Home domain bound into the challenge (`<domain> auth` manage-data operation);
# the same value is used for the challenge's `web_auth_domain` operation.
SEP10_HOME_DOMAIN=localhost
# Ed25519 PKCS#8 private key signing the 15-minute session JWTs — REQUIRED in
# production (generate: openssl genpkey -algorithm ed25519). Must be distinct
# from STELLAR_SIGNER_SECRET_KEY; empty uses an ephemeral dev-only key.
SEP10_JWT_SIGNING_KEY=
# Comma-separated G-addresses issued role=admin. Empty = nobody.
SEP10_ADMIN_ACCOUNTS=
# Single-use challenge nonce store: memory | redis. Use redis in multi-replica
# deployments so a captured challenge cannot be replayed on another replica.
SEP10_NONCE_STORE=memory

# ─── 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 +563,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
13 changes: 13 additions & 0 deletions .env.mainnet.example
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,19 @@ WS_DRAIN_TIMEOUT_MS=25000
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── SEP-10 solver authentication (issue #442) ────────────────────────────────
# Home domain bound into the challenge (`<domain> auth` manage-data operation).
SEP10_HOME_DOMAIN=localhost
# Ed25519 PKCS#8 private key signing the 15-minute session JWTs — REQUIRED in
# production (generate: openssl genpkey -algorithm ed25519). Must be distinct
# from STELLAR_SIGNER_SECRET_KEY.
SEP10_JWT_SIGNING_KEY=
# Comma-separated G-addresses issued role=admin. Empty = nobody.
SEP10_ADMIN_ACCOUNTS=
# Single-use challenge nonce store: memory | redis. Use redis in multi-replica
# deployments so a captured challenge cannot be replayed on another replica.
SEP10_NONCE_STORE=memory

# ─── 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
13 changes: 13 additions & 0 deletions .env.staging.example
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@ WS_DRAIN_TIMEOUT_MS=25000
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── SEP-10 solver authentication (issue #442) ────────────────────────────────
# Home domain bound into the challenge (`<domain> auth` manage-data operation).
SEP10_HOME_DOMAIN=localhost
# Ed25519 PKCS#8 private key signing the 15-minute session JWTs — REQUIRED in
# production (generate: openssl genpkey -algorithm ed25519). Must be distinct
# from STELLAR_SIGNER_SECRET_KEY.
SEP10_JWT_SIGNING_KEY=
# Comma-separated G-addresses issued role=admin. Empty = nobody.
SEP10_ADMIN_ACCOUNTS=
# Single-use challenge nonce store: memory | redis. Use redis in multi-replica
# deployments so a captured challenge cannot be replayed on another replica.
SEP10_NONCE_STORE=memory

# ─── 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
18 changes: 18 additions & 0 deletions .env.testnet.example
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ EGRESS_MAX_BODY_SIZE_BYTES=10485760
SOROBAN_RPC_ALLOWLIST=soroban-testnet.stellar.org,soroban-rpc.stellar.org
WEBHOOK_ALLOWLIST=hooks.example.com,hooks.trusted.com
ORACLE_ALLOWLIST=oracle.trusted.io
# Oracle minDstAmount gates (issue #434). Slippage/premium in basis points.
MAX_USER_SLIPPAGE_BPS=100
MAX_PREMIUM_BPS=50
ORACLE_FAIL_OPEN_MAX_USD=100
ORACLE_MAX_STALENESS_MS=60000
# ─── WS gateway hardening (issue #455) ───────────────────────────────────────
# Inbound frames larger than this close the socket (1009).
WS_MAX_PAYLOAD_BYTES=16384
Expand All @@ -259,6 +264,19 @@ WS_SLOW_CONSUMER_POLICY=drop_oldest
# Empty disables JWT auth on the WS gateway.
AUTH_JWT_SECRET=

# ─── SEP-10 solver authentication (issue #442) ────────────────────────────────
# Home domain bound into the challenge (`<domain> auth` manage-data operation).
SEP10_HOME_DOMAIN=localhost
# Ed25519 PKCS#8 private key signing the 15-minute session JWTs — REQUIRED in
# production (generate: openssl genpkey -algorithm ed25519). Must be distinct
# from STELLAR_SIGNER_SECRET_KEY.
SEP10_JWT_SIGNING_KEY=
# Comma-separated G-addresses issued role=admin. Empty = nobody.
SEP10_ADMIN_ACCOUNTS=
# Single-use challenge nonce store: memory | redis. Use redis in multi-replica
# deployments so a captured challenge cannot be replayed on another replica.
SEP10_NONCE_STORE=memory

# ─── 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
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