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
Progressively compute target stake #4294
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
For some reason build:docs script breaks in this PR https://github.com/ChainSafe/lodestar/runs/7339174005?check_suite_focus=true
Running locally:
Fix: |
@@ -369,6 +376,23 @@ export function beforeProcessEpoch(state: CachedBeaconStateAllForks): EpochProce | |||
currTargetUnslStake += effectiveBalanceByIncrement; | |||
} | |||
} | |||
|
|||
if (opts?.assertCorrectProgressiveBalances) { |
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.
why is this configurable? because it was only used during debugging? and in normal practice it just adds overhead?
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.
Seems like it could/should just be 'always on'
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.
@wemeetagain yeah I think we can turn it on when:
- code is unchanged for a while
- sync through prater
- sync through mainnet
- other testnets?
Motivation
Research into computing target stake progressively to compute participation through an epoch instead of at the end of epoch.
Description
currentTargetUnslashedBalanceIncrements, previoustTargetUnslashedBalanceIncrements
and compute it per block processingbeforeEpochProcess
, by default do the assertion in spec tests