Skip to content
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

Update the logic for pruning the unfinalized headers #5646

Open
nazarhussain opened this issue Jun 14, 2023 · 0 comments
Open

Update the logic for pruning the unfinalized headers #5646

nazarhussain opened this issue Jun 14, 2023 · 0 comments
Assignees
Labels
help wanted The author indicates that additional help is wanted. meta-feature-request Issues to track feature requests. prio-low This is nice to have. scope-light-clients All issues regarding light client development.

Comments

@nazarhussain
Copy link
Contributor

Problem description

In @lodestar/prover we store the payloads and roots. The roots are divided into finalized and unfinalized categories. The finalized roots are cleaned based on MAX_PAYLOAD_HISTORY.

for (
let blockNumber = this.finalizedRoots.max - MAX_PAYLOAD_HISTORY;
blockNumber > this.finalizedRoots.min;
blockNumber--
) {

There could be cases when chain is not finalized and endup huge memory bloat for unfinalized root.s

Solution description

We nee to develop similar limit for unfinalzied roots similar to MAX_PAYLOAD_HISTORY. And this value should be configureable so based on different networks user can configure.

Additional context

Extracted from #4706

@nazarhussain nazarhussain added the meta-feature-request Issues to track feature requests. label Jun 14, 2023
@philknows philknows added the scope-light-clients All issues regarding light client development. label Jun 16, 2023
@philknows philknows added the prio-medium Resolve this some time soon (tm). label Nov 7, 2023
@wemeetagain wemeetagain added prio-low This is nice to have. help wanted The author indicates that additional help is wanted. and removed prio-medium Resolve this some time soon (tm). labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The author indicates that additional help is wanted. meta-feature-request Issues to track feature requests. prio-low This is nice to have. scope-light-clients All issues regarding light client development.
Projects
None yet
Development

No branches or pull requests

3 participants