Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions crates/dig-node-service/src/rewards_claim/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
2 changes: 1 addition & 1 deletion crates/dig-node-service/src/rewards_claim/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
6 changes: 3 additions & 3 deletions crates/dig-node-service/src/rewards_claim/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ impl<P: ClaimChainPort, H: DistributorHintSource> ClaimEngine<P, H> {
/// 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
Expand Down
2 changes: 1 addition & 1 deletion crates/dig-node-service/src/rewards_claim/port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Loading