The ChannelCreator Planner asserts
min_channel + min_remaining <= max_channel at construction, where
min_remaining = 2 * min_channel + 20000 sats. Option validation
only enforced max_channel >= 2 * min_channel, so a pair such as
min-channel=1000000 max-channel=2000000 passed startup and aborted
the plugin on the first channel-creation run (#147). The old 2x
clamp never prevented the crash: any pair it adjusted still
violated the planner precondition.
AmountSettingsHandler now enforces the precondition directly. On
conflict it keeps max-channel, which sets typical open size, and
lowers min-channel to the largest fitting value, logging a warning.
A max-channel too low for even the smallest permitted min-channel
is raised.
ChannelCreator::Manager also re-checks both planner preconditions
before constructing the Planner and skips the creation cycle with a
log line instead of aborting. This covers the sibling assert
min_amount * 2 <= total, which fails when onchain funds change
between the decider's trigger and the creator's run (#137).
The track-record pass orders open proposals keepers, no-record,
underperformers. The no-record tier carries no earnings evidence,
so order it by a capability prior: nodes whose node_announcement
advertises splicing (BOLT 9 option_splice, bits 62/63) come first,
since their channels can later be resized without a close and
reopen. Keepers and underperformers keep their earnings-based
order, and nothing moves across a tier boundary.
New Ln::feature_bit tests a bit in a BOLT 9 hex bitfield (bit 0 is
the least-significant bit of the last byte), with a unit test.
Spliceability is looked up per candidate via listnodes; an RPC
failure or absent features field counts as not spliceable, so the
lookup cannot block channel creation. The Track records report
marks spliceable no-record nodes with an (S) suffix.
After the size rearranger and the IP-binning reprioritizer, partition
the proposal list by track-record verdict: keepers first, then
candidates with no record, then underperformers. Within a tier the
earlier stages' order is preserved. Because the Planner consumes
proposals in order until funds run out, placing a tier last implements
'only used if no better candidate can absorb the funds' without an
outright veto. The partition runs last so the earlier perturbation
stages cannot promote a candidate across a tier boundary.
Logs one Info line per creation request with the per-tier membership
and each judged candidate's TRAL and observed days.
CLN v26.06 deprecates getroute in favor of askrene's getroutes.
Replace the Dowser's getroute+listchannels loop (up to ~40 RPC
round-trips) with a single getroutes call and let askrene's
min-cost-flow solver enumerate multi-path capacity directly. Response
parsing follows the getroutes schema; 205/206 (no route / too
expensive) maps to zero capacity.
Size the probe to the caller's threshold. The Dowser is a flow
estimator: callers compare the dowsed flow against a channel size (the
janitor and preinvestigator min-channel acceptance test, the channel
creator's sizing). A fixed probe amount caps the estimate, so any
threshold at or above that cap rejects every candidate regardless of
real capacity. RequestDowser now carries a min_amount; callers that
test against a channel size set it, and the probe runs at
min_amount / reserve_factor so a full-flow result clears the threshold
for any configured channel size. The channel creator dowses at
max-channel so new channels size toward the operator ceiling instead
of being pinned at the min-channel floor. The manual clboss-dowser
command keeps the fixed default probe.