feat: shared CustodyConfig on main thread and network thread#7632
Merged
matthewkeil merged 6 commits intopeerDASfrom Apr 7, 2025
Merged
feat: shared CustodyConfig on main thread and network thread#7632matthewkeil merged 6 commits intopeerDASfrom
matthewkeil merged 6 commits intopeerDASfrom
Conversation
matthewkeil
reviewed
Apr 2, 2025
matthewkeil
reviewed
Apr 2, 2025
Member
matthewkeil
left a comment
There was a problem hiding this comment.
Just the question about naming but looks good. Can get this merged and then have the validator custody build on this commit!
| * Store shared data for different modules in the network stack. | ||
| * TODO: consider moving similar shared data, for example PeersData, under NetworkGlobal. | ||
| */ | ||
| export class NetworkGlobal { |
Member
There was a problem hiding this comment.
Do you mind if we name this NetworkConfig? Or something similar?
matthewkeil
pushed a commit
that referenced
this pull request
Apr 14, 2025
**Motivation** @hughy and I have a basic implementation of [validator custody](https://github.com/ethereum/consensus-specs/blob/dev/specs/fulu/validator.md) for peerDAS. We're planning to do more testing on this, but would appreciate a review on the architecture since we're still pretty new! This relates to #7632 - If it merges, we'll update our PR to account for it. **Description** * Centralizes custody values like `sampledGroups` and `custodyGroups` into `CustodyConfig`. `CustodyConfig` is now treated as a singleton. * Creates a new `advertisedGroupCount` in `CustodyConfig`, used for the custody group count in the node's metadata/ENR. * Adds `setSamplingGroupCount` and `setAdvertisedGroupCount` to NetworkCore API. Updated by an `EventEmitter` on `CustodyConfig`. * Adds LocalValidatorRegistry to track connected validators. * Updates custody requirement in `chain.onForkChoiceFinalized`. **Not Included** I'll open separate issues for these if we're okay merging this PR without them. * Backfilling groups when the target custody group count increases * Handling changes in other peers' custody group counts * Race conditions around group count changing during syncing <!-- A clear and concise general description of the changes of this PR commits --> <!-- If applicable, add screenshots to help explain your solution --> <!-- Link to issues: Resolves #111, Resolves #222 --> Closes #7619 --------- Co-authored-by: Hugh Cunningham <hugh.e.cunningham@gmail.com>
Member
|
🎉 This PR is included in v1.34.0 🎉 |
This file contains hidden or 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
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
Description