-
Notifications
You must be signed in to change notification settings - Fork 12
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
Subnet search #79
base: unstable
Are you sure you want to change the base?
Subnet search #79
Conversation
b3f23cc
to
3790744
Compare
fbf8961
to
13d8afb
Compare
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.
Nice.
I notice the subnet queries are still a TODO
, so just noting that.
I don't actually know about the SSV subnet specification. We might be able to simplify some things by having all the subnets long-lived (i.e we dont have to try and rotate or find peers for various subnets given a fixed operator set).
In Lighthouse we've recently changed to deterministic subnets, where the first few bits of a node-id is used to determine who should listen on which subnet. This way we can search for a node-id with a given prefix (so the XOR metric in kad) is efficient at finding them, rather than a random walk. We probably should suggest doing the same for SSV.
The other thing we need to know is how the backbone structure is formed. i.e which nodes are supposed to be permantently subscribed to which subnet.
All of these things are just spec related, maybe we already know. This PR looks good to me as base structure to move on from. Nice :)
What part exactly? In this PR we can search for peers in a subnet, some comments may be misleading. I left them as there are more things to do, this is the bare minimum. |
4cff486
to
0d60e82
Compare
subnets_searched_for = ?subnets_searched_for, | ||
"Grouped subnet discovery query yielded no results.", | ||
); | ||
// TODO queries.iter().for_each(|query| { |
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.
I was referring to these todos
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.
It's because it's based on LH code and there're more things that I don't understand yet and I'm not sure it's necessary now. What do you think?
Err(e) => { | ||
warn!(error = %e, "Subnet query failed"); | ||
} | ||
} | ||
// TODO handle subnet queries |
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.
And this one
0d60e82
to
3055d61
Compare
Co-authored-by: Daniel Knopik <107140945+dknopik@users.noreply.github.com>
3055d61
to
e396861
Compare
Issue Addressed
Related to #35
Proposed Changes
ssv
field in the ENR isn't necessary anymore.Additional Info
It advertises and searches for subnet number 9. This is an arbitrary choice for test purposes and does not have any specific significance.