-
-
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
feat: switch to compounding from consolidation requests #7122
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## nc/devnet-4 #7122 +/- ##
==============================================
Coverage ? 48.97%
==============================================
Files ? 596
Lines ? 39825
Branches ? 2059
==============================================
Hits ? 19504
Misses ? 20280
Partials ? 41 |
Performance Report✔️ no performance regression detected Full benchmark results
|
68aad76
to
37b1b7b
Compare
Switching target branch to |
packages/state-transition/src/block/processConsolidationRequest.ts
Outdated
Show resolved
Hide resolved
consolidationRequest: electra.ConsolidationRequest | ||
): boolean { | ||
const {sourcePubkey, targetPubkey, sourceAddress} = consolidationRequest; | ||
const sourceIndex = state.epochCtx.getValidatorIndex(sourcePubkey); |
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.
we could save the index lookup if we compare the pubkeys first, not sure if it's worth though but would match more closely to the spec
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.
we could save the index lookup if we compare the pubkeys first, not sure if it's worth though but would match more closely to the spec
Let's do the optimization later. This part of spec is sub-optimized and will very likely to be cleaned up in alpha 9 or 10. We can optimize when the spec gets refactored.
Spec changes
processConsolidationRequest
processConsolidationRequest
will also switch the request's target validator to compounding instead of waiting untilprocessPendingConsolidations
in epoch processing.applyDeposit
.Engineering changes
EpochTransitionCache.newCompoundingValidators
added in fix: improve processEffectiveBalanceUpdates #7043 as compound switching now happens in block processing instead of epoch processing. cc @twoeths