You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new "DHT Provide" tab to the Diagnostics screen that provides a GUI equivalent of ipfs provide stat -a --compact, allowing users to monitor the health and progress of the Sweep provide system introduced in Kubo v0.38 and enabled by default in v0.39.
This screen would give node operators a one-glance overview of their DHT provide operations, making it easier to understand content announcement status, diagnose issues, and tune configuration.
Background
Kubo v0.39 introduced the DHT Sweep provider as the default (Provide.DHT.SweepEnabled=true). This system:
Divides the DHT keyspace into regions and systematically sweeps through them
Batches CIDs allocated to the same DHT servers, dramatically reducing DHT lookups
Exposes detailed statistics via ipfs provide stat and the RPC endpoint /api/v0/provide/stat
Currently, users must use the CLI (watch ipfs provide stat --all --compact) to monitor this. A Web UI integration would make this accessible to users who prefer graphical interfaces.
Below are my personal notes with general direction I would take, but feel free to change it, go in different direction if you feel there is more ergonomic/friendly way of showing this information.
Location
New tab "DHT Provide" within the existing Diagnostics screen (alongside existing diagnostic tools).
Data Source
RPC Endpoint:POST /api/v0/provide/stat
Flags to support:--all equivalent for complete metrics, --lan for LAN DHT stats in dual-DHT configurations. Important: most of the time users are interested in WAN DHT and ability to switch to LAN DHT should be a very unobtrusive checkbox somewhere in the UI. It should be easy to ignore, or also valid to just NOT show option to use `--lan` and say that GUI only shows WAN DHT and that is all, and for LAN use CLI.
Key UI Components
1. Reprovide Interval Progress Bar (Screen-wide)
A visual representation of Provide.DHT.Interval divided into region batches:
┌───────────────────────────────────────────────────────────────────────┐
│ Reprovide Cycle Progress [72% Complete] │
├───────────────────────────────────────────────────────────────────────┤
│ ████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░ │
│ ▲ completed regions ▲ current batch remaining │
└───────────────────────────────────────────────────────────────────────┘
Started: 2h 15m ago ETA: 52m remaining
2. Current Batch Information Panel
Display information about the active batch being processed:
Metric
Description
Current Region
The DHT keyspace region currently being processed
Batch Size
Number of CIDs in the current batch
Pending CIDs
CIDs waiting in queue to be provided
Provide Queue
Total items in the provide queue
3. Worker Utilization Panel
Visual representation of worker activity:
Workers: 8/16 active (50% utilization)
├── Periodic Workers: 4/8 busy
├── On-demand Workers: 4/8 busy
└── Max Connections/Worker: 20
Include a visual indicator (progress bars or activity dots) for each worker pool.
4. Statistics Summary
Key metrics from ipfs provide stat --all:
Network Stats: Connectivity status, peer count for DHT operations
Manual: "Refresh Now" button for on-demand updates
Optional: Configurable refresh interval or pause auto-refresh
Error Handling
Display a clear error message when:
Sweep mode not enabled:
⚠️ DHT Sweep Provider Not Enabled
This screen requires Provide.DHT.SweepEnabled=true in your Kubo configuration.
The Sweep provider is enabled by default in Kubo v0.39+.
To enable: ipfs config --json Provide.DHT.SweepEnabled true
Legacy provider mode:
When SweepEnabled=false, show basic stats (if available) with a note that detailed statistics require the Sweep provider.
RPC endpoint unavailable:
Handle cases where the endpoint is not available (older Kubo versions).
Dependencies
js-kubo-rpc-client
Support for ipfs.provide.stat() RPC may need to be added to js-kubo-rpc-client if not already present.
Suggested API:
interface ProvideStatOptions {
all?: boolean; // Include all detailed stats
lan?: boolean; // Show LAN DHT stats instead of WAN
// ... other flags as needed
}
Summary
Add a new "DHT Provide" tab to the Diagnostics screen that provides a GUI equivalent of
ipfs provide stat -a --compact, allowing users to monitor the health and progress of the Sweep provide system introduced in Kubo v0.38 and enabled by default in v0.39.This screen would give node operators a one-glance overview of their DHT provide operations, making it easier to understand content announcement status, diagnose issues, and tune configuration.
Background
Kubo v0.39 introduced the DHT Sweep provider as the default (
Provide.DHT.SweepEnabled=true). This system:ipfs provide statand the RPC endpoint/api/v0/provide/statCurrently, users must use the CLI (
watch ipfs provide stat --all --compact) to monitor this. A Web UI integration would make this accessible to users who prefer graphical interfaces.Reference documentation:
Proposed Implementation
Note
Below are my personal notes with general direction I would take, but feel free to change it, go in different direction if you feel there is more ergonomic/friendly way of showing this information.
Location
New tab "DHT Provide" within the existing Diagnostics screen (alongside existing diagnostic tools).
Data Source
POST /api/v0/provide/stat--allequivalent for complete metrics,--lanfor LAN DHT stats in dual-DHT configurations. Important: most of the time users are interested in WAN DHT and ability to switch to LAN DHT should be a very unobtrusive checkbox somewhere in the UI. It should be easy to ignore, or also valid to just NOT show option to use `--lan` and say that GUI only shows WAN DHT and that is all, and for LAN use CLI.Key UI Components
1. Reprovide Interval Progress Bar (Screen-wide)
A visual representation of
Provide.DHT.Intervaldivided into region batches:2. Current Batch Information Panel
Display information about the active batch being processed:
3. Worker Utilization Panel
Visual representation of worker activity:
Include a visual indicator (progress bars or activity dots) for each worker pool.
4. Statistics Summary
Key metrics from
ipfs provide stat --all:5. Alerts/Warnings Section
Display any warnings detected by Kubo's slow reprovide monitoring:
Provide.DHT.MaxWorkers")Refresh Behavior
Error Handling
Display a clear error message when:
Sweep mode not enabled:
Legacy provider mode: When
SweepEnabled=false, show basic stats (if available) with a note that detailed statistics require the Sweep provider.RPC endpoint unavailable: Handle cases where the endpoint is not available (older Kubo versions).
Dependencies
js-kubo-rpc-client
Support for
ipfs.provide.stat()RPC may need to be added to js-kubo-rpc-client if not already present.Suggested API:
Related issue/PR needed in: https://github.com/ipfs/js-kubo-rpc-client
Design Suggestions
Visual Mockup Concept
Additional Considerations
Acceptance Criteria
ipfs provide stat --allRelated
/api/v0/provide/statsupport)