Open rvagg opened 1 month ago
@rvagg : newbie question here: does this only apply for the events db, or do we need to cover the messages and transactions dbs as well?
txhash.db has a GC already
I think msgindex.db does a basic GC on lotus startup
It's events that's the main problem, because it doesn't have any, and it accumulates a lot quicker and gets a lot larger. But we could apply the same pattern to the others when we implement it.
Tie event lifetime to blockstore lifetime. Make this configurable but if you have a splitstore enabled then events shouldn't persist if you don't have the blocks available for them.
Needs some consideration though:
eth_getLogs
andGetActorEventsRaw
I think should still work on old epochs even if you don't have the blocks, maybe that's desirable? We could make this configurable to either have a config option with "number of epochs to store" or "follow splitstore".