-
-
Notifications
You must be signed in to change notification settings - Fork 289
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(slashing-protection): filter by db bucket when loading pubkeys #5437
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nflaig
force-pushed
the
nflaig/vc-db-metrics-bucket-labels
branch
from
April 29, 2023 14:33
15351bf
to
c38e951
Compare
nflaig
force-pushed
the
nflaig/apply-min-max-key-filtering
branch
from
April 29, 2023 14:38
d223c7b
to
0602ee5
Compare
nflaig
force-pushed
the
nflaig/apply-min-max-key-filtering
branch
from
April 29, 2023 16:54
0602ee5
to
f1aaade
Compare
Performance Report✔️ no performance regression detected Full benchmark results
|
nflaig
force-pushed
the
nflaig/apply-min-max-key-filtering
branch
from
April 29, 2023 20:18
f1aaade
to
3ed8d04
Compare
nflaig
commented
Apr 29, 2023
packages/validator/src/slashingProtection/attestation/attestationByTargetRepository.ts
Show resolved
Hide resolved
dapplion
reviewed
Apr 30, 2023
packages/validator/src/slashingProtection/block/blockBySlotRepository.ts
Show resolved
Hide resolved
nflaig
changed the title
fix(validator): filter by min-max key when loading pubkeys from db
fix(slashing-protection): filter by min-max key when loading pubkeys from db
May 2, 2023
nflaig
changed the title
fix(slashing-protection): filter by min-max key when loading pubkeys from db
fix(slashing-protection): filter by bucket when loading pubkeys from db
May 3, 2023
nflaig
changed the title
fix(slashing-protection): filter by bucket when loading pubkeys from db
fix(slashing-protection): filter by db bucket when loading pubkeys
May 3, 2023
Just to reconfirm, exporting a 200MB slashing protection file works on a VC with 2k keys, would consider the OOM issue fixed. |
dapplion
approved these changes
May 4, 2023
🎉 This PR is included in v1.9.0 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Closes #4261
Description
Applies min-max key filter to db query to only get pubkeys from bucket used by repository. The OOM mentioned in #4261 was caused by a combination of #5356 (causing the db state to be quite huge) and the db query not applying any filtering.
Note: There is currently no limit on how many attestation are stored in the db. In some extrem cases could still run into OOM issues. This is likely only relevant for big operators that run many validators but pruning strategy for attestation would be something useful to implement in the future.
lodestar/packages/validator/src/slashingProtection/attestation/index.ts
Line 46 in f0dec8c
Other solution that can be implemented is to provide the option to just export the slashing protection for a subset of validators
lodestar/packages/cli/src/cmds/validator/slashingProtection/export.ts
Line 49 in f0dec8c
Depends on #5436 to be merged first to avoid conflicts.