gitcoinco / gitcoinco/grants-stack-indexer

prune old contract subscriptions

Open
#490 0 comments 0 reactions 0 assignees View on GitHub
high-priority
Dominant language
TypeScript
Stars
35
Forks
27
PR merge metrics
No merged PRs in 30d

Description

at the moment we keep all contracts we subscribe to, which means the getLogs call grows larger and larger without limits

we have a contract pruner `src/contractSubscriptionPruner.ts` that deletes contracts after X days, this doesn't work for all rounds, as some rounds might run longer than that, so it's disabled at the moment

i think we should use the business logic of rounds to our advantage, some ideas:

- we can assign a default reasonable TTL of 6 months to rounds?
- when a round is paid out, we can immediately unsubscribe
- if a QF round doesn't have votes in weeks, we can unsuscribe

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.