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

Fix heap memory issue when processing attestations for altair #4404

Merged
merged 1 commit into from Aug 13, 2022

Conversation

tuyennhv
Copy link
Contributor

Motivation

This PR #4294 causes the memory to increased a lot, the reason is we access state.validators.get() on every indexed attestations (20_000 times per block), see #4397 (comment)

Description

  • As instructed by @dapplion , use state.validators.getReadOnly() instead of state.validators.get()
  • Confirmed by the test posted in the issue

Closes #4397

@tuyennhv tuyennhv requested a review from a team as a code owner August 12, 2022 14:34
@tuyennhv tuyennhv mentioned this pull request Aug 12, 2022
2 tasks
@tuyennhv tuyennhv changed the base branch from rc/v0.42.0 to unstable August 12, 2022 14:53
Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should not include a version bump

@dapplion dapplion merged commit 20edb58 into unstable Aug 13, 2022
@dapplion dapplion deleted the tuyen/fix-heap-memory-issue branch August 13, 2022 14:19
@dapplion dapplion mentioned this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.42.0: Heap memory increased
3 participants