-
Notifications
You must be signed in to change notification settings - Fork 0
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
Deterministic subnet peer discovery #4
Deterministic subnet peer discovery #4
Conversation
@divagant-martian @AgeManning This is still a work in progress, but please check if it is progressing in the right direction. |
Hey @ackintosh - Nice. I had a quick skim, and noticed you threaded the slot clock all the way through lighthouse_network. The original design was to try and keep many of the consensus-level types/traits away from the The way around this has been to add all kinds of consensus objects into the So I think it might be best to add the discovery logic somewhere in the |
… `lighthouse_network`
📝 https://github.com/divagant-martian/lighthouse/actions/runs/7327518748/job/19954506433?pr=4
|
Could you have another look at this? I think I have implemented what we need for deterministic subnet discovery. I confirmed that prefix search ( |
I've created another PR for the sigp repo from this branch, so I'm closing this one. |
Issue Addressed
sigp#3648
This PR is based on the deterministic subnets upgrade.
Proposed Changes
--prefix-search-for-subnet
to enable prefix search.PrefixMapping
that stores mappings ofSubnetId
toNodeId
s.PrefixMapping::get_target_nodes
to get targetNodeId
s when run prefix searching.Additional Info
I've measured the improvement in (attestation subnet) peer discovery brought about by this PR, based on the sent/received bytes and the number of nodes found during the discovery process.
I've run lighthouse five times each for Random search and Prefix search, observing the sent/received bytes for discovery and the number of nodes found. Based on the results below, the discovery process with Prefix search has improved by approximately 3x compared to Random search.
Note for self: Here are the changes used for the measurement.