Skip to content

Commit

Permalink
Take snapshot of main (#1326)
Browse files Browse the repository at this point in the history
* Add subaccountNumber to PerpetualPositionResponseObject (#1274)

Signed-off-by: Shrenuj Bansal <[email protected]>

* [CT-712] send updates for both normal order matches and liquidation (#1280)

* Remove volatile market (#1263)

* [SKI-21] Bump slinky version to v0.3.1 (#1275)

* Bump slinky version

* Add cp number method

* clean up socks logging (#1285)

* [CT-681] fix liquidated side and offsetting side for indexer delevera… (#1284)

* [CT-681] fix liquidated side and offsetting side for indexer deleveraging events

* fix test

* fix test

* fix lint

* [TRA-105] Add API for parent subaccount perpetual positions (#1282)


Signed-off-by: Shrenuj Bansal <[email protected]>

* Use sample rate with stream destroyed stats. (#1294)

* Revert "[CT-708] Indexer track e2e latency (#1237)" (#1292)

This reverts commit 60b94df.

* Fix swagger generation makefile command / regen swagger docs (#1299)

* pull dydx fork to generate swagger properly

* remove the print

* remove vault constants (#1293)

* Remove custom ping message from socks (#1301)

* Add subaccountNumber to the OrderResponseObject (#1296)

Signed-off-by: Shrenuj Bansal <[email protected]>

* sample more metrics (#1304)

* [OTE-256] Add upgrade handler to initialize OI during upgrade handler (#1302)

* Add upgrade handler to initialize OI during upgrade handler

* nits

* Fix lib.ErrorLogWithError: properly pass in args (#1306)

* fix broken tests (#1312)

* Explicitly close websockets on errors (#1290)

* Increase the number of allowed connections to 8000 (#1317)

* [TRA-104] Add parentSubaccountNumber API for orders (#1313)


Signed-off-by: Shrenuj Bansal <[email protected]>

* Improve Slinky logs to prevent unnecessary logs (#1289)

* [SKI-26]: Prevent funding index update with no oracle prices from (#1321)

halting indexer

* Skip equity tier limit check in PlaceShortTermOrder (#1318)

* Skip equity tier limit check in PlaceShortTermOrder

* remove tests

* Add comment

* fix lint (#1323)

---------

Signed-off-by: Shrenuj Bansal <[email protected]>
Co-authored-by: shrenujb <[email protected]>
Co-authored-by: jayy04 <[email protected]>
Co-authored-by: Eric Warehime <[email protected]>
Co-authored-by: vincentwschau <[email protected]>
Co-authored-by: Jonathan Fung <[email protected]>
Co-authored-by: Tian <[email protected]>
Co-authored-by: Teddy Ding <[email protected]>
Co-authored-by: roy-dydx <[email protected]>
Co-authored-by: Christopher-Li <[email protected]>
10 people authored Apr 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 24259f0 commit 5729a4d
Showing 66 changed files with 2,471 additions and 1,374 deletions.
4 changes: 2 additions & 2 deletions indexer/packages/postgres/__tests__/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -468,7 +468,7 @@ export const isolatedPerpetualPosition: PerpetualPositionCreateObject = {
status: PerpetualPositionStatus.OPEN,
size: '10',
maxSize: '25',
entryPrice: '20000',
entryPrice: '1.5',
sumOpen: '10',
sumClose: '0',
createdAt: createdDateTime.toISO(),
@@ -643,7 +643,7 @@ export const isolatedMarket: MarketCreateObject = {
pair: 'ISO-USD',
exponent: -12,
minPriceChangePpm: 50,
oraclePrice: '0.000000075',
oraclePrice: '1.00',
};

export const isolatedMarket2: MarketCreateObject = {
41 changes: 41 additions & 0 deletions indexer/packages/redis/__tests__/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -168,3 +168,44 @@ export const orderUpdate: OffChainUpdateOrderUpdateUpdateMessage = {
totalFilledQuantums: Long.fromValue(250_500, true),
},
};

export const isolatedSubaccountId: IndexerSubaccountId = {
owner: testConstants.isolatedSubaccount.address,
number: testConstants.isolatedSubaccount.subaccountNumber,
};
export const isolatedMarketOrderId: IndexerOrderId = {
subaccountId: isolatedSubaccountId,
clientId: 1,
clobPairId: parseInt(testConstants.isolatedPerpetualMarket.clobPairId, 10),
orderFlags: ORDER_FLAG_SHORT_TERM,
};
export const isolatedMarketOrder: IndexerOrder = {
orderId: isolatedMarketOrderId,
side: IndexerOrder_Side.SIDE_BUY,
quantums: Long.fromValue(1_000_000, true),
subticks: Long.fromValue(2_000_000, true),
goodTilBlock: 1150,
goodTilBlockTime: undefined,
timeInForce: IndexerOrder_TimeInForce.TIME_IN_FORCE_POST_ONLY,
reduceOnly: false,
clientMetadata: 0,
conditionType: IndexerOrder_ConditionType.CONDITION_TYPE_UNSPECIFIED,
conditionalOrderTriggerSubticks: Long.fromValue(0, true),
};

export const isolatedMarketOrderUuid: string = OrderTable.orderIdToUuid(isolatedMarketOrderId);

export const isolatedMarketRedisOrder: RedisOrder = {
id: isolatedMarketOrderUuid,
order: isolatedMarketOrder,
ticker: testConstants.isolatedPerpetualMarket.ticker,
tickerType: RedisOrder_TickerType.TICKER_TYPE_PERPETUAL,
price: protocolTranslations.subticksToPrice(
isolatedMarketOrder.subticks.toString(),
testConstants.isolatedPerpetualMarket,
),
size: protocolTranslations.quantumsToHumanFixedString(
isolatedMarketOrder.quantums.toString(),
testConstants.isolatedPerpetualMarket.atomicResolution,
),
};
1 change: 0 additions & 1 deletion indexer/packages/v4-protos/src/index.ts
Original file line number Diff line number Diff line change
@@ -16,4 +16,3 @@ export * from './codegen/google/protobuf/timestamp';
export * from './codegen/dydxprotocol/indexer/protocol/v1/clob';
export * from './codegen/dydxprotocol/indexer/protocol/v1/subaccount';
export * from './codegen/dydxprotocol/indexer/shared/removal_reason';
export * from './utils';
12 changes: 0 additions & 12 deletions indexer/packages/v4-protos/src/utils.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -106,6 +106,7 @@ describe('addresses-controller#V4', () => {
createdAtHeight: testConstants.defaultPerpetualPosition.createdAtHeight,
exitPrice: null,
closedAt: null,
subaccountNumber: testConstants.defaultSubaccount.subaccountNumber,
},
},
assetPositions: {
@@ -266,6 +267,7 @@ describe('addresses-controller#V4', () => {
createdAtHeight: testConstants.defaultPerpetualPosition.createdAtHeight,
exitPrice: null,
closedAt: null,
subaccountNumber: testConstants.defaultSubaccount.subaccountNumber,
},
},
assetPositions: {
@@ -453,6 +455,7 @@ describe('addresses-controller#V4', () => {
createdAtHeight: testConstants.defaultPerpetualPosition.createdAtHeight,
exitPrice: null,
closedAt: null,
subaccountNumber: testConstants.defaultSubaccount.subaccountNumber,
},
},
assetPositions: {
Loading

0 comments on commit 5729a4d

Please sign in to comment.