-
Notifications
You must be signed in to change notification settings - Fork 918
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
Regen and save historical states as default #5544
Conversation
return err | ||
// For whatever reason if node is unable to delete a state due to | ||
// state is finalized, it is more reasonable to continue than to exit. | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to log a warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
@@ -54,6 +56,10 @@ func (kv *Store) regenHistoricalStates(ctx context.Context) error { | |||
if err != nil { | |||
return err | |||
} | |||
cacheState, err := lru.New(int(params.BeaconConfig().SlotsPerEpoch) * 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this cache size be at the top of the file as a const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's never used again so we should let this be GC'd after this method returns
@@ -54,6 +56,10 @@ func (kv *Store) regenHistoricalStates(ctx context.Context) error { | |||
if err != nil { | |||
return err | |||
} | |||
cacheState, err := lru.New(int(params.BeaconConfig().SlotsPerEpoch) * 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's never used again so we should let this be GC'd after this method returns
This fixes #5537
Change list:
--disable-new-state-mgmt
flag is offTested it ~10 times using the DBs in Minio. Can confirm this implementation is reliably working