-
Notifications
You must be signed in to change notification settings - Fork 747
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
Support changing/downgrading state pruning mode #4671
Comments
This is already supported. For the other ones, it makes sense and we should also support them. |
Another use case is to sync a partial archive node, i.e.,
Specifically, a new node is started with fast sync to get synced quickly, afterward, it can be transitioned to operate as an archive node. The key difference for a partial archive node is the state before the snapshot is not accessible. In Ethereum, it's possible to initiate with snap sync and later switch to an archive node. |
This will require more implementation logic, the cases I described are much simpler because they are subsets of each other. |
I feel that supporting |
This is about simply removing stuff from the database that is no longer needed. Downloading stuff that is missing involves networking and a whole bunch more complexity. |
Well, I don't see how |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
State pruning modes can be seen as subsets of each other. For example
archive-canonical
is a subset ofarchive
, while constrained to a number of blocks can be a subset of botharchive-canonical
andarchive
. Even constrained pruning with 10k blocks is a subset of constrained pruning with 100k blocks.Unfortunately right now node will refuse to start if pruning mode is different from what it was when database was created originally, even though technically it should be possible to downgrade from one of the pruning modes to its subset.
While current behavior generally makes sense for Substrate CLI, when Substrate is used as a library it might be desired to be able to change pruning modes over time. Our Subspace protocol didn't support pruning of some kinds originally, but then evolved to support it, but we're stuck with large state databases for existing users due to lack of upgrade to more constrained versions of it.
Request
Support changing/downgrading of pruning modes like this:
Solution
No response
Are you willing to help with this request?
Maybe (please elaborate above)
The text was updated successfully, but these errors were encountered: