Skip to content

Channel open recommendations: data model and per-node settings - #659

Open
markettes wants to merge 1 commit into
mainfrom
feat/simple-auto-channel-open-data
Open

markettes wants to merge 1 commit into
mainfrom
feat/simple-auto-channel-open-data

Conversation

@markettes

Copy link
Copy Markdown
Collaborator

First of a four-PR stack that replaces #615–#621 with the simpler rule from review: open a fixed-size channel to a peer whose route has been earning fees and that we recently couldn't serve for lack of outbound.

Adds the ChannelOpenRecommendation entity, one row per node and peer, holding the evidence (earned fees, amount routed, refusals, usable outbound, capacity) plus the size and fee policy it would open at, with its lifecycle statuses. Node gets the per-node settings: enabled, mode, funding wallet, fixed channel size and a budget with its refresh interval. One migration, AddAutoChannelOpen.

Repositories: recommendations (upsert, expire, fail unrealized promotions, last decision per peer for the cooldown), per-channel aggregates over ForwardingHtlcEvents grouped in the database (earned fees, settled out, INSUFFICIENT_BALANCE refusals), nodes with the feature on, and sats committed to opens since the budget period began. Defaults live in Constants.

Nothing reads this yet; the job comes in the next PR.

@markettes
markettes requested a review from Jossec101 October 30, 2026 18:06
@markettes
markettes added this pull request to stack #663 October 30, 2026 18:07
@markettes
markettes force-pushed the feat/simple-auto-channel-open-data branch from d9a5091 to ded13c5 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