Repository navigation
Description
Summary
Multi-hop node→node chained pull-through does not work: when a node pulls a cache-missed blob from an upstream node (NodeOrigin over cdn/client/v1), it sends no ADR 005 client identity binding. If that upstream also misses and would need to reactively pull the blob from its origin/peers, its pull_authorized gate fails (no verified_client), so it refuses with NotFound. Chained warming therefore stops at the first hop that already holds the blob.
This is the node→node analogue of #1115 (which fixed the direct-client case). The serve-path comment at crates/node/src/handlers/client.rs explicitly calls it out as a remaining follow-up.
Evidence (file/line)
crates/node/src/node_origin.rs:277/:767— the node→node requester obtains itsChannelContextfromdeps.buyer.open_or_reuse_channel(..)and never calls.with_client_binding(..), soctx.client_binding == None.crates/node/src/node_origin.rs:780stream_fetch_tracked(..)and:286open_progressive_pull(..)— both send the request with noext.binding(the requester only attaches a binding whenctx.client_bindingisSome).crates/node/src/handlers/client.rs:563pull_authorized()— requires averified_clientrecovered fromext.bindingwhose address owns the named channel; an unbound upstream request cannot trigger a further pull-through.crates/node/src/handlers/client.rs:1055(post-fetch: stream_fetch omits the ADR 005 client identity binding, so reactive origin pull-through never fires for a direct client fetch #1115 comment) — "the node→node requester (node_origin) still omits [the binding], so multi-hop chained pull-through remains a follow-up."
Feasibility
node_origin opens/reuses a buyer PaymentChannel with its own eth key (deps.buyer), so it already holds everything needed to sign a binding: its own iroh endpoint node id (deps.endpoint.id()) and the buyer signer that owns the channel. The plumbing added in #1115 (sign_client_binding, ChannelContext::with_client_binding) is directly reusable — the requester just needs the CapacityBond bind domain (chain_id + capacity-bond address) threaded into NodeOriginDeps.
Proposed direction
- Thread the
CapacityBondbind domain intoNodeOriginDeps(or derive it from existing chain config already available to the node). - In
node_origin, afteropen_or_reuse_channel, attachctx.with_client_binding(sign_client_binding(buyer_signer, deps.endpoint.id(), &bind_domain))beforestream_fetch_tracked/open_progressive_pull. - Add a two-hop integration test (leaf → node B (miss) → node C (miss, has fs origin)) proving the binding propagates and C serves reactively.
Relates to #1115.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
review: address PR #1124 findings (actionable refusal, origin-fetch a…
fix(cli): send the ADR 005 client identity binding on decdn fetch (#1115
fix(node): address PR review — displaced doc/attr, timeout metering, …
docs(node): correct stale bind_domain reuse comment (#1252)
refactor(node): dedupe runtime helpers (#1252) (#1274)