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

Reduce attester state copies #6025

Merged
merged 6 commits into from May 28, 2020
Merged

Reduce attester state copies #6025

merged 6 commits into from May 28, 2020

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented May 28, 2020

What type of PR is this?

Feature

What does this PR do? Why is it needed?
This significantly reduces the amount of head state copy for RPC attester from ASSIGNED_COMMITTED_COUNT down to 1. With great saving when there's multiple keys, because chances are a validator client are assigned to more than 1 committee. In the current experiment, we see with 50 validators, the validator client are very often assigned to 8 committees per slot. That's 7 extra copies saved. This works because shard is not in play for phase 0, all committees are the same from beacon node's perspective.

Gated behind feature flag --reduce-attester-state-copy

Which issues(s) does this PR fix?

Fixes #5961

Other notes for review
Tested it locally for 12 hours with 4k validators. This saves ~1GB run time memory. For 4k, less than 1.5GB memory used. The for attester's head state copy is gone
Screen Shot 2020-05-28 at 6 54 17 AM

@terencechain terencechain added the Enhancement New feature or request label May 28, 2020
@terencechain terencechain requested a review from a team as a code owner May 28, 2020 13:59
@terencechain terencechain self-assigned this May 28, 2020
@terencechain terencechain marked this pull request as draft May 28, 2020 14:51
@terencechain terencechain marked this pull request as ready for review May 28, 2020 16:52
@terencechain terencechain added the Ready For Review A pull request ready for code review label May 28, 2020
@0xKiwi 0xKiwi merged commit 3fe47c0 into master May 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the efficient-attdata-caching branch May 28, 2020 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce head state copy for attester and aggregator
2 participants