Skip to content

Auto channel open: recommend a fixed-size channel to earning peers that run out of outbound - #660

Open
markettes wants to merge 1 commit into
feat/simple-auto-channel-open-datafrom
feat/simple-auto-channel-open-job
Open

markettes wants to merge 1 commit into
feat/simple-auto-channel-open-datafrom
feat/simple-auto-channel-open-job

Conversation

@markettes

Copy link
Copy Markdown
Collaborator

AutoChannelOpenJob runs every 30 minutes (1 in dev) behind ROUTING_ENGINE_ENABLED and AUTO_CHANNEL_OPEN_ENABLED. Per node it sums the evidence over each peer's open channels, since LND forwards non-strictly, and recommends a channel when the peer earned at least the minimum fees over the lookback, refused enough forwards with INSUFFICIENT_BALANCE in the shortage window, and is still below the low-outbound threshold now. The size is the node's fixed size: a peer it doesn't fit (wallet or budget) is skipped, never shrunk.

ChannelOpenInitiatorService is the pure planner. ChannelOpenPromotionService turns a recommendation into a pending ChannelOperationRequest at the highest fee rate we already charge the peer; a hot wallet goes straight to ChannelOpenJob. In Auto mode the job promotes on its own unless the node is in dry run.

Also carries the #621 fix: MaxFundableChannelSats leaves room for the funding fee and a change output, from coin selection's spendable coins.

The defaults (7 days / 50,000 sats, 6 h / 5 refusals, 20%) still need checking against prod forwarding data.

@markettes
markettes added this pull request to stack #663 October 30, 2026 18:07
@markettes
markettes requested a review from Jossec101 October 30, 2026 18:11
…peer keeps refusing forwards for lack of outbound
@markettes
markettes force-pushed the feat/simple-auto-channel-open-job branch from a031b8a to 2eae968 Compare October 30, 2026 18:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant