-
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
Lazy loading of State #4326
Comments
Is this more in regards to height and historical queries? |
yes it enables historical queries but right now if you sync a node that can answer historical queries and then have to restart the node, restarting will take hours cause of eager state loading. |
I see. What you suggest makes sense then. ref: #4318 |
Just to clarify what @zmanian is stating, whenever an application starts, the flow is as follows:
So it seems each version (root) will be reloaded for each store when an application starts. |
Taking a further look, I don't believe we can make the necessary changes from the SDK, but rather we must update iavl to provide this ability. |
Can you explain what changes are needed @alexanderbez ? |
I'll write a quick POC and submit a PR to the iavl repo. |
Tested a working POC w/ cosmos/iavl#148 successfully. Also tested height queries successfully. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
this has been done already in iavl v1 |
The original motivation for state pruning in the cosmos-sdk is that once we had stable testnets, restarting a blockchain node could take 10+ hours because we eagerly load all the unpruned states before the node starts serving requests.
At the time we talked about making it more convenient to run archive nodes by making it so gaia lazily loads old states on request when accessible on disk.
The text was updated successfully, but these errors were encountered: