Repository navigation
refactor: retire remaining payment-channel identifiers and stale channel claims - #2412
Conversation
The payment model has one on-chain pool per owner and one lane per (pool_id, signer, provider). Rename the identifiers that still say "channel": the buyer_channel and channel_store modules, the channel_state_store family of fields and locals, UnknownChannel, CHANNEL_OPEN_CALLER_BUDGET, and the test fixtures, locals and test names that carry payment-sense "channel". No on-disk table, wire, metric or public-API name changes. Refs #2407 Co-Authored-By: Claude Opus 5.5 <[email protected]>
ADR 005, 011, 012, 016, 019, 026, the key-rotation and upgrade-path appendices, and the runbook still described payment channels: one channel per (client, node) pair, a `payment_channel_address` config key, `address(paymentChannel)` in the deploy grant, channel deposits. State the current model instead: one pool per owner, one lane per (pool_id, signer, provider). CHANGELOG entries that name the `pool_open_failures_*` family and the buyer pool store follow. ADR 003's deliberate pool-versus-channel contrasts and general uses of "channel" stay. Refs #2407 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rewrite the remaining payment-sense "channel" in doc comments, test
prose, metric HELP text, log messages and error contexts as pool
(deposit, funding, owner, open) or lane (per-signer-provider frontier,
voucher progress, ledger). Metric names and labels are unchanged; the
startup log reads "pool state store ready" with a `lanes` field. tokio
and side-channel senses stay.
Also correct comments that named things that do not exist: the
`--channel-id` flag (bundle pull adopts a pool via `--capability`),
`VoucherRejected { WrongChannel }`, and `cli::commands::channel`. Drop
the `retired` scaffolding from the node-origin `StubOpener`: nothing
ever recorded into it, so its assertions were vacuous.
Closes #2407
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Several updated claims remain inaccurate, including nonce-based lane prose, per-run lane cardinality, incomplete ADR cleanup, and an undisclosed exported API rename.
4 open findings
What changed in this PR
Aligns payment terminology with the pool/lane model across node internals, tests, documentation, and operator-visible text.
Changes:
- Renames channel-oriented modules, identifiers, rejection reasons, and tests.
- Updates ADRs, comments, logs, errors, and metric help text.
- Removes unused
StubOpenerretirement scaffolding.
| File | Description |
|---|---|
docs/runbook.md |
Updates operational payment terminology. |
crates/node/Cargo.toml |
Corrects buyer table references. |
crates/node/src/lib.rs |
Exports renamed modules. |
crates/node/src/buyer_pool.rs |
Renames the buyer service module. |
crates/node/src/buyer_pool/tests.rs |
Moves buyer service tests. |
crates/node/src/buyer_ledgers.rs |
Updates lane terminology. |
crates/node/src/pool_store.rs |
Renames the persistent store module. |
crates/node/src/pool_store/tests.rs |
Moves persistent store tests. |
crates/node/src/selection.rs |
Renames the pool-open budget constant. |
crates/node/src/selection/tests.rs |
Updates constant references. |
crates/node/src/runtime/mod.rs |
Renames store wiring and startup text. |
crates/node/src/runtime/tests.rs |
Updates renamed module references. |
crates/node/src/receipt_log.rs |
Updates store documentation links. |
crates/node/src/metrics.rs |
Updates payment terminology in metric documentation. |
crates/node/src/binding_check.rs |
Updates lane terminology. |
crates/node/src/content_deny.rs |
Renames pool-funder documentation. |
crates/node/src/chain_events/resumable_watcher/tests.rs |
Updates watcher test prose. |
crates/node/src/dht/node_address.rs |
Updates buyer service link. |
crates/node/src/dht/capacity_bond_registry.rs |
Updates settlement terminology. |
crates/node/src/dht/capacity_bond_registry/tests.rs |
Updates payment terminology in tests. |
crates/node/src/node_origin/mod.rs |
Renames buyer APIs and lane concepts. |
crates/node/src/node_origin/pull_leg.rs |
Updates pool-open constants and lane prose. |
crates/node/src/node_origin/ranged_pull.rs |
Updates lane terminology. |
crates/node/src/node_origin/backend_source.rs |
Clarifies the unpaid local path. |
crates/node/src/node_origin/admit_store.rs |
Updates remedy terminology. |
crates/node/src/node_origin/funder.rs |
Updates buyer service references. |
crates/node/src/node_origin/funder/tests.rs |
Updates renamed imports. |
crates/node/src/node_origin/tests.rs |
Updates lane verdict terminology. |
crates/node/src/handlers/client/mod.rs |
Renames rejection and store fields. |
crates/node/src/handlers/client/dispatch.rs |
Uses UnknownLane. |
crates/node/src/handlers/client/fill.rs |
Updates store terminology. |
crates/node/src/handlers/client/outcome.rs |
Maps the renamed rejection reason. |
crates/node/src/handlers/client/outcome/tests.rs |
Updates rejection coverage. |
crates/node/src/handlers/client/serve_leg.rs |
Updates authorization terminology. |
crates/node/src/handlers/client/tests.rs |
Updates renamed fields and variants. |
crates/node/src/handlers/client/voucher.rs |
Uses the renamed store field. |
crates/node/src/handlers/client/window.rs |
Updates lane authorization prose. |
crates/node/tests/support/mod.rs |
Updates store fixture documentation. |
crates/node/tests/pool_state_store.rs |
Renames store integration tests. |
crates/node/tests/origin_range_pull.rs |
Renames pool/lane fixtures and prose. |
crates/node/tests/node_to_node_pull_through.rs |
Renames lane assertions and scenarios. |
crates/node/tests/node_origin_pull.rs |
Removes unused retirement scaffolding. |
crates/node/tests/client_loopback.rs |
Renames payment fixtures and tests. |
crates/node/tests/anvil_settlement_e2e.rs |
Updates renamed module imports. |
crates/node/tests/anvil_bringup_shutdown_e2e.rs |
Updates store documentation. |
crates/incentive/src/tx.rs |
Corrects pool command documentation. |
crates/incentive/src/buyer_pool_table.rs |
Updates node store references. |
crates/incentive/src/bind_sig.rs |
Clarifies lane signer attribution. |
crates/client/src/lib.rs |
Updates public documentation terminology. |
crates/client/src/driver.rs |
Renames lane-ledger prose and errors. |
crates/client/src/pacer.rs |
Clarifies pool deposit semantics. |
crates/client/src/scheduler.rs |
Updates lock errors and leg terminology. |
crates/client/src/scheduler/tests.rs |
Updates scheduler test prose. |
crates/client/src/sink.rs |
Updates cumulative lane terminology. |
crates/client/src/sink/tests.rs |
Updates paid-frontier test prose. |
crates/client/src/source.rs |
Renames pool context errors and docs. |
crates/client/src/tests.rs |
Renames pool ID locals. |
crates/common/src/address.rs |
Updates CLI command documentation. |
crates/common/src/admin.rs |
Updates lane watermark documentation. |
crates/common/src/cli/bundle.rs |
Documents capability-based pool adoption. |
crates/common/src/config/mod.rs |
Updates pool-open budget documentation. |
crates/common/src/config/resolved.rs |
Updates pool transaction and deny-list prose. |
crates/cli/src/commands/config.rs |
Updates generated configuration comments. |
crates/cli/src/commands/fetch/tests.rs |
Updates lane watermark test prose. |
crates/cli/src/commands/rotate_key/eth.rs |
Updates key-rotation terminology. |
crates/cli/src/commands/unbond.rs |
Updates pool command reference. |
crates/cli/tests/common/mod.rs |
Updates pool-list references. |
crates/cli/tests/pool_list.rs |
Uses the renamed store module. |
crates/cache/src/engine.rs |
Updates lane authorization documentation. |
crates/e2e/tests/origin_stream_while_store.rs |
Updates lane-state test prose. |
crates/e2e/tests/origin_blacklist_compliance.rs |
Updates pool-funder terminology. |
crates/e2e/tests/node_pull_pool_redeploy.rs |
Updates buyer module references. |
crates/e2e/tests/node_pull_pool_adopt.rs |
Updates buyer module references. |
crates/e2e/tests/g_node_07_rotate_key.rs |
Updates settlement terminology. |
crates/e2e/tests/g_node_04_blacklist_compliance.rs |
Updates failure-class prose. |
crates/e2e/tests/g_gov_03_real_evidence.rs |
Updates pool/lane preconditions. |
CHANGELOG.md |
Rewrites current component terminology. |
adr/005-protocol.md |
Corrects pool and lane cardinality. |
adr/011-content-takedown.md |
Updates blacklisted-pool behavior. |
adr/012-client.md |
Corrects keying and configuration claims. |
adr/016-contract-interactions.md |
Corrects contract and deposit names. |
adr/019-node-onboarding.md |
Updates payment-model reference. |
adr/026-tokenomics.md |
Updates settlement terminology. |
adr/appendix-operator-key-rotation.md |
Updates key-rotation behavior. |
adr/appendix-operator-upgrade-path.md |
Updates migration terminology. |
🧠 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, Solidity Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit 43240d1 in the Show a line coverage summary of the most impacted files.
Solidity / code-coverage/forgeThe overall line coverage in commit 43240d1 in the Updated |
- The owner-mismatch counter and its HELP text describe a request with no verified binding; a binding for a signer with no lane counts as unknown_lane. - The pull-through gate checks lane authority (a known lane for the bound signer), not pool ownership; rename the test to pull_through_gate_authorizes_only_lane_signer. The funder of a delegated lane is refused as an unknown lane. - The tracked-watermark test exhausts the signer's capability cap (SpendingCapExhausted), not the pool deposit. - InsufficientDeposit is a pool-class refusal, not lane-class. - tx.rs states why the pool close/reclaim pair is hand-rolled and points at #2413. - Cargo.toml, ci.yml, ADR 003, 005, 019 and the key-rotation appendix drop remaining channel names and imprecise pool/lane claims; a CHANGELOG item no longer names an expired pool, which does not exist. Refs #2407 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gas snapshotNo gas changes vs base. |


What
Retires the payment-sense "channel" that #2406 left in identifiers and the prose around them. The model is one pool per owner and one lane per
(pool_id, signer, provider), so every remaining payment "channel" now says pool or lane. Per the pre-mainnet rule, this is one rename with no aliases.Closes #2407
Three commits:
refactor(node): identifiers.buyer_channel→buyer_pool,channel_store→pool_store,tests/channel_state_store.rs→tests/pool_state_store.rs.channel_state_store/concrete_channel_store/buyer_channel_store*family →pool_*.ServeRejectReason::UnknownChannel→UnknownLane, matching its existingunknown_lanemetric label.CHANNEL_OPEN_CALLER_BUDGET→POOL_OPEN_CALLER_BUDGET.wedged_channel→wedged_lane.*_channel_idlocals (pool ids) and 21 test names.docs(adr): stale claims. Fixes the ADR 005, 011, 012, 016, 019 and 026 claims, the key-rotation and upgrade-path appendices, the runbook, and CHANGELOG lines that name current pool things. ADR 012 also claimed channels are keyed by(client, provider, nonce), which is no longer how keying works.docs(crates): prose. Rewrites comments, test prose, metric HELP text, log and error strings across about 50 files.Reviewer notes
lane_state_v1/buyer_pool_state_v1.BuyerChannelTableonly appeared in two stale Cargo.toml comments, so this needs no CHANGELOG BREAKING entry.ServeRejectReasonis private.decdn-protocolordecdn-clientpub API.pool state store readywith alanes=field.decdn/devopsdoes not query either; its own stale prose is fixed in a companion devops PR.retiredscaffolding removed fromStubOpenerinnode/tests/node_origin_pull.rs. Nothing ever pushed into it, so everyretired.is_empty()assertion was vacuous.--channel-id: bundle pull adopts a pool via--capability.VoucherRejected { WrongChannel }: the variant is nowWrongPool, and an unknown lane is refused pre-serve withNotFound.cli::commands::channel.ChannelWriter,*_CHANNEL_CAP,Channel*Sink).channels_openvocabulary inarchitecture.mdthat theappendix-observabilityrename table maps.PaymentChannelcontract.cli::commands::pool'sclose_and_forget/reclaim_and_forgethand-roll send/receipt and lose the tx hash on a receipt error. Theincentive/src/tx.rsmodule doc now says so.Verification
cargo fmt -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningsCARGO_BUILD_WARNINGS=deny cargo doc --workspace --no-deps --document-private-itemscargo nextest run --workspace: 4781 passedrg -n -i channel crates adr docs --glob '!adr/_history/**'shows only non-payment senses and the kept ADR lines aboveCHANGELOG.mdentry added (n/a: only a log line and HELP text change)refactor🤖 Generated with Claude Code