-
-
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: consume new ssz batch hash branch #6939
Closed
Closed
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
twoeths
force-pushed
the
te/batch_hash_tree_root
branch
from
July 16, 2024 02:23
dfeecf5
to
24d575e
Compare
a side effect from this branch is "Process block commit step avg time" is usually higher than |
* fix: sync listValidator.ts from ssz * fix: reuse HashComputationGroup in some flows * feat: use same HCGroup for epoch transition * fix: only batch hash balances of state in epoch transition
twoeths
force-pushed
the
te/batch_hash_tree_root
branch
from
August 2, 2024 07:13
8e09d4c
to
784a9ba
Compare
* fix: compute validator root in ListValidatorTreeViewDU * fix: compute state root in batch in stateTransition() * fix: correct process_block metric * fix: no batch hash in beacon-node block transition, do it in state-transition * chore: add comment
* fix: remove get*Iter() apis from ssz * feat: decompose validators at epoch transition * fix: improve beforeProcessEpoch() using state.validators.forEachValue() * fix: only populate isCompoundingValidatorArr if electra * fix: use forEach() to improve processEth1Data * fix: use forEach() for getEffectiveBalanceIncrementsZeroInactive() * chore: minimal change of beforeProcessEpoch() compared to te/batch_hash_tree_root
* feat: implement balances tree cache * fix: set balancesTreeCache when clone EpochCache
closing in favor of #7171 |
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
hash_tree_root
time in lodestar, especially at epoch transition timeDescription
te/batch_hash_tree_root
ssz branch, the critical update there is usinghashtree
and minimal memory allocation to compute tree rootListValidatorTreeViewDU
from the ssz branch, the main thing is to compute validators' roots in batch duringcommit()
phasehashTreeRoot()
is improved in 2 ways:HashComputation[]
in batchpart of ChainSafe/ssz#355
closes #6598
TODOs
hashTreeRoot()
inside state transition causes more memory and gc? right now we do thehashTreeRoot()
in beacon-node instead. Will retry when we have a published version because right now I only consume local ssz branch on test nodes. Update: resolved in fix: batch hash tree root in state transition #7032hashTreeRoot()
is computed, if we call some read-only operations, likestate.balances.length
orstate.validators.length
, it will rebind and recompute the tree root again. Need to find a way to avoid that, see ViewDU container rebinds node with read-only operations ssz#379