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 Validator Field Trie #13661

Merged
merged 3 commits into from
Feb 26, 2024
Merged

Copy Validator Field Trie #13661

merged 3 commits into from
Feb 26, 2024

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Feb 23, 2024

What type of PR is this?

Optimization

What does this PR do? Why is it needed?

In #10884, we introduced the ability to simply transfer a trie rather than constantly copy it to save the amount of memory allocated by the node. However with the beacon chain growing in size and the reality with dealing with late blocks during changes to the validator registry, this approach has many downsides.

We now choose to bring back the ability to copy the validator trie during recomputation. The downside is a slight increase in memory used by the node. However, having the trie copied allows the node to deal with late blocks much more efficiently mainly due to the fact that validator roots do not have to be recomputed from scratch. This step is very expensive and can stress the node non-trivially.

Which issues(s) does this PR fix?

N.A

Other notes for review

@nisdas nisdas added the Ready For Review A pull request ready for code review label Feb 23, 2024
@nisdas nisdas requested a review from a team as a code owner February 23, 2024 11:31
@nisdas nisdas added this pull request to the merge queue Feb 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 26, 2024
@nisdas nisdas added this pull request to the merge queue Feb 26, 2024
Merged via the queue into develop with commit ddb321e Feb 26, 2024
17 checks passed
@nisdas nisdas deleted the copyOnlyForValidator branch February 26, 2024 14:08
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.

2 participants