Closed dydxwill closed 6 days ago
[!WARNING]
Review failed
The pull request is closed.
This update introduces significant enhancements and new test scenarios for the PNL tick
creation and calculation logic. It includes additional logging to track key details, error conditions, and significant changes in equity or total PNL. The changes also ensure the workflow triggers for a new branch, 'wl/pnldbg2'
, alongside other branches.
Files | Change Summaries |
---|---|
.github/workflows/indexer-build-and-push-mainnet.yml |
Added 'wl/pnldbg2' branch to trigger workflow along with existing branches. |
indexer/services/roundtable/__tests__/helpers/pnl-ticks-helper.test.ts |
Added new test cases for missing price scenario and perpetualId/marketId mismatch in calculateEquity . |
indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts |
Added detailed logging for tracking PNL tick creation and calculation of equity and total PNL. |
indexer/services/roundtable/src/tasks/create-pnl-ticks.ts |
Imported perpetualMarketRefresher and added call to updatePerpetualMarkets() in runTask function. |
Amidst the code where numbers dance,
We've given equity a fighting chance.
Logs now track each tick and tale,
To ensure our PNL won't derail.
So here's a cheer, a code delight,
For branches new and tests so bright! 🌟 👾
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@mergifyio backport release/indexer/v5.x
backport release/indexer/v5.x
Changelist
calculateEquity function was failing when marketId!=perpetualId, as is the case for dydx (perpetualId=63, marketId=1000001)
Test Plan
Tested in e2e env.
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit
New Features
Bug Fixes
Logging Enhancements
Performance Improvements