You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unbounded open_or_reuse_channel: a wedged on-chain RPC starves the candidate fallback loop #1143
Found during the review of #1142 (which fixed the sibling gap, #1141).
Problem
#1141 bounded the progressive-OPEN stage of a node→node candidate attempt with deps.config.pull_timeout. But open_or_reuse_channel runs before that wrapper and is itself unbounded, on both paths:
NodeOrigin::pull_from_candidate (buffered path) — same file
ChannelOpener::open_or_reuse_channel has no internal timeout (crates/client-pull/src/buyer_channel.rs).
So a candidate whose channel open hangs — an unresponsive RPC endpoint, a ChannelOpened tx that never mines — still blocks the loop indefinitely and consumes the caller's entire outer deadline. Candidates #2..N are never reached and the serve path refuses a blob the honest fallback holds. That is the same failure shape as #1141, one stage earlier.
crates/node/src/selection.rs already concedes this: the PULL_THROUGH_OUTER_SLACK doc notes open_or_reuse_channel "is not bounded by the per-candidate pull_timeout".
Wrapping it in tokio::time::timeout drops the future mid-flight, and that future may have an in-flight on-chain openChannel transaction. The tx can still land while we forget about it — gas spent on a channel we abandoned. That is a real hazard and wants its own design (persist-then-open, a bounded receipt wait, or reusing a pre-opened channel), not a timeout bolted onto a bugfix PR.
Activity
fix(node): the openChannel receipt must NOT be bounded (#1143 review)
test(node): guard the fixes — 3 of 4 were passing on reverted behavior
fix: address the multi-agent review of #1145