Repository navigation
Description
Builds on #1476 (delegated voucherSigner). Lets a client fetch with no wallet, no on-chain tx, and no USDC: the publisher opens channels on the client's behalf pinning the client's key as voucherSigner, and the client signs vouchers locally. The wire needs no channel handshake — nodes already learn channels from ChannelOpened, and the delivery binding gate already checks voucher_signer (#1478).
1 - decdn channel open --provider-address --deposit-micro-usdc [--voucher-signer] (publisher-side)
- New subcommand. Plumb a signer arg through
open_channel(crates/client-pull/src/buyer_channel.rs:218), replacing the hardcodedAddress::ZERO. PrintschannelId.
2 - decdn node lookup --node-id | --region (client-side, unpaid)
CapacityBond.getActiveNodes()read → operator address (=openChannel'sprovider), optionally probe-ranked by RTT/rate. This is the "discover a node so I can tell the publisher who to open with" step. No sentinel hash needed — a probe for any absent hash returns a full signed response and is cheaper for the node than a hit.
3 - Buyer store schema v2 (crates/incentive/src/buyer_channel.rs)
- Re-key
BuyerChannelStatebychannel_id(currently keyed by provider → one channel per node); keep a provider index for the auto-open path. Enables a future multi-process/parallel-pull client; cheap now, expensive once channels exist on disk. - Add
voucher_signer. Also fixes thechannel closebranch bug recorded in feat(payments): delegated voucherSigner + voucher-less close #1478 (has_claim_watermarkused as a proxy for "I hold a key this channel accepts"). - Bump
BUYER_SUPPORTED_SCHEMA_VERSION1→2 (independent of the seller table; unsupported buyer versions are skipped, not fatal).
4 - decdn fetch --channel-id <id> (client-side)
- First use:
getChannel(id), verify provider +voucherSigner-in-keystore + Open/unexpired, resolve watermark, write a buyer row, fetch. Reuse the row after. No separateadoptorchannel show— validation folds into fetch. - Lift the hydration from the node's
reconcile_one_opened(crates/node/src/buyer_channel.rs:2641); the CLI has none. - Skip the fetch-time
open_or_reusetop-up when funder ≠ local key —topUpis funder-only (PaymentChannel.sol:407) and reverts on a delegated channel. Surface exhaustion instead.
5 - Voucher-reject watermark bundle (resume)
- A client can't reconstruct its watermark from chain (the claim watermark is 0 until settlement). On a regression reject (
StaleNonce/AmountRegression/BytesRegression), attach the node's true watermark + the client's own last signature toStreamError::VoucherRejected, so the client self-heals and re-signs. - Gate the bundle on a signature that recovers to
voucher_signer— else it leaks the watermark to anyone who guessed the chain-derivablechannel_id. Security property, not a compat concern. - Pre-launch: add the field inline, no ALPN/extension ceremony.
Resume / exhaustion — reactive. Both StaleNonce and InsufficientDeposit resume from the last byte (StreamRequest.byte_offset, BLAKE3 range-addressable). StaleNonce self-heals on the same channel; InsufficientDeposit → the app asks the publisher to top up (the delegate can't), then resumes. No proactive low-deposit warning; the node signals exhaustion reactively at the last coverable voucher (cache-hit path) or via a coarse pre-flight guard (pull-through path).
Depends on #1478 (voucher_signer pin, closeChannelWithoutVoucher). Do not start until it merges — items 3/4/5 touch files it changes. The separately-tracked coop-close auth hardening shares the same binding→voucher_signer gate.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
test(protocol): re-bless public API snapshot for the watermark bundle
fix(e2e): pass voucher_signer to open_channel in cli_fetch_topup
feat: publisher-pays channels — open-on-behalf + adopt-by-id + reject…
feat(cli): decouple --provider-address (#1492) + bundle pull --channe…
fix: close two money-path guards that had no correct branch (#1532, #…
fix: close two money-path guards that had no correct branch (#1532, #…