From 0e9453cce820d680867a3454db1b1b0aba96bca9 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Tue, 6 Oct 2026 14:27:27 -0700 Subject: [PATCH 1/2] chore: open #3441 lane From afb2656d6aa66cea05c2e15492a92f6a00760629 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Tue, 6 Oct 2026 14:30:37 -0700 Subject: [PATCH 2/2] docs(rewards_claim): replace stale "not yet wired" claims Refs DIG-Network/dig_ecosystem#3441 Co-Authored-By: Claude Haiku 4.5 --- crates/dig-node-service/src/rewards_claim/config.rs | 13 +++++++------ crates/dig-node-service/src/rewards_claim/driver.rs | 2 +- crates/dig-node-service/src/rewards_claim/engine.rs | 6 +++--- crates/dig-node-service/src/rewards_claim/port.rs | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/crates/dig-node-service/src/rewards_claim/config.rs b/crates/dig-node-service/src/rewards_claim/config.rs index 8e0a77bd..08349b49 100644 --- a/crates/dig-node-service/src/rewards_claim/config.rs +++ b/crates/dig-node-service/src/rewards_claim/config.rs @@ -60,12 +60,13 @@ pub struct RewardsClaimConfig { /// them is the silent-failure case this ticket exists to prevent, so opting IN by default is /// the honest posture — see [`crate::rewards_claim`]'s module doc. /// - /// # R5: `true` here does not mean the loop is running yet - /// Nothing in this codebase constructs a [`super::ClaimEngine`] outside this module's own tests - /// (DIG-Network/dig_ecosystem#3268, not yet landed) — see [`crate::rewards_claim`]'s module doc, - /// "Not yet wired into node startup". An operator who reads their own `rewards-claim.json` and - /// sees `enabled: true` is exactly the person who needs to know that; the module doc alone does - /// not reach them. + /// # R5: `true` here is necessary, not sufficient, for the loop to run + /// Node startup spawns the claim loop only when this is `true` AND `Config::enable_chain_sync` + /// is `true`; even then, if the corroborated chain source cannot be built (offline, no peers), + /// the loop reports `ClaimDriverRefusal::ChainSourceUnbuildable` and runs zero cycles — see + /// [`crate::rewards_claim`]'s module doc, "Wired into node startup". An operator who reads their + /// own `rewards-claim.json` and sees `enabled: true` is exactly the person who needs to know + /// that; the module doc alone does not reach them. #[serde(default = "default_enabled")] pub enabled: bool, diff --git a/crates/dig-node-service/src/rewards_claim/driver.rs b/crates/dig-node-service/src/rewards_claim/driver.rs index c23543bf..460c289d 100644 --- a/crates/dig-node-service/src/rewards_claim/driver.rs +++ b/crates/dig-node-service/src/rewards_claim/driver.rs @@ -1860,7 +1860,7 @@ mod tests { ); } - /// A cycle that CANNOT claim -- today's real production path, with no chain adapter wired -- + /// A cycle that CANNOT claim -- a chain port that only ever answers `Unavailable` -- /// must be a WARNING naming the state, not an `INFO` line that reads like health. This is the /// defect the whole ticket exists to remove: silence covering a permanent inability to earn. #[tokio::test(start_paused = true)] diff --git a/crates/dig-node-service/src/rewards_claim/engine.rs b/crates/dig-node-service/src/rewards_claim/engine.rs index 56cbc05c..ba353d25 100644 --- a/crates/dig-node-service/src/rewards_claim/engine.rs +++ b/crates/dig-node-service/src/rewards_claim/engine.rs @@ -245,9 +245,9 @@ impl ClaimEngine { /// Without this call, the engine is exactly as it was before F7: a fresh /// [`Self::cycle_fee_budget_mojos`] and no cadence gate on every construction. That is /// deliberately still true for a caller that has not opted in (every pre-F7 test), but it is - /// also the defect this method exists to close for production use: nothing here is wired into - /// node startup yet (`crate::rewards_claim`'s module doc, "Not yet wired into node startup"), - /// so the production wiring (#3268) is the one place expected to call this. + /// also the defect this method exists to close for production use, so the production engine + /// construction in `driver.rs` (`run_claim_driver_in_with_clock`) calls it — see + /// `crate::rewards_claim`'s module doc, "Wired into node startup". /// F10 (§8.6 floor): also applied here, not just in [`RewardsClaimConfig::load_from`] -- /// this is a constructor argument, independent of whatever the config file says, and the same /// hot-loop hazard applies to whatever caller passes it a degenerate value directly. Applied diff --git a/crates/dig-node-service/src/rewards_claim/port.rs b/crates/dig-node-service/src/rewards_claim/port.rs index 36f02f16..6c6e6426 100644 --- a/crates/dig-node-service/src/rewards_claim/port.rs +++ b/crates/dig-node-service/src/rewards_claim/port.rs @@ -13,7 +13,7 @@ use super::types::{DiscoveredDistributor, Discovery, OwnEntry}; /// Why a claim-chain call could not complete. #[derive(Debug, Clone, PartialEq, Eq)] pub enum ClaimPortError { - /// No chain source is wired yet — [`UnavailableClaimChainPort`]'s only answer, and what any + /// No chain source is reachable — [`UnavailableClaimChainPort`]'s only answer, and what any /// real adapter should answer for an unreachable chain too. Unavailable, /// A chain answered but the call failed for a reason worth a message (bounded before logging).