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
4 changes: 2 additions & 2 deletions market-maker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ── Install deps ──────────────────────────────────────────────────────────────
FROM node:22-alpine AS deps
FROM node:24-alpine AS deps

WORKDIR /app

Expand All @@ -9,7 +9,7 @@ COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod

# ── Runtime ───────────────────────────────────────────────────────────────────
FROM node:22-alpine
FROM node:24-alpine

ARG COMMIT_HASH=""
ENV NODE_ENV=production
Expand Down
2 changes: 1 addition & 1 deletion market-maker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ if [ -z "${MAKER_CONFIG:-}" ]; then
export MAKER_CONFIG="/app/configs/${MAKER_APP}.${MAKER_ENV}.yml"
fi

exec node "$ENTRY" "$@"
exec node --import=amaro/strip --conditions=typescript "$ENTRY" "$@"
26 changes: 14 additions & 12 deletions market-maker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@
"node": ">=22.6.0"
},
"scripts": {
"test": "node --test --test-force-exit --test-concurrency=1 'tests/**/*.test.ts'",
"test": "pnpm node --test --test-force-exit --test-concurrency=1 'tests/**/*.test.ts'",
"typecheck": "tsc --noEmit",
"local:perps": "node src/apps/perps/main.ts --config configs/perps.local.yml | pino-pretty",
"local:futures": "node src/apps/futures/main.ts --config configs/futures.local.yml | pino-pretty",
"dev:perps": "node src/apps/perps/main.ts --config configs/perps.dev.yml | pino-pretty",
"dev:futures": "node src/apps/futures/main.ts --config configs/futures.dev.yml | pino-pretty",
"stg:perps": "node src/apps/perps/main.ts --config configs/perps.stg.yml",
"stg:futures": "node src/apps/futures/main.ts --config configs/futures.stg.yml",
"prd:perps": "node src/apps/perps/main.ts --config configs/perps.prd.yml",
"prd:futures": "node src/apps/futures/main.ts --config configs/futures.prd.yml",
"gen:schemas": "node scripts/gen-schemas.ts",
"pretypecheck": "node scripts/gen-schemas.ts"
"node": "node --import=amaro/strip --conditions=typescript",
"local:perps": "pnpm node --watch src/apps/perps/main.ts --config configs/perps.local.yml | pino-pretty",
"local:futures": "pnpm node --watch src/apps/futures/main.ts --config configs/futures.local.yml | pino-pretty",
"dev:perps": "pnpm node --watch src/apps/perps/main.ts --config configs/perps.dev.yml | pino-pretty",
"dev:futures": "pnpm node --watch src/apps/futures/main.ts --config configs/futures.dev.yml | pino-pretty",
"stg:perps": "pnpm node --watch src/apps/perps/main.ts --config configs/perps.stg.yml",
"stg:futures": "pnpm node --watch src/apps/futures/main.ts --config configs/futures.stg.yml",
"prd:perps": "pnpm node --watch src/apps/perps/main.ts --config configs/perps.prd.yml",
"prd:futures": "pnpm node --watch src/apps/futures/main.ts --config configs/futures.prd.yml",
"gen:schemas": "pnpm node scripts/gen-schemas.ts",
"pretypecheck": "pnpm node scripts/gen-schemas.ts"
},
"dependencies": {
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"amaro": "^1.1.9",
"collateral-margin-contracts": "link:../contracts",
"fraction.js": "^5.2.2",
"futures-contracts": "github:Lumerin-protocol/futures-marketplace#dev&path:/contracts",
Expand All @@ -39,4 +41,4 @@
"typescript": "^5.8.0"
},
"packageManager": "pnpm@10.28.1"
}
}
19 changes: 14 additions & 5 deletions market-maker/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions market-maker/schemas/futures.json
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@
],
"properties": {
"pollIntervalSec": {
"minimum": 0.1,
"default": 3,
"description": "Seconds between main-loop iterations (snapshot, quote, execute).",
"anyOf": [
Expand Down Expand Up @@ -729,7 +728,6 @@
"default": 2
},
"requoteCooldownSec": {
"minimum": 0,
"default": 1,
"description": "Seconds between requote bursts. Tripled when risk is throttled.",
"anyOf": [
Expand Down Expand Up @@ -762,7 +760,6 @@
]
},
"resyncIntervalSec": {
"minimum": 1,
"default": 60,
"description": "Seconds between full BookTracker snapshot refetches (event deltas in between).",
"anyOf": [
Expand Down
3 changes: 0 additions & 3 deletions market-maker/schemas/perps.json
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@
],
"properties": {
"pollIntervalSec": {
"minimum": 0.1,
"default": 3,
"description": "Seconds between main-loop iterations (snapshot, quote, execute).",
"anyOf": [
Expand Down Expand Up @@ -706,7 +705,6 @@
"default": 2
},
"requoteCooldownSec": {
"minimum": 0,
"default": 1,
"description": "Seconds between requote bursts. Tripled when risk is throttled.",
"anyOf": [
Expand Down Expand Up @@ -739,7 +737,6 @@
]
},
"resyncIntervalSec": {
"minimum": 1,
"default": 60,
"description": "Seconds between full BookTracker snapshot refetches (event deltas in between).",
"anyOf": [
Expand Down
10 changes: 6 additions & 4 deletions market-maker/src/core/config/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ const TypeUsdAmount = (opts?: { default?: string | number; description?: string
);

/** Schema fragment that accepts a non-negative seconds value (string or number). */
const TypeSeconds = (opts?: { minimum?: number; default?: string | number; description?: string }) =>
Type.Union(
[Type.String({ pattern: "^\\d+(\\.\\d+)?$" }), Type.Number({ minimum: opts?.minimum })],
opts as Record<string, unknown> | undefined,
const TypeSeconds = (opts?: { minimum?: number; default?: string | number; description?: string }) => {
const { minimum, ...unionOpts } = opts ?? {};
return Type.Union(
[Type.String({ pattern: "^\\d+(\\.\\d+)?$" }), Type.Number({ minimum })],
unionOpts as Record<string, unknown>,
);
};

/**
* Shared config schema fragments used by per-app config modules.
Expand Down
Loading