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

Improving Node Discovery via DHT Announcements - fixes #152 #184

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

elielnfinic
Copy link

PR Overview:

This pull request addresses issue #152, focusing on enhancing node discovery for peers subscribed to specific topics by utilizing the DHT (Distributed Hash Table) rather than relying on a centralized PubSub mechanism.

Summary of Changes:

DHT Integration: Enabled DHT on the node, allowing topics to map directly to the peers subscribed to them.
Updated packages/network/node.ts file:

Added methods: putDataOnDHT()getDataFromDHT(), announcePeerOnDHT(), removePeerFromDHT(), getPeersOnTopicFromDHT()

Created a new private property: _dht

Added the following external libraries to the network package:
• @libp2p/kad-dht
• @libp2p/peer-id
• @it-last

@elielnfinic elielnfinic marked this pull request as ready for review October 2, 2024 07:41
Copy link
Member

@d-roak d-roak left a comment

Choose a reason for hiding this comment

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

partial review

packages/network/package.json Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
packages/network/src/node.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants