-
-
Notifications
You must be signed in to change notification settings - Fork 317
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: transfer cache in prepareNextSlot epoch transition #6068
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
after testing for 4 more days, the difference on epoch transition time is quite random (mainnet node is better but others are worse) so we can't count on that metric. @dapplion do you know what other metrics should I look into? |
@tuyennhv there are metrics to check how often the validator and balance caches are populated in the state used in state transitions. If the rate of cache hits is higher, then the PR should be merged. lodestar/packages/state-transition/src/metrics.ts Lines 11 to 14 in 2b5935a
|
🎉 This PR is included in v1.13.0 🎉 |
Motivation
While investigating #6063 I found we only transfer cache when verifying block
lodestar/packages/beacon-node/src/chain/blocks/verifyBlock.ts
Line 66 in 421fd1a
However at epoch boundary when
getPreState()
we get the checkpoint state instead of state of previous epoch to save us an epoch transitionlodestar/packages/beacon-node/src/chain/regen/queued.ts
Line 150 in 421fd1a
Description
prepareNextSlot()
when we cache Previous Root Checkpoint Staterelated to #6063
Test Result
Epoch transition of this branch vs
unstable
groupon all types of node I see lower epoch transition time except for
novc
whereunstable
is significantly faster, not sure why it is like that but epoch transition onnovc
is inconsistent between groups so I'd not trust it