Repository navigation
refactor: remove NodeAnnounce gossip, source node region from the registry - #1712
Merged
alpergundogdu merged 12 commits intoAug 17, 2026
Merged
Conversation
…stry Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Drops the two operator surfaces that only existed to serve gossip: admin_v1_peersList/decdn node peers and admin_v1_announce/decdn node announce. AdminState no longer carries a peer-table handle or an announce trigger, since nothing reads them now. The gossip crate, the peer table, and GossipService wiring are unaffected — region-stats and every other admin surface keep working. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Removes every gossip touch point from the node crate ahead of the gossip/protocol crate deletion: the iroh-gossip endpoint protocol and GossipService spawn, the peer table, the NodeAnnounce announce gate (announce_gate.rs deleted outright), and the gossip/peer-table metrics. The blacklist watcher keeps its ContentDenylist enforcement but drops the secondary peer-table removal / announce-gate feed that rode along with it (its only purpose was reconciling the now-deleted gate). Also drops the two dashboard/alert artifacts and the ADR metric-registry rows for the deleted series, and fixes stray doc comments (region accounting, reputation scoring, RPC preflight, CLI help text) that referenced gossip. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…nfig Co-Authored-By: Claude Opus 4.8 <[email protected]>
Rewrite ADR 001 for registry-based node discovery (CapacityBond active set + iroh NodeId dialing) and on-chain regionHint region metadata; drop the NodeAnnounce/peer-table/gossip model. Update ADRs 022, 030, 037, the local-admin, binaries, and observability appendices, the living architecture overview, and CLAUDE.md to match. Delete the obsolete peer-table-eviction appendix. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Rewrite the active ADR corpus so node discovery, region metadata, and liveness read as canon of the on-chain registry + DHT + probe stack. Node discovery is the CapacityBond active set; region is on-chain regionHint; liveness is probe RTT. Delete the gossip framing, envelope, and topic sections from schema evolution; drop the onboarding mesh phase (node becomes discoverable by on-chain registration alone) and re-justify the NTP step by voucher freshness and the slashing window; re-source privacy node enumerability to the on-chain registry; recast appeal evidence category (b) as probe-fan-out timeouts. Co-Authored-By: Claude Opus 4.8 <[email protected]>
The version-boundary and mode-constant prose in 013-schema-evolution, appendix-operator-upgrade-path, and appendix-poc-production-seams still mentioned gossip topics and the NodeAnnounce interval, which no longer exist. The boundary for a breaking wire change is an ALPN bump only. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Remove the unused `blake3` dev-dependency and its inaccurate comment from crates/node/Cargo.toml — every hash in the node crate goes through bao_tree::blake3, and reword the client_loopback.rs comment to match. Rename crates/cli/tests/admin_peers.rs to admin_rpc.rs to match its actual (peers-free) admin-wire test scope, and update the two comments that reference it by name. Add a T1 pointer for P-12 registry enumeration in adr/017-privacy.md, and reflow a metrics.rs doc comment left ragged by an earlier gossip-clause removal. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ossip-necessity-672da9
The threat-model table carried peer-table-poisoning/gossip-replay and gossip-flooding rows; neither attack exists in a gossip-free network, and the gossip-flooding row linked a deleted ADR 003 heading. Eclipse, DHT poisoning, and voucher replay remain. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR removes the NodeAnnounce gossip subsystem end-to-end and re-sources peer region information from the on-chain CapacityBond registry watcher’s NodeId → regionHint projection, keeping the existing RegionResolver interface so downstream selection/accounting logic remains structurally unchanged.
Changes:
- Deletes the gossip crate and protocol wire types, removes all node/CLI/admin surfaces and metrics tied to gossip peer tables and announces.
- Introduces/threads a registry-backed region projection for
region_of(node_id)usage (region byte accounting + ADR-030 latency-vs-claim penalty inputs). - Updates monitoring assets and ADR corpus to reflect gossip-free discovery (registry + DHT), plus associated config/schema cleanups.
Reviewed changes
Copilot reviewed 81 out of 82 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| monitoring/prometheus-alerts.yml | Removes an alert targeting the deleted gossip peer table metric. |
| monitoring/grafana-dashboard.json | Removes the peer-table-size Grafana panel backed by gossip metrics. |
| crates/protocol/tests/snapshots/public_api__public_api.snap | Updates protocol public API snapshot to remove gossip exports. |
| crates/protocol/src/region.rs | Updates region-validation docs to reflect identity.region usage outside gossip. |
| crates/protocol/src/message.rs | Removes gossip-specific signature comparison in protocol docs. |
| crates/protocol/src/lib.rs | Removes gossip module and re-exports/constants tied to gossip topics. |
| crates/protocol/src/gossip.rs | Deletes protocol gossip message types (NodeAnnounce, envelope, constants). |
| crates/protocol/src/client.rs | Updates comments that previously referenced “gossiping” reputation outcomes. |
| crates/node/tests/sighup_signal.rs | Removes gossip config from resolved config seeding + reload expectations. |
| crates/node/tests/node_origin_pull.rs | Updates test commentary removing “over gossip” propagation language. |
| crates/node/tests/client_loopback.rs | Updates comment to reflect current hash implementation detail. |
| crates/node/tests/anvil_bringup_shutdown_e2e.rs | Removes gossip config from test config construction. |
| crates/node/src/selection.rs | Updates candidate region source documentation to registry projection. |
| crates/node/src/runtime/reload.rs | Removes gossip mentions and restart-required warnings for gossip config. |
| crates/node/src/region_accounting.rs | Replaces gossip peer-table resolver with registry regionHint projection resolver. |
| crates/node/src/node_origin/mod.rs | Removes gossip-observation buffer references; keeps local reputation scoring docs. |
| crates/node/src/metrics.rs | Removes gossip metrics fields/recorders and related tests/docs. |
| crates/node/src/main.rs | Updates daemon CLI long description to remove gossip wording. |
| crates/node/src/lib.rs | Removes announce_gate module export. |
| crates/node/src/handlers/mod.rs | Removes limited handler module export (adapter deleted). |
| crates/node/src/handlers/limited.rs | Deletes the foreign-handler limiter adapter used for iroh-gossip. |
| crates/node/src/content_deny.rs | Updates docs removing “ungossiped” phrasing (local-only). |
| crates/node/src/announce_gate.rs | Deletes NodeAnnounce admission gate plumbing. |
| crates/node/Cargo.toml | Drops decdn-gossip and iroh-gossip deps and related dev-dep commentary. |
| crates/incentive/src/node_register.rs | Updates docs to reference DHT discovery rather than gossip/iroh discovery. |
| crates/gossip/src/metrics.rs | Deletes gossip crate metrics trait surface. |
| crates/gossip/src/lib.rs | Deletes gossip crate public API. |
| crates/gossip/README.md | Deletes gossip crate README. |
| crates/gossip/Cargo.toml | Deletes gossip crate manifest (crate removed). |
| crates/config-types/src/hash.rs | Updates docs removing “ungossiped” phrasing for local denylist. |
| crates/common/src/config/types.rs | Removes gossip config section schema; updates local denylist docs. |
| crates/common/src/config/resolved.rs | Removes resolved gossip config struct and field. |
| crates/common/src/cli/setup.rs | Updates setup CLI docs to reference DHT discovery. |
| crates/common/src/cli/node.rs | Removes node peers and node announce CLI surfaces; updates related docs. |
| crates/common/src/cli/mod.rs | Stops re-exporting removed node CLI argument types. |
| crates/common/src/admin.rs | Removes gossip peer/admin RPC DTOs and methods; updates region stats docs. |
| crates/client-pull/src/lib.rs | Updates commentary removing “gossip” reputation propagation references. |
| crates/cli/tests/config_validate.rs | Updates config validation tests removing gossip section and using security typos. |
| crates/cli/src/commands/setup.rs | Updates clock-skew rationale docs to remove gossip validation linkage. |
| crates/cli/src/commands/node_top.rs | Updates docs referencing admin RPC tests/subcommands post peers removal. |
| crates/cli/src/commands/config.rs | Removes gossip fields from validation summary and default config template. |
| crates/cli/Cargo.toml | Removes dev-dep on decdn-gossip and updates related comment. |
| CLAUDE.md | Updates repo overview to remove gossip crate/deps and adjust crate count/architecture notes. |
| Cargo.toml | Removes crates/gossip from workspace members and workspace deps; drops iroh-gossip dep. |
| Cargo.lock | Removes decdn-gossip and iroh-gossip transitive entries and related dependencies. |
| adr/Makefile | Removes deleted peer-table eviction appendix from ADR book build sources. |
| adr/architecture.md | Updates architecture diagrams and text to remove gossip and reflect registry-based discovery. |
| adr/appendix-poc-production-seams.md | Updates seam examples now that announce interval/gossip are removed. |
| adr/appendix-peer-table-eviction.md | Deletes the peer-table eviction appendix (gossip peer table removed). |
| adr/appendix-operator-upgrade-path.md | Updates Tier definitions to remove gossip topic/envelope considerations. |
| adr/appendix-operator-key-rotation.md | Updates rotation notes to remove gossip propagation reliance. |
| adr/appendix-observability.md | Removes gossip metrics section; updates readiness JSON key mapping and docs. |
| adr/appendix-local-admin-http.md | Updates admin surface description to remove peersList as the initial method. |
| adr/appendix-blob-cache-eviction.md | Removes cross-reference to deleted peer-table eviction appendix. |
| adr/appendix-binaries.md | Updates CLI command list and admin-namespace description post gossip removal. |
| adr/037-regional-proxy-warming.md | Updates discovery inputs and removes gossip-based assumptions. |
| adr/030-node-region-self-attestation.md | Updates region source to on-chain regionHint only (no NodeAnnounce). |
| adr/028-slashing-appeals.md | Removes gossip-mesh evidence examples; refines telemetry examples accordingly. |
| adr/022-content-discovery.md | Removes peer-table eviction reference and gossip-related text; aligns bootstrap wording. |
| adr/019-node-onboarding.md | Rewrites onboarding phases to remove gossip subscription phase and adjust criteria. |
| adr/017-privacy.md | Updates privacy surface analysis to remove gossip topic enumeration and reflect registry enumeration. |
| adr/016-contract-interactions.md | Updates operational notes to remove gossip-based liveness filtering references. |
| adr/013-schema-evolution.md | Removes gossip framing/envelope/versioning sections; scopes evolution to ALPNs. |
| adr/012-client.md | Updates client model to registry-backed node list (no gossip). |
| adr/011-content-takedown.md | Updates ejection/denylist docs to remove peer-table/gossip consequences. |
| adr/008-reputation.md | Updates wording to reflect “no cross-node propagation” rather than “no gossip”. |
| adr/005-protocol.md | Updates protocol inventory to remove iroh-gossip and reframe node metadata source. |
| adr/003-payments.md | Removes gossip flooding section and updates discovery/withholding notes. |
| adr/000-language.md | Updates core stack list/version baseline to remove iroh-gossip. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…NKNOWN A poisoned RwLock made RegistryRegionResolver::region_of return None for every peer for the process lifetime, silently disabling region accounting and the ADR-030 penalty. Recover the guard and warn, matching the poison-recovery convention RegionAccountant uses on its own lock. Also fix the ADR 019 readiness-log example to drop the removed peer-table field. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Coverage reportTotal: 80.24% (was 80.63%, ▼ 0.39%) — 56886/70899 lines
History
|
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.
What
Removes the NodeAnnounce gossip subsystem entirely and re-sources node-side peer region from the on-chain
CapacityBondregistry.Gossip was near-vestigial: node discovery already comes from the on-chain registry active set (which also seeds the DHT routing table), dialing from iroh discovery by
NodeId, content discovery from the Kademlia DHT (cdn/dht/v1), and node selection from the registry-backed client set. Gossip was the sole source for only two things — thedecdn node peersview and node-sideregion_of()— both redundant with data already in-process.The one behavioral change
region_of(node_id)— consumed by region byte-accounting and the ADR-030 RTT-vs-claim selection penalty — now reads aNodeId → regionHintmap maintained by theCapacityBondregistry watcher, instead of the gossip peer table. TheregionHintwas already decoded and discarded at both thegetRegisteredNodesseed and theNodeRegisteredevent; this just captures it into a third always-on projection alongsideactiveandbindings. The resolver preserves the existingRegionResolverinterface, so accounting,region-stats, and the selection penalty are unchanged below it. Coverage is equal-or-better than gossip (all registered nodes vs. only announcers).What's deleted
gossipcrate, theprotocolNodeAnnounce wire types, and theiroh-gossipdependencynodecrate, plus gossip metricsdecdn node peersanddecdn node announceadmin + CLI surfacesidentity.regionis kept — it feeds the ADR-030 penalty and was never a gossip consumer)LimitedHandleradapter (dispatch limiting is done byConnectionLimiterdirectly)Net: +1,140 / −9,367.
Docs
The entire active ADR corpus is rewritten to present-tense canon of a gossip-free network — discovery = registry active set + DHT, dialing = iroh by
NodeId, region = on-chainregionHint, liveness = probe RTT. ADR 001 rewritten; 005/013/017/019/028/008/030/037 and the operator appendices swept;appendix-peer-table-eviction.mddeleted.Verification
cargo build --workspace,cargo clippy --workspace --all-targets -- -D warnings— cleancargo nextest run --workspace— 2673 passed, 0 failedcargo test --no-run -p decdn-e2e --features anvil-e2e— compilescargo tree -i iroh-gossip/-i decdn-gossip— not foundgrepfor gossip/NodeAnnounce/peer-table acrosscrates/*/src,crates/*/tests, and activeadr/— zero hitsVerified green on the merge with current
main(its voucher/settlement rework overlaps 35 files with no conflicts).🤖 Generated with Claude Code