Skip to content

cleanup: rename remaining payment-channel identifiers and fix stale channel claims in ADRs #2407

Closed

Description

@thiras

Problem

Follow-up to #2405 / #2406. #2406 removed the "payment channel", "buyer channel" and "channel open" prose. It left identifiers and the prose that sits next to them, because #2405 scoped identifiers out. About 730 channel mentions remain under crates/ at the head of #2406. The model has one on-chain pool per owner and one lane per (pool_id, signer, provider). "Channel" names neither of these.

Pre-mainnet rule: rename everything in one PR, with no aliases.

1. Stale claims in live ADRs and docs (fix first: these are SoT)

  • adr/005-protocol.md:452: "amortizes on-chain channel costs: one channel per (client, node) pair". A pool is shared across nodes; one lane exists per (signer, provider).
  • adr/012-client.md:219: payment_channel_address. The config key is payment_pool_address.
  • adr/016-contract-interactions.md:363: address(paymentChannel). Check against contracts/script/ and fix the name.
  • adr/016-contract-interactions.md:820: "PaymentPool (USDC channel deposits)". These are pool deposits.
  • adr/011-content-takedown.md:455: "on a channel funded by a newly blacklisted origin". This is a pool.
  • docs/runbook.md:66 ("stop being able to settle channels") and :425 ("a channel funded by a blacklisted operator").

Leave as is:

  • adr/003-payments.md: its "channel" lines contrast the pool model with channels on purpose.
  • adr/017-privacy.md:98 and adr/appendix-local-admin-http.md:10: these use the general meaning of "channel".
  • adr/appendix-observability.md:477-478: an old-to-new rename table.

2. Payment-sense identifiers

Wire and protocol:

  • ServeRejectReason::UnknownChannel (crates/node/src/handlers/client/mod.rs:622). Its comment references are in client/src/lib.rs:1245, node_origin/mod.rs:2633, node_origin/tests.rs:466 and handlers/client/dispatch.rs:1161.
  • Comments still cite WrongChannel, which no longer exists.

Modules and stores:

  • crates/node/src/buyer_channel.rs (and buyer_channel/)
  • crates/node/src/channel_store.rs
  • BuyerChannelTable, buyer_channel_store, buyer_channel_store_for_admin
  • concrete_channel_store, channel_state_store, channel_store_deployment, channel_store_data_dir

Constants and helpers:

  • CHANNEL_OPEN_CALLER_BUDGET (decdn_node::selection, public)
  • retire_channel

Tests:

  • Locals ab_channel_id, leaf_channel_id, leaf1_channel_id, leaf2_channel_id, retry_channel_id, channel_id, channel_a and channel_b, and wedged_channel.
  • Fixture channel_context, in node/tests/client_loopback.rs.
  • Helper assert_channel_advanced.
  • Test names:
    • a_wedged_channel_open_does_not_starve_the_candidate_loop
    • upstream_channel_open_failure_pull_fails_cleanly
    • two_concurrent_pulls_to_one_provider_share_the_channel_ledger
    • node_origin_reused_channel_resumes_voucher_progress
    • node_origin_a_mid_stream_voucher_rejection_still_reaches_the_channel_remedy
    • pull_through_gate_authorizes_only_channel_owner
    • client_unknown_channel_is_rejected
    • handler_two_channels_over_http_origin
    • funded_channel_still_reaches_the_paid_pull, underfunded_channel_never_reaches_the_paid_pull, spent_out_channel_never_reaches_the_paid_pull

Each of these takes its surrounding prose with it. Most of the remaining comment hits ("the channel", "channels") sit next to them, concentrated in:

  • node/tests/node_origin_pull.rs (~300)
  • node/tests/client_loopback.rs (~195)
  • node/src/runtime/mod.rs (~60)
  • node_origin/mod.rs, metrics.rs, handlers/client/mod.rs, client/src/lib.rs (~30-40 each)

3. Not payment-sense: keep

These name tokio mpsc channels:

  • ChannelWriter (serve_encoder.rs, cache/src/origin_range.rs)
  • ENCODE_CHANNEL_CAP, WIRE_CHANNEL_CAP
  • ChannelReceiptSink, ChannelWarmingCreditSink
  • unbounded_channel
  • Comments about bounded or advisory channels

Checks

  • public-api: the snapshot gate covers decdn-protocol and decdn-client, so a pub rename there needs a .snap regen.
  • Store names: a redb table-name change (BuyerChannelTable) renames on-disk tables. That is fine pre-mainnet; note it in CHANGELOG as BREAKING.
  • Leftover sweep: run rg -n -i '\bchannel' crates adr docs --glob '!adr/_history/**' and confirm only section 3 and the deliberate ADR 003 contrasts remain.
  • devops: grep decdn/devops for any renamed metric or log text.

Activity

  1. added
    kind:docs
    prio:low
    on Oct 10, 2026
  2. self-assigned this
    on Oct 10, 2026
  3. added
    kind:chore
    on Oct 10, 2026
  4. assigned and unassigned on Oct 10, 2026
  5. moved this from In progress to Done in deCDNon Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:chorekind:docsprio:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions