Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add DHT Node example with better message visualization #48

Merged
merged 7 commits into from
Feb 9, 2025

Conversation

MiguelMedeiros
Copy link
Member

Enhanced the node example with better formatting and more detailed statistics:

  • Added colored output for better readability
  • Improved DHT size estimation display with proper percentage formatting
  • Added structured message logging with clear message types (find_node, get_peers, etc)
  • Included basic node information display (ID, addresses, firewalled status)
  • Added message type explanations in trace logs

The example now provides a clearer view of DHT node operations and network statistics.

Usage

Run the example with:

RUST_LOG=trace cargo run --example node

This enhancement makes it much easier to:

  • Monitor DHT network activity
  • Debug message flows
  • Understand node interactions
  • Track network size and health
  • Visualize message patterns

image

@MiguelMedeiros MiguelMedeiros added the enhancement New feature or request label Feb 9, 2025
@MiguelMedeiros MiguelMedeiros requested a review from Nuhvi February 9, 2025 03:05
@MiguelMedeiros MiguelMedeiros self-assigned this Feb 9, 2025
@MiguelMedeiros MiguelMedeiros requested a review from Nuhvi February 9, 2025 12:07
@Nuhvi Nuhvi merged commit 3136b65 into main Feb 9, 2025
1 check passed
@MiguelMedeiros MiguelMedeiros deleted the feat/new-node-example branch February 9, 2025 12:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants