Skip to content

refactor: remove NodeAnnounce gossip, source node region from the registry - #1712

Merged
alpergundogdu merged 12 commits into
mainfrom
claude/nodeannounce-gossip-necessity-672da9
Aug 17, 2026
Merged

alpergundogdu merged 12 commits into
mainfrom
claude/nodeannounce-gossip-necessity-672da9

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

What

Removes the NodeAnnounce gossip subsystem entirely and re-sources node-side peer region from the on-chain CapacityBond registry.

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 — the decdn node peers view and node-side region_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 a NodeId → regionHint map maintained by the CapacityBond registry watcher, instead of the gossip peer table. The regionHint was already decoded and discarded at both the getRegisteredNodes seed and the NodeRegistered event; this just captures it into a third always-on projection alongside active and bindings. The resolver preserves the existing RegionResolver interface, 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

  • The gossip crate, the protocol NodeAnnounce wire types, and the iroh-gossip dependency
  • All gossip service / endpoint / peer-table / announce-gate wiring in the node crate, plus gossip metrics
  • The decdn node peers and decdn node announce admin + CLI surfaces
  • The gossip config schema (identity.region is kept — it feeds the ADR-030 penalty and was never a gossip consumer)
  • The now-orphaned LimitedHandler adapter (dispatch limiting is done by ConnectionLimiter directly)

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-chain regionHint, liveness = probe RTT. ADR 001 rewritten; 005/013/017/019/028/008/030/037 and the operator appendices swept; appendix-peer-table-eviction.md deleted.

Verification

  • cargo build --workspace, cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo nextest run --workspace — 2673 passed, 0 failed
  • cargo test --no-run -p decdn-e2e --features anvil-e2e — compiles
  • cargo tree -i iroh-gossip / -i decdn-gossip — not found
  • grep for gossip/NodeAnnounce/peer-table across crates/*/src, crates/*/tests, and active adr/ — zero hits

Verified green on the merge with current main (its voucher/settlement rework overlaps 35 files with no conflicts).

🤖 Generated with Claude Code

alpergundogdu and others added 10 commits August 17, 2026 15:47
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]>
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]>
Copilot AI lite review requested due to automatic review settings August 17, 2026 18:13
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]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crates/node/src/region_accounting.rs Resolved
Comment thread adr/019-node-onboarding.md Resolved
…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]>
@github-actions

Copy link
Copy Markdown

Coverage report

Total: 80.24% (was 80.63%, ▼ 0.39%) — 56886/70899 lines

File Coverage Lines Δ
crates/cli/src/commands/config.rs 85.74% 511/596 ▲ +0.12%
crates/cli/src/commands/node.rs 76.03% 1031/1356 ▼ 1.49%
crates/cli/src/commands/node_top.rs 94.86% 812/856 ● 0.00%
crates/cli/src/commands/setup.rs 48.20% 537/1114 ● 0.00%
crates/client-pull/src/lib.rs 89.20% 1454/1630 ● 0.00%
crates/common/src/admin.rs 94.74% 126/133 ● 0.00%
crates/common/src/cli/mod.rs 100.00% 3/3 ● 0.00%
crates/common/src/cli/node.rs 100.00% 5/5 ● 0.00%
crates/common/src/config/mod.rs 97.05% 6590/6790 ▼ 0.08%
crates/common/src/config/resolved.rs 100.00% 33/33 ● 0.00%
crates/config-types/src/hash.rs 90.67% 175/193 ● 0.00%
crates/gossip/src/metrics.rs — — deleted
crates/gossip/src/peer_table.rs — — deleted
crates/gossip/src/service.rs — — deleted
crates/gossip/src/validation.rs — — deleted
crates/incentive/src/node_register.rs 96.33% 105/109 ● 0.00%
crates/node/src/admin.rs 94.83% 1008/1063 ▼ 0.68%
crates/node/src/announce_gate.rs — — deleted
crates/node/src/blacklist_watcher.rs 74.08% 849/1146 ▼ 4.08%
crates/node/src/content_deny.rs 96.74% 89/92 ● 0.00%
crates/node/src/dht/capacity_bond_registry.rs 74.33% 443/596 ▲ +1.53%
crates/node/src/handlers/limited.rs — — deleted
crates/node/src/main.rs 0.00% 0/21 ● 0.00%
crates/node/src/metrics.rs 95.23% 998/1048 ▼ 0.12%
crates/node/src/node_origin/mod.rs 91.14% 1059/1162 ● 0.00%
crates/node/src/region_accounting.rs 92.78% 167/180 ▼ 0.84%
crates/node/src/runtime/mod.rs 47.65% 1077/2260 ▲ +0.84%
crates/node/src/runtime/reload.rs 96.72% 1384/1431 ▼ 0.03%
crates/node/src/selection.rs 97.29% 430/442 ● 0.00%
crates/protocol/src/client.rs 99.04% 721/728 ● 0.00%
crates/protocol/src/gossip.rs — — deleted
crates/protocol/src/message.rs 100.00% 230/230 ● 0.00%
crates/protocol/src/region.rs 98.16% 160/163 ● 0.00%
History
Commit Total Δ vs base
cb583bb (HEAD) 80.24% ▼ 0.39%

@alpergundogdu
alpergundogdu merged commit a11f1c4 into main Aug 17, 2026
52 of 54 checks passed
@alpergundogdu
alpergundogdu deleted the claude/nodeannounce-gossip-necessity-672da9 branch August 17, 2026 21:04
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.

2 participants