Skip to content
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

L1: get a random peer from the kademlia table #1317

Open
fmoletta opened this issue Nov 27, 2024 · 0 comments · May be fixed by #1536
Open

L1: get a random peer from the kademlia table #1317

fmoletta opened this issue Nov 27, 2024 · 0 comments · May be fixed by #1536

Comments

@fmoletta
Copy link
Contributor

fmoletta commented Nov 27, 2024

Backend processes may need to request data from peers, in order to do this, a peer should be randomly selected from the kademlia table.
This can also be extended with #1318 in order to select a random peer that supports a given capability

@mpaulucci mpaulucci added this to the [L1] 4 - P2P Network milestone Nov 28, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 28, 2024
**Motivation**
Support syncing via fullsync
<!-- Why does this pull request exist? What are its goals? -->

**Description**

- Implement full sync
- Trigger full sync in fork choice update
- Implement communication between backend and peers in p2p crate via
channels that allow to send and receive messages from the peer data on
the kademlia table to the peer's active connection listen loop. This way
backend processes, such as syncing, can make requests and receive
responses from a chosen peer

Leftover work: #1317 #1318 

Status:
Succesfully passes `ethereum/sync` test suite when removing V3-specifc
fork choice & payload checks (see commit
[c6d6767](c6d6767))

This PR shares the same basis as snap-sync #1209 

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes: None, but is a good basis for snap sync

---------

Co-authored-by: Esteban Dimitroff Hodi <[email protected]>
Co-authored-by: Martin Paulucci <[email protected]>
Co-authored-by: Francisco Krause Arnim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants