Repository navigation
Description
A codebase-wide mechanism sweep found a handful of items that were built for a real consumer but never connected. Unlike the dead code (being deleted separately), each of these has a payoff when wired:
-
Call
LocalReputation::evictperiodically.crates/reputation/src/local.rs— the method's own doc says "call periodically" and nothing does, so the per-peer score map grows for the daemon's lifetime. Onespawn_periodicentry incrates/node/src/runtime/mod.rsfixes it. Eviction is information-lossless by design (requires near-neutral score AND 26 weeks idle). -
Use
encode_store_requestin the DHT client.crates/node/src/dht/client.rs:77hand-buildsDhtMessage::Storeand encodes it withencode_message, bypassing the ext-seam helper incrates/protocol/src/dht.rs:305— while the receive-side twin (parse_store_request_ext) is live inhandlers/dht.rs:792. If a Tier-1StoreRequestExtfield is ever added (ADR 013), the hand-built path silently won't encode it. ~3-line change restores seam symmetry. -
Deduplicate the origin-probe default constants.
crates/cache/src/origin_probe.rs:28-40(DEFAULT_ORIGIN_PROBE_TTL/_NEGATIVE_TTL/_TIMEOUT/_MEMO_CAPACITY) are shadowed by a parallel set incrates/common/src/config/mod.rs:201-217. Values currently agree but nothing binds them — the exact driftDEFAULT_MAX_PROBE_HOLDSwas moved intodecdn-config-typesto prevent (crates/cache/src/probe_hold.rs:32-38, CLI binary-split regression: publisher links cache crate (iroh-blobs/AWS SDK) #578). Same treatment here. -
Wire
ContentDenylist::chain_origin_countinto the admin surface.crates/node/src/content_deny.rs:130is documented "For telemetry and the admin surface" but neitheradmin.rsnormetrics.rscalls it. Either add it toadmin_v1_status(operator visibility into how many origins are chain-denied) or remove it. -
Add a
decdn node slashessubcommand.admin_v1_slashesis implemented server-side (crates/node/src/admin.rs:755) and e2e-tested (crates/e2e/tests/slash_appeal.rs), butNodeCommandhas no variant for it — an operator must source slash IDs elsewhere beforedecdn appeal slash --slash-id. This is the most user-visible gap of the set. -
(Optional, pairs with 4/5) Expose
LocalReputation::snapshotviaadmin_v1_statusordecdn node topfor peer-score visibility; otherwise remove it.
Found during the mechanism inventory sweep (internal: analysis/mechanism-inventory.html).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
test(cli): cover write_slashes_table; fix reputation-evict shutdown c…
feat(node,cli,cache): wire staged-but-unconnected mechanisms (#1844) (#…
refactor(workspace,contracts)!: delete dead code found by the mechani…