Closed vincentwschau closed 3 weeks ago
The changes in this pull request involve modifications to several files, primarily focusing on enhancing the functionality and performance of the funding index updates retrieval process. Key updates include the addition of a maximum height variable in the SQL query logic, a new configuration parameter for vault settings, improved logging and performance measurement in the vault controller, and the introduction of methods for efficient data retrieval. These changes collectively refine the data handling and observability of the vault-related operations.
File Path | Change Summary |
---|---|
indexer/packages/postgres/src/stores/funding-index-updates-table.ts |
Added variable maxheight in findFundingIndexMaps to limit effectiveAtHeight in SQL query. |
indexer/services/comlink/src/config.ts |
Introduced new config parameter VAULT_FETCH_FUNDING_INDEX_BLOCK_WINDOWS with default value 250,000. |
indexer/services/comlink/src/controllers/api/v4/vault-controller.ts |
Added logging and timing for operations, introduced getFundingIndexMapsChunked , and added getHeightWindows . |
findFundingIndexMaps
.findFundingIndexMaps
function regarding how data is processed and retrieved.findFundingIndexMaps
function, as both involve refining how data is processed and utilized.findFundingIndexMaps
function operates.backport/indexer/v7.x
In the fields where numbers play,
A max height leads the way.
Configs grow, and logs will sing,
Fetching funds, a joyful thing!
With each update, we refine,
Hopping forward, all align! πβ¨
@Mergifyio backport release/indexer/v7.x
backport release/indexer/v7.x
Changelist
Chunk the funding index maps to get for each vault subaccount to reduce the amount of rows scanned. Heights to get funding index maps for will be separated into chunks that cover 250k blocks each (number of blocks per chunk can be configured). Updated funding index map query to limit searches to both a min and max block height.
Additional fixes:
Test Plan
Existing unit tests.
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
Improvements