Skip to content

sweeptimelockmanual fails with "target script not derived" & flags don't appear to widen search range #250

Description

@jason-me

I'm trying to sweep a locally-force-closed channel's timelocked output using sweeptimelockmanual. This exact method worked successfully on a sibling channel from the same node moments earlier, but fails on this one.

Command run:

chantools sweeptimelockmanual \
  --frombackup ~/current.backup \
  --channelpoint 599b091845fd65a0e15c9bd704847bc0253b8f50c5b761e466d2de24e0d0c349:0 \
  --timelockaddr bc1qavc4vv7ncn5sdf7337m26duzwkj6jfr9jhr875gp3lsmpklarxxsh9k9md \
  --sweepaddr <redacted> \
  --feerate 5 \
  --maxnumchanstotal 1000 \
  --maxnumchanupdates 5000 \
  --maxcsvlimit 2016 \
  --publish

Output:

Starting to brute force the time lock script, using: remote_rev_base_point=0222c416eda336a2ce5178c9406bc64a77d6e4ad9207c3672a4e91e2134142a0d5, start_csv_limit=144, max_csv_limit=145, start_num_channels=331, max_num_channels=332, max_num_chan_updates=5000
Tried 332 of 500 keys.
Error: target script not derived

Notable issue: Despite passing --maxnumchanstotal 1000, --maxcsvlimit 2016, the debug output still shows the same narrow range as the default run (start_csv_limit=144, max_csv_limit=145, start_num_channels=331, max_num_channels=332) and these flags don't appear to be taking effect.

Context:

chantools version: v0.14.1
The channel was originally force-closed by lnd itself (ChanStatusLocalCloseInitiator), commitment type ANCHORS, csv_delay reported as 144 by lncli
Channel point: 599b091845fd65a0e15c9bd704847bc0253b8f50c5b761e466d2de24e0d0c349:0
The remote revocation base point was correctly identified from the channel.backup file
Timelock output confirmed on-chain 8+ months ago, well past any CSV maturity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions