chore(upgrade): clean leftover state in v0.2.14#1287
Conversation
81a3dbc to
b51d8b1
Compare
|
/run-integration |
|
i think this task should include analysis amount of state / state history used by prefix. then we check what can be removed. the state size is quite big still, we need to understand why |
Adds an offline `inferenced state-stats` command that reports per-store and per-inference-prefix committed state size, with legacy prefixes flagged as cleanup candidates. Backed by a StatePrefixCatalog single-source-of-truth that maps every inference prefix to a readable name. Addresses the review request to analyze state size by prefix before deciding what to remove (issue gonka-ai#1223). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@gmorgachev good point — agreed that we should drive removal from measured per-prefix size, not just remove the prefixes we already know are dead. I added an offline analysis command for exactly this: What it does:
So the workflow to answer "why is state big / what else can we drop":
I don't have a mainnet DB locally, so I can't paste the actual breakdown here. If someone with access to a node/snapshot can run |
|
/run-integration |
|
@Ryanchen911 To run that, we'd need to have the new binary running on main-net, wouldn't we? Couldn't we use |
|
@patimen no mainnet deployment needed — state-stats is an offline, read-only command. It opens the DB exclusively, so you just run it once against a snapshot or a copy of a node's data dir (node stopped). I think inferenced export won't answer Gleb's question, unfortunately: If running the branch binary against a snapshot is too much friction for this PR, I think we can split it: merge the known-legacy cleanup now, and track the per-prefix size analysis (Gleb's ask) as a separate task where ops can run state-stats on a snapshot whenever convenient. Either way works. |
|
I have run this on mainnet... there is no way we're going to be able to do this kind of large scale pruning in an upgrade handler. Deletion is not cheap in 0.53.3 of Cosmos, it will take a very long time by my estimation (10-30 minutes) for each major component we need to clear. Store Size Breakdown
Inference Prefix Breakdown
|
Summary
Closes #1223
Tests
Identified leftovers