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

Copy All Field Tries For Late Blocks #12461

Merged
merged 8 commits into from
May 30, 2023
Merged

Copy All Field Tries For Late Blocks #12461

merged 8 commits into from
May 30, 2023

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented May 25, 2023

What type of PR is this?

Optimization

What does this PR do? Why is it needed?

In #10884, we added the ability for there to only be one relevant set of field tries held in memory. The main reason this was done was to not have Prysm store outdated field tries in memory as they took up a significant amount of space in the heap.

However doing this has brought some downsides in that older states will have to recompute all the tries for the fields in the event they are used to process a new block or are being used to advance slots. This causes issues when processing late blocks as you do end up having to regenerate the whole set of tries. To allow the next slot cache to function better, we add the ability to copy all tries for late blocks. This allows late blocks to be processed in an efficient manner along with keeping heap usage manageable.

Which issues(s) does this PR fix?

Fixes #12434

Other notes for review

@nisdas nisdas added the Ready For Review A pull request ready for code review label May 25, 2023
@nisdas nisdas requested a review from a team as a code owner May 25, 2023 02:11
@nisdas nisdas added the Blocked Blocked by research or external factors label May 25, 2023
@nisdas nisdas added OK to merge and removed Blocked Blocked by research or external factors labels May 30, 2023
@prylabs-bulldozer prylabs-bulldozer bot merged commit 70152bf into develop May 30, 2023
@prylabs-bulldozer prylabs-bulldozer bot deleted the copyTries branch May 30, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block Missed?
2 participants