Repository navigation
docs: retire payment-channel vocabulary in node comments - #2404
Merged
Merged
Conversation
Rewrite comments, doc strings and test-local strings that still named the retired channel surface (openChannel, reclaimExpired, getChannel, ChannelOpened, PaymentChannel, BuyerChannelStore/Service, buyer_channel_* modules) to the PaymentPool names. Where the surrounding claim was wrong rather than merely old, state the current behaviour: PoolOpened is projection-only (PoolProjection), so the lane-idempotency guard, reorg-orphan and backfill-margin notes no longer describe a durable channel registration; the reclaim sweep pre-checks the chain-head deadline; the reclaim-failure metric docs drop the nonexistent try_reclaim / escalation threshold; the runbook points at `decdn node pools` and PaymentPool.getPool. No metric names, log strings or code identifiers change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The runbook inspects unrelated buyer-side state, and two updated comments contain incorrect or unresolved API documentation.
3 open findings
What changed in this PR
Updates node documentation and test comments from retired payment-channel terminology to the current PaymentPool model.
Changes:
- Renames legacy contract, service, store, and event terminology.
- Corrects watcher, reclaim, and projection descriptions.
- Updates operator guidance and test-local error strings.
| File | Description |
|---|---|
docs/runbook.md |
Updates pool troubleshooting guidance. |
crates/node/tests/node_origin_pull.rs |
Renames pool-opening test documentation. |
crates/node/tests/client_loopback.rs |
Corrects lane-registration rationale. |
crates/node/src/selection.rs |
Updates pool-open timeout documentation. |
crates/node/src/runtime/mod.rs |
Revises watcher and reclaim comments. |
crates/node/src/node_origin/tests.rs |
Updates test-local pool errors. |
crates/node/src/node_origin/pull_leg.rs |
Renames the on-chain open operation. |
crates/node/src/metrics/tests.rs |
Updates metric test terminology. |
crates/node/src/metrics.rs |
Corrects pool and reclaim metric documentation. |
crates/node/src/handlers/client/fill.rs |
Documents pool-based spend authorization. |
crates/node/src/handlers/client/dispatch.rs |
Updates pull-through authorization comments. |
crates/node/src/chain_events/resumable_watcher.rs |
Revises settlement cursor documentation. |
crates/node/src/chain_events/mod.rs |
Corrects projection and RPC descriptions. |
crates/node/src/chain_events/backfill.rs |
Updates reorg replay terminology. |
crates/e2e/src/chain.rs |
Renames buyer funding concepts. |
crates/e2e/Cargo.toml |
Updates store/module names in feature comments. |
crates/common/src/cli/fetch.rs |
Renames the pool-opening transaction. |
crates/client/src/driver.rs |
Updates the buyer-store documentation link. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Coverage OverviewLanguages: Rust Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit 4a75b9b in the Show a line coverage summary of the most impacted files.
Updated |
Review of the first pass found rewrites that traded a stale claim for a false one: - runbook: `decdn node pools` lists the node's own buyer pools, not the client pool a refusal names; compare `headroom` against `deposit - totalRedeemed - M` from `getPool` instead. Quote the real `warn!` text and fields, and name `PoolToppedUp`. - metrics: a failed watermark read meters `buyer_lane_seed_failure`, not the open-failure total; the extra causes are store, open-task and capability signing. - chain_events: drop the #1227 sentence (false of `PoolProjection`), say the node goes unpaid for service against a phantom pool, and stop naming a nonexistent origin watcher in the `timed` doc. - runtime: settlement is the only persisted watcher; `reclaim` reverts when submitted optimistically after a failed head read or when another caller reclaims first, not on a deadline race. - `register_lane` has one production caller, the capability intake. - dispatch gates spend on lane authority, not pool ownership; selection's pool serves every provider; e2e's `RedbBuyerPoolStore` has many users; the node_origin test names the real `open_pool` / `run_open` and the production context string. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2402) The pull-through gate checks that the bound signer holds a lane in the named pool (`pull_authorized`). A delegate signer is not the pool owner, so the shed-gate and pool-floor comments say lane authority too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #2402
Summary
PaymentPoolnames. The old names:openChannel,reclaimExpired,getChannel,ChannelOpened,ChannelToppedUp,PaymentChannel,BuyerChannelStore,BuyerChannelService,buyer_channel_redb/_table,register_open_channel,try_reclaim.warn!text and fields.headroomagainstdeposit − totalRedeemed − MfromPaymentPool.getPool(poolId).decdn node poolslists only the node's own buyer pools, so it cannot show the client pool being refused.PoolOpenedis projection-only (PoolProjection::record_opened). Updated to match:register_lanedocs: its one production caller is the capability intakeclient_loopbackidempotency guardchain_events::timeddoc: dropsgetChanneland the origin watcher, which does not exist; the origin directory is a lazy cache.runtime:reclaimreverts when submitted optimistically after a failed chain-head read, or when another caller reclaims first. A deadline race cannot happen.reclaim_once.buyer_lane_seed_failure, not this total.dispatch: spend is gated on lane authority (pull_authorized), not pool ownership.selection: the node's one pool serves every provider.Emitted strings
None in production. The only string changes are test-local
.contextvalues innode_origin/tests.rs. They now match production:"submit openPool"and"persist opened buyer pool". No metric or log is renamed, so nothing indecdn/devopschanges.Out of scope
buyer_channel.rs,channel_store.rs,concrete_channel_store,channel_state_store,CHANNEL_OPEN_CALLER_BUDGET.DEFAULT_CONFIGtemplate, crate description, READMEs)OpenReportedmetering ruleTest plan
adr/_history. The grep was extended withPaymentChannel|BuyerChannelService|buyer_channel_(redb|table)|register_open_channel|try_reclaim.contracts/keeps only the intentionaltest_reclaimExpired_removednegative test.cargo fmt -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningsCARGO_BUILD_WARNINGS=deny cargo doc --workspace --no-deps --document-private-itemscargo nextest run -p decdn-node -E 'test(/node_origin::tests|metrics::tests::pool_open_failures|register_lane_is_idempotent/)'(37 passed)🤖 Generated with Claude Code