Skip to content

chore: remove reallocate step and add continuous RAV collection for long lived allocation#1181

Merged
Maikol merged 4 commits intomain-dipsfrom
feat/dips-continuous-collection
Apr 22, 2026
Merged

chore: remove reallocate step and add continuous RAV collection for long lived allocation#1181
Maikol merged 4 commits intomain-dipsfrom
feat/dips-continuous-collection

Conversation

@Maikol
Copy link
Copy Markdown
Member

@Maikol Maikol commented Mar 17, 2026

No description provided.

@github-project-automation github-project-automation Bot moved this to 🗃️ Inbox in Indexer Mar 17, 2026
@Maikol Maikol changed the title chore: remove reallocate step and add continuous RAV collection for l… chore: remove reallocate step and add continuous RAV collection for long lived allocation Mar 17, 2026
Base automatically changed from feat/dips-on-chain-accept to feat/dips-pending-rca-consumer April 10, 2026 12:45
Base automatically changed from feat/dips-pending-rca-consumer to feat/dips-support April 10, 2026 13:12
Base automatically changed from feat/dips-support to main-dips April 10, 2026 13:21
@Maikol Maikol force-pushed the feat/dips-continuous-collection branch from 52f343d to e559039 Compare April 10, 2026 13:23
private epochSubgraph: SubgraphClient,
) {}

async hasActiveDipsAgreement(allocationId: string): Promise<boolean> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this query against network sub and got Type 'Query' has no field 'indexingAgreements' just making a note here, although likely doesnt matter anyway as we have the other subgraph. The note here is more for incase this doesnt get looked at again later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is changing later, there's a branch for the network subgraph that has this entity but this is already different in #1201

{ allocationId: allocationId.toLowerCase() },
)
return (result.data?.indexingAgreements?.length ?? 0) > 0
} catch {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: After fixing the above query, we could change catch { return false } to catch { return true } and log a warning so the failure is observable.

At the moment if the error path is hit because the query doesnt work, then we can't determine agreement status, but the unallocate action goes through anyway.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a critical error for running dips, if dips is enabled I believe we should stop execution until fixed, else you could be running without realizing that you have a wrong subgraph configured unless you look at the logs and you could easily miss it due to the amount of output the agent generates.

private async pendingRAVs(): Promise<ReceiptAggregateVoucherV2[]> {
return await this.models.receiptAggregateVouchersV2.findAll({
where: { last: true, final: false },
where: { final: false },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping last: true also pulls in old RAVs that dont need to be collected since their value is already included in the latest RAV.

Suggested: { last: true, final: false }

markRavsAsFinal requires last = TRUE, so old RAVs can't be archived.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RAVs are re-generated for the same allocation, we don't get duplicated RAVs but it overrides the existing one. If we filter by last: true we won't be redeeming until the indexer closes the allocation and allocations are now long lived so we need to not filter by last: true.

Comment thread packages/indexer-common/src/allocations/graph-tally-collector.ts
Comment thread packages/indexer-common/src/allocations/graph-tally-collector.ts
@Maikol Maikol merged commit 2b6eff5 into main-dips Apr 22, 2026
3 checks passed
@Maikol Maikol deleted the feat/dips-continuous-collection branch April 22, 2026 14:27
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🚗 Merged in Indexer Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

2 participants