-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Experiment n historical states #5968
Comments
Regarding merging ssz state bytes to an existing TreeViewDU state, I have some statistics from this branch https://github.com/tuyennhv/lodestar/blob/tuyen/state_perf_test/packages/state-transition/test/unit/util/migrateState.test.ts#L71C9-L71C9
Note this assumes we have a Shuffling cache to save time when creating |
Really cool to see you exploring this solution direction!
Do you propose to store the hashing cache in the DB, or load it from a similar state available in memory? |
@dapplion I'd load it from a similar state available in memory. If I migrate from a mainnet seedState 1 day ago to current mainnet state, it takes ~ |
This has been resolved since we now enable n historical states by default |
Problem description
Today lodestar stores up to 96 states in state cache and up to 10 epochs of checkpoint states in checkpoint state cache, along with justified and finalized state. It causes us a lot of memory and node has to restarted multiple time due to OOM in long unfinality period like in early days of Holesky
Solution description
Map<Epoch, Map<RootHex, Shuffling>>
getLatest()
orget()
, load from db/file if neededAdditional context
Storing temp state to level db and later on remove it may cause the db to grow, may consider persisting it to file system and removing them when chain is finalized
Progress
The text was updated successfully, but these errors were encountered: