Repository navigation
Conversation
Kenbak
commented
Aug 27, 2026
- Add NodeInfo struct exposing start_height, services, handshake_time_ms per node
- Add ExtendedSummary wrapping NetworkSummary with node_info vec
- Update RPC context to serve extended summary via getmetrics
- Fix network type recognition: support Zakura, update MagicBean/Zebra regex for multi-digit versions, remove incorrect Flux exclusion for MagicBean>=6
- Add NodeInfo struct exposing start_height, services, handshake_time_ms per node - Add ExtendedSummary wrapping NetworkSummary with node_info vec - Update RPC context to serve extended summary via getmetrics - Fix network type recognition: support Zakura, update MagicBean/Zebra regex for multi-digit versions, remove incorrect Flux exclusion for MagicBean>=6
Member
|
@Kenbak This is great. Please fix the immediate CI issues and when copilot lands consider its feedback. |
There was a problem hiding this comment.
Pull request overview
Adds an extended metrics payload for the crawler RPC so downstream consumers (CipherScan ingester) can access both the existing NetworkSummary and per-node metadata, and updates network-type recognition heuristics for current mainnet user agents.
Changes:
- Introduces
NodeInfoandExtendedSummary(flatteningNetworkSummaryplus per-node metadata) and updates the metrics snapshot to produce this extended summary. - Updates the RPC context and
getmetricsRPC method to serveExtendedSummary. - Adjusts network implementation recognition (MagicBean/Zebra regex changes and Zakura recognition).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/tools/crawler/rpc.rs |
Switches RPC context storage and getmetrics response type from NetworkSummary to ExtendedSummary. |
src/tools/crawler/metrics.rs |
Adds NodeInfo/ExtendedSummary, populates per-node metadata, and updates network-type recognition regexes/logic. |
src/tools/crawler/main.rs |
Updates the in-memory summary snapshot type and logging/file-output to use the wrapped NetworkSummary inside ExtendedSummary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+55
to
+58
| pub fn request_summary(&mut self, crawler: &Crawler) -> ExtendedSummary { | ||
| let summary = new_network_summary(crawler, &self.graph); | ||
| let nodes = crawler.known_network.nodes(); | ||
|
|
Comment on lines
+86
to
+88
| let zcash_regex = Regex::new(r"^/MagicBean:(\d+)\.(\d+)\.(\d+)/$").unwrap(); | ||
| let zebra_regex = Regex::new(r"^/Zebra:(\d+)\.(\d+)\.(\d+)").unwrap(); | ||
| let zakura_regex = Regex::new(r"^/Zakura:(\d+)\.(\d+)\.(\d+)").unwrap(); |
- Run cargo fmt to fix CI formatting failure - MagicBean regex now allows optional suffixes before the trailing slash so user agents like /MagicBean:5.1.0-rc1/ and /MagicBean:6.0.0(bitcore)/ are correctly classified as zcashd instead of Unknown - Refactor request_summary to clone the known-nodes map once and pass the snapshot into new_network_summary, avoiding redundant allocation
Wrap node.connect() in a 5s tokio timeout so dead/firewalled peers release sockets promptly instead of hanging for ~120s on SYN retries. Without this, 500 connection attempts every 20s accumulates half-open FDs past MAX_CONCURRENT_CONNECTIONS until system-wide exhaustion. Also adds all_node_addrs/all_nodes_indices/all_node_reachable to ExtendedSummary for full known-network graph (reachable + unreachable). Root cause fix for the 2026-09-02 mainnet outage.
Recover crawler connections and publish verified observations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.