-
-
Notifications
You must be signed in to change notification settings - Fork 300
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: sync cached isCompoundingValidatorArr at epoch transition #7247
Conversation
@@ -106,6 +107,8 @@ function applyPendingDeposit( | |||
// Verify the deposit signature (proof of possession) which is not checked by the deposit contract | |||
if (isValidDepositSignature(state.config, pubkey, withdrawalCredentials, amount, signature)) { | |||
addValidatorToRegistry(ForkSeq.electra, state, pubkey, withdrawalCredentials, amount); | |||
const newValidatorIndex = state.validators.length - 1; | |||
cache.isCompoundingValidatorArr[newValidatorIndex] = hasCompoundingWithdrawalCredential(withdrawalCredentials); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main fix
Performance Report✔️ no performance regression detected Full benchmark results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…s_epoch_transition_cache
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7247 +/- ##
============================================
- Coverage 48.51% 48.51% -0.01%
============================================
Files 600 600
Lines 40121 40131 +10
Branches 2054 2054
============================================
+ Hits 19466 19468 +2
- Misses 20617 20625 +8
Partials 38 38 |
🎉 This PR is included in v1.23.1 🎉 |
Motivation
Fix this error in mekong devnet-0:
Description
validators
is not synced when we add new validator during epoch transitionvalidators
is heavy, and add validators may causegc
isCompoundingValidatorArr
array similar to what we did in batch hash branch https://github.com/ChainSafe/lodestar/pull/7171/files#diff-2aa72e8ced03b2c2844b434f06316a5d2b4c402774965c42ebdf035a74d3c7fdR141