-
-
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
feat: peerdas - ensure there are at least n peers per sampling column subnet #7274
base: peerDAS
Are you sure you want to change the base?
Conversation
review note: look at packages/beacon-node/src/sync/range/utils/peerBalancer.ts and talk to @twoeths about sync strategy and how this PR affects that (or should it if not) |
type CachedENR = { | ||
peerId: PeerId; | ||
multiaddrTCP: Multiaddr; | ||
subnets: Record<SubnetType, boolean[]>; | ||
addedUnixMs: number; | ||
custodySubnetCount: number; | ||
peerCustodySubnets: number[]; |
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.
this ain't the spec right? if not are you proposing a spec change in line with this PR?
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.
this is implementation specific and not part of the spec
here we store peerCustodySubnets
once to reuse later
if (oldMetadata === null || oldMetadata.csc !== peerData.metadata.csc) { | ||
void this.requestStatus(peer, this.statusCache.get()); | ||
} | ||
// TODO: why request status again? |
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.
should request metadata if metadata is old or non existent
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.
need to request status again in order to update network's datacolumns of this peer, will add that to the comment
as requested by @g11tech I added back |
Motivation
8
data columns from sampling subnetsn
number of peers per subnet for nown
number of peers per column sampling subnetDescription
custodySubnets
inpeersData
so that we don't have to compute it all the timestargetColumnSubnetPeers = 6
which make it easy to achieve after a few heartbeats but this could be changed with a newly added cli flag with the same nameonlyConnect*
flags