lightninglabs / lightninglabs/chantools
sweeptimelockmanual fails with "target script not derived" & flags don't appear to widen search range
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 239
- Forks
- 46
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 6
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the sweeptimelockmanual command entry point and its definitions for --maxnumchanstotal, --maxnumchanupdates, and --maxcsvlimit. Reproduce the v0.14.1 command from the issue and compare the parsed flag values with the reported search range. Done means the supplied limits affect the search and the target script is derived for this case, or the failure is narrowed to a documented condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100