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

kad: Providers part 7: better types and public API, public addresses & known providers #246

Merged
merged 43 commits into from
Sep 30, 2024

Conversation

dmitry-markin
Copy link
Collaborator

@dmitry-markin dmitry-markin commented Sep 18, 2024

This PR introduces the following changes:

  1. Introduces a better type ContentProvider without a burden of KademliaPeer.
  2. Simplifies public litep2p content providers API.
  3. Uses PublicAddresses API when advertising local providers.
  4. Adds locally known providers to discovered providers when performing GET_PROVIDERS request.
  5. Emits IncomingProvider event when remote node registers as a provider via ADD_PROVIDER request.

It may be easier to review this PR through individual commits. The commits of interest are:

  1. Introduce ContentProvider type
  2. Use PublicAddresses API
  3. Use locally known providers when performing `KademliaHandle::get_providers() request
  4. Emit IncomingProvider event

All other commits are merge commits from upstream branches.

Builds upon #245.

@dmitry-markin dmitry-markin added the enhancement New feature or request label Sep 18, 2024
Copy link
Collaborator

@lexnv lexnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Will probably need to take a quick look at the first PR in the series after all others are merged into it 🙏

@dmitry-markin
Copy link
Collaborator Author

Will probably need to take a quick look at the first PR in the series after all others are merged into it 🙏

My idea was to merge PRs one-by-one into master. When the first PR is merged, GitHub will automatically set the target branch for the second PR to master, and so on.

@lexnv
Copy link
Collaborator

lexnv commented Sep 23, 2024

Sounds like a plan! 👍

Base automatically changed from dm-stop-providing to master September 30, 2024 14:44
@dmitry-markin dmitry-markin merged commit 1a0325c into master Sep 30, 2024
8 checks passed
@dmitry-markin dmitry-markin deleted the dm-improve-providers-api branch September 30, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Blocked ⛔️
Development

Successfully merging this pull request may close these issues.

2 participants