Skip to content

docs: retire remaining payment-channel wording; meter lane-seed refusals in the open-failure total - #2406

Merged
thiras merged 3 commits into
mainfrom
docs/2405-channel-wording
Oct 10, 2026
Merged

thiras merged 3 commits into
mainfrom
docs/2405-channel-wording

Conversation

@thiras

@thiras thiras commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2405

Behaviour change

  • Lane-seed refusals now move decdn_node_pull_pool_open_failures_total. The three seed legs in buyer_channel.rs (unreadable watermark, vanished row, failed seed persist) marked OpenReported but metered only decdn_buyer_lane_seed_failures_total. That broke the documented rule that a site meters the total if and only if it marks OpenReported. They now meter both, so the total counts every cause and the seed counter is its lane-seed share.
  • A lane seed persisted against a vanished row refuses the pull. persist_lane_seed treated AdvanceOutcome::UnknownPool as success. A row removed between the re-read and the seed write let the pull pay against a pool the store no longer records, and no counter moved. It now refuses and counts the refusal, like the vanished-row leg. PoolMismatch logs at info and pins the replacement row. A store read fault under the seed lock also counts in buyer_lane_seed_failures.
  • The classifier is now tested for counting once. Two integration tests in node_origin_pull.rs drive a stub opener that returns an already-reported error: one with OpenReported and LocalPullFault, one with OpenReported only. Both assert that record_pool_open_failure adds nothing to the open-failure total, and both fail if the total is metered at the top of the function.
  • Removed decdn_voucher_nonce_gaps_total. Vouchers carry no nonce and nothing emitted it. Fixing the issue's ChannelState::apply_voucher citation would have pointed at a warn that does not exist.
  • Removed NodeAddressResolver::node_id_for. It had no production caller; its doc described the retired cooperative-close waiver and expiry-reclaim sweep.

Tests

  • One test per seed leg asserts the leg, LocalPullFault + OpenReported, and both counters at 1. Each fails without the fix.
  • The existing an_unreadable_watermark_refuses_the_pull_as_a_local_fault never recorded the row, so it passed on the vanished-row arm. It now records the row and reaches getWatermark.
  • WriteOnlyFault also faults seed_progress, to reach the persist leg.

Docs

  • Every comment item in the issue, plus DepositOutcome variant names in the top-up metric docs, and the CursorStart doc that had ended up on ColdStart.
  • "buyer/payment channel" and "channel open" prose → pool / lane in comments, crate READMEs, the decdn-incentive package description and the DEFAULT_CONFIG template. Identifiers stay as the issue scopes.
  • Changelog voice dropped in the runbook, dispatch.rs and node_origin_pull.rs.

Not done here

Verification

  • cargo nextest run -p decdn-node -p decdn-cli -p decdn-client -p decdn-common -p decdn-incentive -p decdn-e2e: all pass (3970 + 38)
  • cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo doc with -D warnings, and pre-commit: clean

🤖 Generated with Claude Code

…als in the open-failure total

Closes #2405.

- The three lane-seed refusal legs in `buyer_channel.rs` (unreadable
  watermark, vanished row, failed seed persist) mark `OpenReported` but
  metered only `buyer_lane_seed_failures`. They now also meter
  `node_pull_pool_open_failures`, so the "meters the total iff it marks
  `OpenReported`" rule holds and the total counts every cause.
- One test per seed leg asserts the markers, the leg, and both counters.
  The old unreadable-watermark test never recorded the row, so it hit the
  vanished-row arm instead.
- Remove `decdn_voucher_nonce_gaps_total` (vouchers carry no nonce;
  nothing emitted it) and `NodeAddressResolver::node_id_for` (served only
  the retired cooperative-close waiver).
- Stale comments: `REORG_MARGIN_BLOCKS` example, `ColdStart::Head`
  pre-anchor pools, fill.rs lane authority, node_origin expiry reclaim,
  `DepositOutcome` variant names; move the `CursorStart` doc back onto it.
- "buyer/payment channel" and "channel open" prose -> pool / lane across
  comments, crate READMEs, the incentive package description and the
  `DEFAULT_CONFIG` template; drop changelog voice in the runbook,
  dispatch.rs and node_origin_pull.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 09:57
@thiras thiras self-assigned this Oct 10, 2026

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.

🟡 Changes recommended

Several documentation changes misclassify on-chain pools as off-chain and one public API comment incorrectly scopes a per-lane ledger to an entire pool.

14 open findings
What changed in this PR

Aligns payment terminology with shared pools and updates lane-seed failure observability.

Changes:

  • Counts lane-seed refusals in the aggregate pool-open failure metric.
  • Removes the unused nonce-gap metric and reverse address lookup.
  • Updates tests, documentation, and configuration prose.
File Description
docs/​runbook.md Removes changelog-style wording.
crates/​reputation/​README.md Updates payment terminology.
crates/​protocol/​README.md Updates payment terminology.
crates/​node/​tests/​node_to_node_pull_through.rs Renames pool-open terminology.
crates/​node/​tests/​node_origin_pull.rs Revises pool and lane documentation.
crates/​node/​tests/​client_loopback.rs Updates fixture documentation.
crates/​node/​src/​selection/​tests.rs Updates deadline terminology.
crates/​node/​src/​runtime/​mod.rs Updates runtime comments.
crates/​node/​src/​node_origin/​pull_leg.rs Updates paid-leg documentation.
crates/​node/​src/​node_origin/​mod.rs Revises pool-open documentation.
crates/​node/​src/​metrics/​tests.rs Removes the obsolete nonce metric test.
crates/​node/​src/​metrics.rs Removes the nonce metric and documents seed accounting.
crates/​node/​src/​handlers/​client/​window.rs Updates pool-open terminology.
crates/​node/​src/​handlers/​client/​fill.rs Clarifies lane authorization.
crates/​node/​src/​handlers/​client/​dispatch.rs Removes changelog voice.
crates/​node/​src/​dht/​publish.rs Updates buyer-pool terminology.
crates/​node/​src/​dht/​node_address/​tests.rs Removes reverse-lookup testing.
crates/​node/​src/​dht/​node_address.rs Removes the unused reverse lookup API.
crates/​node/​src/​chain_events/​resumable_watcher.rs Corrects cursor documentation.
crates/​node/​src/​chain_events/​backfill.rs Clarifies reorg-sensitive folds.
crates/​node/​src/​buyer_channel/​tests.rs Adds coverage for three seed failures.
crates/​node/​src/​buyer_channel.rs Adds aggregate failure metering.
crates/​node/​README.md Updates payment terminology.
crates/​incentive/​src/​capacity_bond.rs Updates payment-pool wording.
crates/​incentive/​README.md Updates payment-layer terminology.
crates/​incentive/​Cargo.toml Revises the package description.
crates/​e2e/​src/​chain.rs Updates pool-funding documentation.
crates/​config-types/​README.md Updates payment terminology.
crates/​common/​src/​config/​types.rs Updates pull-through documentation.
crates/​common/​src/​config/​resolved.rs Updates resolved-config documentation.
crates/​common/​src/​config/​mod.rs Updates timeout and denylist documentation.
crates/​common/​src/​cli/​fetch.rs Renames the client store in help text.
crates/​common/​src/​cli/​common.rs Updates client data-directory documentation.
crates/​common/​README.md Updates payment terminology.
crates/​client/​src/​provider.rs Updates provider documentation.
crates/​client/​src/​lib.rs Revises pool-open and ledger documentation.
crates/​client/​src/​driver/​tests.rs Updates progress-test terminology.
crates/​client/​src/​driver.rs Updates progress documentation.
crates/​client/​src/​discovery.rs Updates warming-candidate terminology.
crates/​client/​README.md Updates payment terminology.
crates/​cli/​src/​commands/​config.rs Updates generated configuration comments.
crates/​cli/​README.md Updates payment terminology.
crates/​cli/​Cargo.toml Updates dependency comments.
crates/​cache/​README.md Updates payment terminology.
crates/​bao-range/​README.md Updates payment terminology.
CHANGELOG.md Records metric behavior changes.
adr/​appendix-observability.md Documents aggregate seed-failure accounting.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CHANGELOG.md Resolved
Comment thread crates/bao-range/README.md Resolved
Comment thread crates/cache/README.md Resolved
Comment thread crates/cli/README.md Resolved
Comment thread crates/client/README.md Resolved
Comment thread crates/incentive/README.md Resolved
Comment thread crates/node/README.md Resolved
Comment thread crates/node/src/node_origin/pull_leg.rs Resolved
Comment thread crates/protocol/README.md Resolved
Comment thread crates/reputation/README.md Resolved
@github-code-quality

github-code-quality Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: Rust

Rust / code-coverage/cargo-llvm-cov

The overall line coverage in commit 0274e3f in the docs/2405-channel-wo... branch remains at 75%, unchanged from commit 9c4e7a1 in the main branch.

Show a line coverage summary of the most impacted files.
File main 9c4e7a1 docs/2405-channel-wo... 0274e3f +/-
crates/client/src/scheduler.rs 94% 93% -1%
crates/client/src/lib.rs 88% 88% 0%
crates/cache/src/engine.rs 91% 91% 0%
crates/cli/src/...ommands/node.rs 59% 60% +1%
crates/node/src...e_origin/mod.rs 87% 88% +1%
crates/node/src/dht/publish.rs 78% 80% +2%
crates/node/src...uyer_channel.rs 60% 63% +3%
crates/node/src...node_address.rs 69% 78% +9%

Updated October 10, 2026 10:43 UTC

…lassifier metering

- `persist_lane_seed` treated `AdvanceOutcome::UnknownPool` as success, so a
  row that vanished between the re-read and the seed write let the pull pay
  against a pool the store no longer records, with no counter moving. It now
  refuses and meters like the vanished-row leg. `PoolMismatch` logs at info
  and pins the replacement; `Regressed` stays a debug no-op.
- A store read fault under the seed lock also counts in
  `buyer_lane_seed_failures`.
- `refuse_seed` meters both counters and attaches both markers for every
  seed refusal leg.
- Integration tests pin that `record_pool_open_failure` does not meter an
  error its raising site already reported (OpenReported with and without
  LocalPullFault); both fail if the classifier meters the total up front.
- Review doc fixes: the Reported arm is a ContractRevert only (RpcError is
  node-wide); lanes, not pools, key on the operator address; top-up and
  progress metric docs describe the node's single pool; residual-arm and
  OpenReported coverage comments; ColdStart projection note; remaining
  channel wording and history voice in touched blocks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thiras
thiras merged commit f9427b8 into main Oct 10, 2026
32 checks passed
@thiras
thiras deleted the docs/2405-channel-wording branch October 10, 2026 10:51
thiras added a commit to decdn/devops that referenced this pull request Oct 14, 2026
…y-resync alert (#125) (#162)

* fix(monitoring): follow decdn v0.1.0 buyer metrics, quiet the registry-resync alert (#125)

decdn v0.1.0 (decdn/decdn#2406) removed decdn_voucher_nonce_gaps_total and
widened the pool-open and lane-seed counters:

- chain dashboard: drop the nonce-gap series (the panel is now "Lane and
  receipt-log writes"); name the pool-open aggregate's real causes (store,
  open-task, capability signing, lane seed) and the four lane-seed causes.
- delivery dashboard: pool open failures are gas, RPC, buyer store or lane
  seed, not an expired pool.
- DecdnBuyerLaneSeedFailing: "Buyer lane seeds refused", all four causes.

Alerts and panels that misled on the live fleet:

- DecdnRpcErrorRatioHigh and "RPC failures by outcome": rpc_error on
  eth_getLogs is mostly a provider's transient error the poller retries in
  place, not a range cap (that has its own counter). Text only.
- DecdnCapacityBondRegistryResyncFailing fires on two failed attempts in the
  hour (>= 2), not one transient eth_call error; promtool tests added.
- Node drilldown "Peers known" gates on max_over_time of pull attempts, so a
  restart no longer blanks it.

Closes #125

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(monitoring): describe the Peers known gate as a nonzero counter, not a recent pull

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

cleanup: remaining payment-channel wording and stale comments after #2404

2 participants