Skip to content

feat: use Node Watch for dynamic peer and REST discovery#22

Open
cryptoBeliever wants to merge 1 commit into
devfrom
replace-statistics-service-with-nodewatch
Open

feat: use Node Watch for dynamic peer and REST discovery#22
cryptoBeliever wants to merge 1 commit into
devfrom
replace-statistics-service-with-nodewatch

Conversation

@cryptoBeliever

Copy link
Copy Markdown
Contributor

Changes

  • NodeWatchService (new): fetches GET …/api/symbol/nodes/peer with only_ssl, limit, and order; maps API JSON to NodeWatchNodeInfo (hostname from endpoint, P2P port 7900).
  • RemoteNodeService: getRestUrls and getPeerInfos use nodeWatchUrl and a shared getNodeWatchNodes helper; removed createNodeApiRestClient and the statistics-service dependency.
  • Health filtering: REST list uses isHealthy === true only. Peer list drops entries with isHealthy === false but keeps null or missing health as acceptable.
  • Config / presets: statisticsServiceUrl, limits, and filters replaced by nodeWatchUrl, nodeWatchPeerLimit, and nodeWatchRestLimit in ConfigPreset and YAML presets.
  • Dependencies: removed symbol-statistics-service-typescript-fetch-client from package.json / lockfile.
  • Tests: added NodeWatchService.test.ts; RemoteNodeService.test.ts updated to stub getNodeWatchNodes.

Breaking changes

Custom presets that still use statisticsServiceUrl / statisticsService* limits and filters must migrate to the new nodeWatch* fields.

@cryptoBeliever

Copy link
Copy Markdown
Contributor Author

@Wayonb The GitHub Action build is failing, but it doesn’t appear to be related to my current changes, so I'm leaving it as is. It may be due to updates from the previous release (please correct me if I’m mistaken). Could you take a look at my changes when you have some time? It’s nothing urgent and can wait.

@cryptoBeliever cryptoBeliever requested a review from Wayonb May 4, 2026 08:59
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.

1 participant