Conversation
52f343d to
e559039
Compare
| private epochSubgraph: SubgraphClient, | ||
| ) {} | ||
|
|
||
| async hasActiveDipsAgreement(allocationId: string): Promise<boolean> { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 }, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.