-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keepInterval
to PruningOptions
to support more flexible pruning strategy
#13058
Comments
@p0mvn I'm not 100% sure about the current pruning logic, could you help confirm and give some advice? |
I'm not really following the proposal TBH. What does "range with interval" mean? |
How would we replay if only some heights are kept while others are deleted? For example, if To explain the reasons for having To mitigate this, we now auto-prune heights that are multiples of As a result, the need for Please let me know if that helps |
Supposing we have old states kept at heights 3, 6, 9 and our purpose is to serve the request that queries Alice's balance at height 5, we could |
my words could be misleading, I actually means the |
@adu-crypto could you explain the use case in which the intermediate states would be useful? Looking at nodes it seems it would be more useful to use an archive node instead of intervals of state |
@p0mvn is correct -- there was no use case for |
yes, archive node could be used to serve the historical data request, but archive node is extremely big in size and pruned full nodes could save a lot of the disk space. |
or we could choose not to |
I would strongly prefer the architecture of making checkpoints from snapshots. I think the right end-state of LSM-backed DB data layouts is that every state entry stores a 'version diff' (which consequently makes such checkpoints not that well suited in the same DB, and they should exist in a separate DB) But what you could do if you had both (and wanted light client proofs) is: (Granted all of this is probably better architected more directly) |
I'm still not following what this issue is proposing exactly nor what is currently insufficient with the current pruning options. |
@alexanderbez This issue is trying to add a new pruning option to make checkpoints from history versions, because the current pruning just moves any old version states older than Anyway, as the latter solution should be better I would close this issue and try to propose a replaying mechanism for sdk states management to tradeoff between disk space and query performance. what's your suggestion? |
@ValarDragon as for
|
I recall @p0mvn doing all this work to ensure snapshot heights were never pruned until it was safe to do so...? |
this work is being captured in the store v2 design document. We decided to go with iavl snapshots to solve the itermediate states design |
Summary
We could introduce a
KeepInterval
field inPruningOptions
to keep old version states with specific interval.Problem Definition
the current pruning strategy is determined by
PruningOption
:where
Interval
actually means at which height the pruning actions would happen.Sometimes if we could prune the old versions in range with interval, we could save disk storage as well as serving the request for historical data by replaying blocks from the nearest version state.
We could do this by introducing a
KeepInterval
field inPruningOptions
to keep old version states with specific interval.if we could prune the old versions in range with interval, we could save disk storage as well as serving the request for historical data by replaying blocks from the nearest kept block.
Proposal
We could introduce a
KeepInterval
field inPruningOptions
to keep old version states with specific interval.The text was updated successfully, but these errors were encountered: