Conversation
b3f23cc to
3790744
Compare
fbf8961 to
13d8afb
Compare
AgeManning
left a comment
There was a problem hiding this comment.
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.
I was referring to these todos
There was a problem hiding this comment.
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?
| warn!(error = %e, "Subnet query failed"); | ||
| } | ||
| } | ||
| // TODO handle subnet queries |
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
ssvfield 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.