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
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/docker/library/node:22 AS builder
FROM public.ecr.aws/docker/library/node:24 AS builder
RUN npm install -g typescript@5.4.5

WORKDIR /app
Expand All @@ -14,11 +14,11 @@ RUN yarn && yarn build
WORKDIR /app
RUN yarn && yarn build

FROM public.ecr.aws/docker/library/node:22-alpine
FROM public.ecr.aws/docker/library/node:24-alpine
RUN apk add python3 make g++ --virtual .build &&\
npm install -C /lib bigint-buffer @triton-one/yellowstone-grpc@1.3.0 helius-laserstream@0.1.8 rpc-websockets@7.5.1 &&\
npm install -C /lib bigint-buffer @triton-one/yellowstone-grpc@5.0.2 helius-laserstream@0.1.8 rpc-websockets@7.5.1 &&\
apk del .build

COPY --from=builder /app/lib/ ./lib/

ENV NODE_ENV=production
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@aws-sdk/util-retry": "^3.374.0",
"@coral-xyz/anchor": "^0.29.0",
"@drift-labs/common": "1.0.20",
"@drift-labs/sdk": "2.155.0-beta.6",
"@drift-labs/sdk": "2.156.0-beta.0",
"@opentelemetry/api": "^1.1.0",
"@opentelemetry/auto-instrumentations-node": "^0.31.1",
"@opentelemetry/exporter-prometheus": "^0.31.0",
Expand All @@ -19,7 +19,7 @@
"@project-serum/serum": "^0.13.65",
"@pythnetwork/hermes-client": "^1.3.1",
"@solana/web3.js": "1.98.0",
"@triton-one/yellowstone-grpc": "^0.3.0",
"@triton-one/yellowstone-grpc": "5.0.2",
"@types/redis": "^4.0.11",
"@types/ws": "^8.5.8",
"async-mutex": "^0.4.0",
Expand Down Expand Up @@ -48,10 +48,10 @@
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"esbuild": "^0.24.0",
"husky": "^7.0.4",
"eslint": "8.57.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-prettier": "3.4.0",
"husky": "^7.0.4",
"jest": "^29.7.0",
"k6": "^0.0.0",
"prettier": "^2.4.1",
Expand Down
15 changes: 9 additions & 6 deletions src/publishers/dlobPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
decodeName,
ONE,
WebSocketAccountSubscriberV2,
OrderSubscriberConfig,
GrpcConfigs,
} from '@drift-labs/sdk';
import { RedisClient, RedisClientPrefix } from '@drift-labs/common/clients';

Expand Down Expand Up @@ -47,6 +49,7 @@ import {
FillQualityAnalyticsRepository,
TakerFillVsOracleBpsRedisResult,
} from '../athena/repositories/fillQualityAnalytics';
import { CommitmentLevel } from '@drift-labs/sdk/lib/node/isomorphic/grpc';

setGlobalDispatcher(
new Agent({
Expand Down Expand Up @@ -117,7 +120,8 @@ const endpoint = process.env.ENDPOINT;
const grpcEndpoint = useGrpc
? process.env.GRPC_ENDPOINT ?? endpoint + `/${token}`
: '';
const grpcClient = process.env.GRPC_CLIENT ?? 'yellowstone';
const grpcClient = (process.env.GRPC_CLIENT ??
'yellowstone') as GrpcConfigs['client'];

const wsEndpoint = process.env.WS_ENDPOINT;
const useOrderSubscriber =
Expand Down Expand Up @@ -501,7 +505,7 @@ const main = async () => {
let orderSubscriber: OrderSubscriberFiltered | undefined;

if (useOrderSubscriber) {
let subscriptionConfig: any = {
let subscriptionConfig: OrderSubscriberConfig['subscriptionConfig'] = {
type: 'polling',
commitment: stateCommitment,
frequency: ORDERBOOK_UPDATE_INTERVAL,
Expand Down Expand Up @@ -532,11 +536,10 @@ const main = async () => {
grpcConfigs: {
endpoint: grpcEndpoint,
token: token,
commitmentLevel: stateCommitment,
commitmentLevel: CommitmentLevel.CONFIRMED,
channelOptions: {
'grpc.keepalive_time_ms': 10_000,
'grpc.keepalive_timeout_ms': 1_000,
'grpc.keepalive_permit_without_calls': 1,
grpcKeepAliveTimeout: 1_000,
grpcTcpKeepalive: 10_000,
},
client: grpcClient,
},
Expand Down
Loading