Giter Club home page Giter Club logo

chantools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chantools's Issues

Removechannel: Error: channel not found

Thanks @guggero for upgrading chantools, it now wants to look at the channel DB. But my problem persists, I can't seem to remove channel 726607861215526913.

Getchaninfo tells me the chan_point is 000. But chantools can't find that. It can't find the real chan_point either (got it from 1ml).

Hope you can assist. All my fee scripts are broken now 😅 .

[ ]# lncli feereport 
[lncli] rpc error: code = Unknown desc = no policy for outgoing channel 726607861215526913 
[ ]# lncli getchaninfo 726607861215526913
{
    "channel_id": "726607861215526913",
    "chan_point": "0000000000000000000000000000000000000000000000000000000000000000:0",
    "last_update": 1627326628,
    "node1_pub": "03ae9f91a0cb8ff43840e3c322c4c61f019d8c1c3cea15a25cfc425ac605e61a4a",
    "node2_pub": "03e691f81f08c56fa876cc4ef5c9e8b727bd682cf35605be25d48607a802526053",
    "capacity": "0",
    "node1_policy": {
        "time_lock_delta": 40,
        "min_htlc": "1000",
        "fee_base_msat": "1000",
        "fee_rate_milli_msat": "1",
        "disabled": true,
        "max_htlc_msat": "1100000000",
        "last_update": 1627326628
    },
    "node2_policy": null
}

[Stop LND]

[ ]# chantools removechannel --channeldb channel.db --channel 0000000000000000000000000000000000000000000000000000000000000000:0
2021-07-27 16:48:06.383 [INF] CHAN: chantools version v0.9.0 commit                          
2021-07-27 16:49:04.520 [INF] CHDB: Checking for schema update: latest_version=22, db_version=22
Error: channel not found                                                                     
[..]

[ ]# chantools removechannel --channeldb channel.db --channel d3eb32c6294ec160133ef6800f9e35087b4ee94a07675357aebf4c9cef59f3cc:1
2021-07-27 16:49:14.231 [INF] CHAN: chantools version v0.9.0 commit 
2021-07-27 16:49:14.243 [INF] CHDB: Checking for schema update: latest_version=22, db_version=22
Error: channel not found                                                                     
[..]

[question] will chantools work with c-lightning ?

hi,
i selected c-lightning (new) on raspiblitz, as opposed to (default) lnd, for recovery, which was what ran on my previous node, lncli.
i have a bad feeling it was a bad idea, if only for this reason,

  • unless i really could install lnd alongside c-lightning.
    i think i read something like that on the raspiblitz docs, last release 1.7.1
    "It's also possible to use both lightning node implementations in parallel on your RaspiBlitz later on - just pick one to start with for now."

Tip on install instructions

May I suggest you install a fresh Ubuntu.
follow you instructions and if you have to deviate in any way add that to your installation instructions and more people will use your tool.

Chantools for postgres

This is not an issue, but I cannot find a discussion tab for this project so I will ask my question here.

I am interested to perform a chantools dropchannelgraph but for a postgres-backed lnd. Is there any way to do this? I tried browsing through the postgres db especially the channeldb_kv to see if I can understand the contents but it is just a key-value table with binary (not human readable) data in the key and value columns.

If you can share maybe a SQL delete statement that I can run to get a similar effect to chantools dropchannelgraph it would be appreciated. Thanks.

FR: remote-close recovery from channel.backup

Lost a node due to a corrupted channels.db, and channels were remotely force-closed (not part of online SCB)

LND doesn't appear do anything with the SCB's in this scenario that makes the funds accessible.

In attempting recovery with chantools, its not clear how to recover with neither the channels.db or a summary dumped from lncli.

db_version 29 support?

seeing a lot of messages like

Refusing to revert from db_version=29 to lower version=24

in both summary and removechannel commands

lnd version used is same as mentioned in https://github.com/guggero/chantools/blob/master/doc/chantools_removechannel.md:
2022-10-06 22:10:37.615 [INF] LTND: Version: 0.15.1-beta commit=v0.15.1-beta

chantools version exactly same as in readme install instructions and latest release, using:
wget -O chantools.tar.gz https://github.com/guggero/chantools/releases/download/v0.10.4/chantools-linux-amd64-v0.10.4.tar.gz

*****.onion: no suitable address found when running chantools fakechanbackup

I'm trying to run a fakechanbackup with below information:

chantools fakechanbackup
--capacity 188888
--channelpoint hhhhhhhh:1
--remote_node_addr *******.onion:9735
--short_channel_id 692597x1707x1
--multi_file fake.backup

but I'm getting *****.onion: no suitable address found when running chantools fakechanbackup.

Below is the closed channel that I'm trying to recover from:
https://1ml.com/node/036e4a7f62e96ff86ae27b7b4..
Is the information i entered correct?

compactdb runs for days

hey there!

i am trying to recover my funds for over a year now. i had a channel to acinq and then i moved and my node was down for three months or so.
when i put it back online the channel was closed (used scb) but my funds did not return. i contacted acinq and they said from their side the channel is closed (they got me the channel data, maybe i can use them to refund?).

so i went through the github issues from rootzoll and made sure it was no raspiblitz problem and went to the lnd-devs after who lead me back to chantools.

now i still don't have my funds back, yet i have the channel data if that might be of help.

i am trying to run the chantools compactdb command, but it runs for days and nothing seems to happen. when i cancel it, the logfile says that it found some private keys.

i have been advised to use the genimportscript but i don't exactly know how. could you help me?

best

panic: runtime error: index out of range [5998551040] with length 2147483647

Running the following command on my channel.db:
chantools compactdb --sourcedb ./lnd/data/graph/mainnet/channel.db --destdb ./results/compacted.db

Getting this error:

2022-06-20 20:10:31.013 [INF] CHAN: chantools version v0.10.4 commit 
panic: runtime error: index out of range [5998551040] with length 2147483647

goroutine 1 [running]:
github.com/coreos/bbolt.(*DB).page(...)
	github.com/coreos/[email protected]/db.go:886
github.com/coreos/bbolt.(*Tx).page(...)
	github.com/coreos/[email protected]/tx.go:620
github.com/coreos/bbolt.(*Bucket).pageNode(0x2dcc3e0, 0x1658aa, 0x0, 0x0, 0x0)
	github.com/coreos/[email protected]/bucket.go:724 +0x1ac
github.com/coreos/bbolt.(*Cursor).First(0x2c53bac, 0x0, 0x0, 0x135817c, 0x2cabd50, 0x86ceec, 0x1)
	github.com/coreos/[email protected]/cursor.go:34 +0x54
github.com/coreos/bbolt.(*Bucket).ForEach(0x2dcc3e0, 0x2c53bf4, 0x0, 0x0)
	github.com/coreos/[email protected]/bucket.go:387 +0x8c
main.(*compactDBCommand).walkBucket(0x2db9520, 0x2dcc3e0, 0x0, 0x0, 0x0, 0x6f429554, 0xd, 0xd, 0x0, 0x0, ...)
	github.com/guggero/chantools/cmd/chantools/compactdb.go:208 +0x128
main.(*compactDBCommand).walk.func1.1(0x6f429554, 0xd, 0xd, 0x2dcc3e0, 0x2dcc3e0, 0x0)
	github.com/guggero/chantools/cmd/chantools/compactdb.go:187 +0x138
github.com/coreos/bbolt.(*Tx).ForEach.func1(0x6f429554, 0xd, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
	github.com/coreos/[email protected]/tx.go:129 +0x70
github.com/coreos/bbolt.(*Bucket).ForEach(0x2ce5b8c, 0x2c53cc0, 0x2c9efe8, 0x0)
	github.com/coreos/[email protected]/bucket.go:388 +0xf8
github.com/coreos/bbolt.(*Tx).ForEach(0x2ce5b80, 0x2e29ce0, 0x8739d4, 0x2d45180)
	github.com/coreos/[email protected]/tx.go:128 +0x58
main.(*compactDBCommand).walk.func1(0x2ce5b80, 0x2d45300, 0x2ce5b80)
	github.com/guggero/chantools/cmd/chantools/compactdb.go:181 +0x54
github.com/coreos/bbolt.(*DB).View(0x2d45180, 0x2e29d30, 0x0, 0x0)
	github.com/coreos/[email protected]/db.go:725 +0x90
main.(*compactDBCommand).walk(0x2db9520, 0x2d45180, 0x2e29d6c, 0x0, 0x0)
	github.com/guggero/chantools/cmd/chantools/compactdb.go:180 +0x54
main.(*compactDBCommand).compact(0x2db9520, 0x2d452c0, 0x2d45180, 0x0, 0x0)
	github.com/guggero/chantools/cmd/chantools/compactdb.go:108 +0xe4
main.(*compactDBCommand).Execute(0x2db9520, 0x2cef1e0, 0x2db9c40, 0x0, 0x4, 0x0, 0x0)
	github.com/guggero/chantools/cmd/chantools/compactdb.go:75 +0x228
github.com/spf13/cobra.(*Command).execute(0x2cef1e0, 0x2db9c20, 0x4, 0x4, 0x2cef1e0, 0x2db9c20)
	github.com/spf13/[email protected]/command.go:852 +0x354
github.com/spf13/cobra.(*Command).ExecuteC(0x133ce58, 0x2e29f4c, 0x1b, 0x1b)
	github.com/spf13/[email protected]/command.go:960 +0x274
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:897
main.main()
	github.com/guggero/chantools/cmd/chantools/root.go:111 +0x324

Would this mean my channel.db is corrupted in some way?

Installing on Umbrel

Trying to install ChanTools on Umbrel. But always getting the following error:

go install -v -ldflags "-X main.Commit=v0.10.6-7-g84e51eb" ./...
/bin/sh: 1: go: not found
make: *** [Makefile:69: install] Error 127

Hardware is Raspberry Pi 4 4GB
Umbrel : latest

Issue using make install

I've got an ubuntu v18 running in a VM. When tying to "make install" the chantools I get the following error

$ sudo make install
 Installing chantools.
GO111MODULE=on go install -v -ldflags "-X main.Commit=v0.5.0" ./...
github.com/guggero/chantools/lnd
github.com/chantools/lnd
# github.com/guggero/chantools/lnd
/usr/lib/go-1.10/src/github.com/guggero/chantools/lnd/channel.go:76:14: cannot use ourSig (type []byte) as type input.Signature in argument to input.SpendMultiSig:
	[]byte does not implement input.Signature (missing Serialize method)
/usr/lib/go-1.10/src/github.com/guggero/chantools/lnd/channel.go:76:14: cannot use theirSig (type []byte) as type input.Signature in argument to input.SpendMultiSig:
	[]byte does not implement input.Signature (missing Serialize method)
# github.com/chantools/lnd
/usr/lib/go-1.10/src/github.com/chantools/lnd/channel.go:76:14: cannot use ourSig (type []byte) as type input.Signature in argument to input.SpendMultiSig:
	[]byte does not implement input.Signature (missing Serialize method)
/usr/lib/go-1.10/src/github.com/chantools/lnd/channel.go:76:14: cannot use theirSig (type []byte) as type input.Signature in argument to input.SpendMultiSig:
	[]byte does not implement input.Signature (missing Serialize method)
Makefile:69: recipe for target 'install' failed
make: *** [install] Error 2

Any ideas?

sweeptimelockmanual finds keys but errors out

First of all, I'm grateful @guggero for you sharing this tool, thank you.

Many months ago a channel was force-closed but I lost the node data, recently I managed to find some backup, I did the compactdb and summary. I then tried rescueclosed with no luck. Also tried sweeptimelock but says "info missing or all spent" for the channel, but I can see two outputs of the force closing onchain being still unspent.
So I tried sweeptimelockmanual and it did find them but I get an error. Any ideas?
Note regarding the stacktrace some lines might be off because I added some code. I found the channel num update from some external logging I was doing and it was too large and taking too long otherwise.

Thank you

$ chantools sweeptimelockmanual --timelockaddr bc1qtheaddr --remoterevbasepoint 02thebasepoint --fromsummary ./results/summary-2023-04-27-20-19-08.json --rootkey xprvAdqwdq --fromchanneldb ./channel.db  --apiurl https://mempool.space/api --sweepaddr bc1anotheraddr  --maxnumchanstotal 5000 ...
2023-04-27 21:49:16.167 [INF] CHAN: chantools version v0.11.0 commit 
2023-04-27 21:49:16.241 [INF] CHAN: Tried 327 of 5000 keys.
2023-04-27 21:49:16.329 [INF] CHAN: Tried 328 of 5000 keys.
2023-04-27 21:49:16.347 [INF] CHAN: Found keys at index 328 with CSV timeout 360
2023-04-27 21:49:16.445 [INF] CHAN: Fee 123 sats of 1234567 total amount (estimated weight 486)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x768ceb]

goroutine 1 [running]:
github.com/btcsuite/btcd/txscript.NewTxSigHashes(0xc0007c8140, {0x0, 0x0})
        /home/user/go/pkg/mod/github.com/btcsuite/[email protected]/txscript/hashcache.go:239 +0x14b
github.com/guggero/chantools/lnd.(*Signer).SignOutputRaw(0x20?, 0x1249b20?, 0xc0005d0000)
        /home/user/lnd-recovery/chantools/lnd/signer.go:40 +0xb5
github.com/lightningnetwork/lnd/input.CommitSpendTimeout({0x166b820?, 0xc0003fcf00?}, 0xc0005d0000, 0xc0005ac4b0?)
        /home/user/go/pkg/mod/github.com/lightningnetwork/[email protected]/input/script_utils.go:1108 +0x45
main.sweepTimeLockManual(0xc000288d80, {0x7ffd67a802f6, 0x19}, {0x7ffd67a8031c, 0x2a}, {0x7ffd67a80175, 0x3e}, 0xc000406200?, 0x7b78?, 0x157c, ...)
        /home/user/lnd-recovery/chantools/cmd/chantools/sweeptimelockmanual.go:292 +0xe68
main.(*sweepTimeLockManualCommand).Execute(0xc000017780, 0xc0002b7b88?, {0xc0002b7b60?, 0x0?, 0x0?})
        /home/user/lnd-recovery/chantools/cmd/chantools/sweeptimelockmanual.go:151 +0x192
github.com/spf13/cobra.(*Command).execute(0xc000404a00, {0xc0002ffce0, 0x16, 0x16})
        /home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x1f2ee20)
        /home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x39d
github.com/spf13/cobra.(*Command).Execute(...)
        /home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
        /home/user/lnd-recovery/chantools/cmd/chantools/root.go:115 +0x43e

rescuefunding for a transaction that generated neither channel nor pending channel

I tried to open 4 channels in one transaction by running the bos open command, but although the transaction was confirmed, only 3 channels were created and the remaining one generated neither a channel nor a pending channel.

The transaction is shown below, and based on the channel points of the other channels that worked, I am guessing that the index that did not create a channel is 1.
https://mempool.space/tx/67a15827b95c68b7e708e82732ff33f92ce39c1547e09714acecc09789fcebfc

The detailed situation is described in this bos issue.

Fortunately I was able to get cooperation from the pier I tried to open the channel with, so I am planning to use the resucuefunding command to recover the funds. In this case, I think I need to run the command without using channel.db, but how do I get the "--localkeyindex" that I need?

Possible integer overflow in vanitygen command

When running chantools vanitygen --prefix 026865646765686F67 --threads 8 (have a nice chuckle at the prefix, if you decide to decode it), the following is output:

Running vanitygen on 8 threads. Prefix bit length is 65, expecting to approach
probability p=1.0 after -9,223,372,036,854,775,808 seeds

I assume I've managed to cause an int64 overflow here. Just wanted to give you a heads up.

Can not compile - undefined: newMAC

Hi,
I am trying to compile but I get an error:

admin@rock64:~/download/chantools$ go version
go version go1.15.3 linux/arm64
admin@rock64:~/download/chantools$ make
 Building chantools.
GO111MODULE=on go build -v -ldflags "-X main.Commit=v0.5.0" ./...
vendor/golang.org/x/crypto/poly1305
# vendor/golang.org/x/crypto/poly1305
/usr/local/go/src/vendor/golang.org/x/crypto/poly1305/sum_noasm.go:10:7: undefined: newMAC
Makefile:65: recipe for target 'build' failed
make: *** [build] Error 2
admin@rock64:~/download/chantools$ 

SIGSEGV: segmentation violation with compactdb

Hi, I'm trying to fix this error that I got on my lnd node :

2020-09-08 11:12:40.045 [INF] LTND: Version: 0.11.0-beta commit=v0.11.0-beta, build=production, logging=default
2020-09-08 11:12:40.046 [INF] LTND: Active chain: Bitcoin (network=mainnet)
2020-09-08 11:12:40.097 [INF] LTND: Opening the main database, this might take a few minutes...
2020-09-08 11:12:40.097 [INF] LTND: Opening bbolt database, sync_freelist=false
panic: freepages: failed to get all reachable pages (page 17742: multiple references)

And when I run chantools compactdb --sourcedb copyofchannel.db --destdb compacted.db,

I'm getting this error

2020-09-08 11:57:40.420 [INF] CHAN: chantools version v0.5.0 commit v0.5.0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x893069]

goroutine 1 [running]:
github.com/coreos/bbolt.(*Bucket).Sequence(...)
        <...>/go/pkg/mod/github.com/coreos/[email protected]/bucket.go:338
main.(*compactDBCommand).walk.func1.1(0x7fa69575f110, 0x29, 0x29, 0x0, 0x0, 0x7fa6997fd000)
        <...>/Src/github/3rd/chantools/cmd/chantools/compactdb.go:147 +0x29
github.com/coreos/bbolt.(*Tx).ForEach.func1(0x7fa69575f110, 0x29, 0x29, 0x7fa69575f139, 0x0, 0x0, 0x0, 0x0)
        <...>/Software/go/pkg/mod/github.com/coreos/[email protected]/tx.go:129 +0x8c
github.com/coreos/bbolt.(*Bucket).ForEach(0xc0000ce0f8, 0xc00023fae0, 0x1, 0xc0000a0268)
        <...>/Software/go/pkg/mod/github.com/coreos/[email protected]/bucket.go:388 +0xfe
github.com/coreos/bbolt.(*Tx).ForEach(0xc0000ce0e0, 0xc00023fb28, 0x6d6bcf, 0xc0000c6000)
        <...>/Software/go/pkg/mod/github.com/coreos/[email protected]/tx.go:128 +0x67
main.(*compactDBCommand).walk.func1(0xc0000ce0e0, 0x0, 0xc0000ce0e0)
        <...>/Src/github/3rd/chantools/cmd/chantools/compactdb.go:145 +0x65
github.com/coreos/bbolt.(*DB).View(0xc0000c6000, 0xc00023fbd8, 0x0, 0x0)
        <...>/Software/go/pkg/mod/github.com/coreos/[email protected]/db.go:725 +0x96
main.(*compactDBCommand).walk(0xc0000a48a0, 0xc0000c6000, 0xc00023fc50, 0x0, 0x0)
        <...>/Src/github/3rd/chantools/cmd/chantools/compactdb.go:144 +0x66
main.(*compactDBCommand).compact(0xc0000a48a0, 0xc0000c6200, 0xc0000c6000, 0x0, 0x0)
        <...>/Src/github/3rd/chantools/cmd/chantools/compactdb.go:72 +0x125
main.(*compactDBCommand).Execute(0xc0000a48a0, 0xc0000c2000, 0x0, 0x5, 0xc0000a48a0, 0x1)
        <...>/Src/github/3rd/chantools/cmd/chantools/compactdb.go:39 +0x1c5
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc00008e600, 0xc000020190, 0x5, 0x5, 0xae, 0x0, 0x0, 0x8f77c0, 0xc00009e420)
        <...>/Software/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:316 +0x89b
github.com/jessevdk/go-flags.(*Parser).Parse(...)
        <...>/Software/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:186
main.runCommandParser(0x8942d9, 0x99fac9)
        <...>/Src/github/3rd/chantools/cmd/chantools/main.go:160 +0x8cf
main.main()
        <...>/Src/github/3rd/chantools/cmd/chantools/main.go:53 +0x26

So, I dont know if the program cannot read the db file because is from a newer version of lnd or is a program issue because that error appears either in my raspberrypi and laptop.

Chantools derives the wrong identity key

While trying to assist in the recovery of funds described in #41, I was presented with an error that the derived identity key was not found in the match file during step [1/3] using the zombierecovery prepare keys command. Further investigation by running derivekey --neuter --identity yielded the same identity which is not the expected node identity for this seed phrase.

At first, I thought the seed phrase was wrong for the node (big problem!) but I had verified it previously with the lnd recovery process, so I setup another test to verify my previous results. I installed a fresh copy of bitcoind/lnd along side the chantools to compare. When loading a wallet with lncli create and copy/pasting the seed used with chantools, I am indeed able to recover the correct identity of my node (good news, hopefully?).

dumpchannels not working

./chantools dumpchannels --channeldb /media/john/hdd2/channel.db
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x70abe0]

goroutine 1 [running]:
github.com/btcsuite/btcd/wire.(*MsgTx).BtcEncode(0x0, 0xc51ec0, 0xc0009f44b0, 0x200000000, 0xc0001bcf00, 0x1d6)
/home/john/go/pkg/mod/github.com/btcsuite/[email protected]/wire/msgtx.go:682 +0x30
github.com/btcsuite/btcd/wire.(*MsgTx).Serialize(...)
/home/john/go/pkg/mod/github.com/btcsuite/[email protected]/wire/msgtx.go:777
github.com/guggero/chantools.dumpChannelInfo(0xc000174ab0, 0x12, 0x0)
/home/john/go/pkg/mod/github.com/guggero/[email protected]/cmd_dumpchannels.go:76 +0x11f
github.com/guggero/chantools.(*dumpChannelsCommand).Execute(0xc00008fe50, 0xc00048f8c0, 0x0, 0x3, 0xc00008fe50, 0x1)
/home/john/go/pkg/mod/github.com/guggero/[email protected]/main.go:193 +0x100
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc0000aa300, 0xc00007c050, 0x3, 0x3, 0x38, 0x0, 0x0, 0x9ac660, 0xc00008fe50)
/home/john/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:316 +0x8dc
github.com/jessevdk/go-flags.(*Parser).Parse(...)
/home/john/go/pkg/mod/github.com/jessevdk/[email protected]/parser.go:186
github.com/guggero/chantools.Main(0xc000479f20, 0x43cdea)
/home/john/go/pkg/mod/github.com/guggero/[email protected]/main.go:63 +0x2a0
main.main()
/home/john/go/pkg/mod/github.com/guggero/[email protected]/cmd/chantools/main.go:11 +0x26

issue running chantools command

/home/admin/go/bin/chantools --fromchanneldb ./results/compacted.db summary
2020-10-31 20:23:34.527 [INF] CHAN: chantools version v0.5.0 commit v0.5.0
error opening channel DB: write results/compacted.db: bad file descriptor
Error running chantools: error opening channel DB: write results/compacted.db: bad file descriptor

error at step 6 - .json file creation

Hello,
I get the following error message at Step 6, I was wondering if this is a user error from my side or is the channel.db and resulting compacted.db is maybe damaged/ incomplete? I pulled original channel.db (around 100MB) from a hard disc that failed with my raspiblitz about 1.5 years ago with one of the first versions before there were proper backup options...

Thanks in advance!!

rana@rana-EZbook:/tmp$ chantools --fromchanneldb /tmp/compacted.db summary
2020-12-30 17:02:56.599 [INF] CHAN: chantools version v0.7.1 commit v0.7.1
error fetching channels: unable to read channel for chain_hash=6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000, node_key=022c260f9ad58196af280c80a96ec9eabf6404df59ff1a7553b0f381c875a29ba0: unable to read channel data for chan_point=f39310e4eabd5b2bef04717deaea15c265c06bed464eaecb49653e8b9c42c3a5:1: unable to fetch chan info: no chan info found
Error running chantools: error fetching channels: unable to read channel for chain_hash=6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000, node_key=022c260f9ad58196af280c80a96ec9eabf6404df59ff1a7553b0f381c875a29ba0: unable to read channel data for chan_point=f39310e4eabd5b2bef04717deaea15c265c06bed464eaecb49653e8b9c42c3a5:1: unable to fetch chan info: no chan info found

walletinfo timeout when wallet is already unlocked

When running...

chantools walletinfo --withrootkey --walletdb ~/.lnd/data/chain/bitcoin/mainnet/wallet.db

...against a wallet that's already been unlocked in lnd, we get:

2021-05-07 09:30:10.977 [INF] CHAN: chantools version v0.7.1 commit v0.7.1
Input wallet password:
error opening wallet database: timeout
Error running chantools: error opening wallet database: timeout

Workaround was to simply restart lnd. I was then able to successfully run the walletinfo command.

I then unlocked the wallet in lnd and re-tried chantools walletinfo and get the same timeout as above.

I also tried on the latest version (8.4) and the results were the same.

Apologies if this is know/the expected behavior.

lnd version: 0.11.1-beta commit=v0.11.1-beta
bitcoind: 210100

thanks for what you do!! very helpful software

Perhaps a unique situation? Help needed to recover.

So my MYNODE with Lightning enabled crashed. The SSD card went bad and then my HDD started to go bad.
I have been trying to get my channel sats back ever since. I think I make progress and keep ending up back here.

My situation:

I have my 24 word seed. I had an old channel.backup file prior to me setting up my open channel.
I figured I was safe with those 2 alone, but apparently not [lesson learned].
I did not recover a channel.db (I have one now but only after I re-imaged my SD card and did a FULL node on a new SSD).
I was hoping it would recover, but only the ON-CHAIN sats was recovered. CHANNEL sats are not there.
I am all synced with both bitcoin and lightning [one week later].

I have followed all instructions in here. However, chantools indicated I have NO open channels on my side.

Channel Id: 761439290096353281
Short Channel Id 692525x1080x1
Channel Point 05198ad720eac3f575095b1cb9d6a5d55851f84402e60292d0a62d041def5345:1
Capacity 0.00515000 BTC 515,000 sat (0.000165%) $343.18
Last Update 17 days ago First Seen Sunday, July 25, 2021 Last Seen 3 days ago Age 2 months

My Address: bc1qntytktteydeqx3wgpmt2gvfnmunwhck2ufq52af2qfr3k3vp9k0qfkad9z
Transaction Included in Block 692525

My peer "LogansRun" appears to have forced closed:

1ML.COM Data:
Node 1 [LOGANSRUN]: 024794d1446e510c75f84bbd75cc151124522aed03ad75a20f1708f77e5f3e674a
Alias Capacity Time Lock Delta Min HTLC Base Fee Fee Rate per sat
LogansRun 0.50640991 BTC 34 1 1.000 sat 0.000001 sat
$33,745.61 50,640,991 sat $0.000666369 $0.000000000666

Capacity 0.506409910 BTC (0.016%) $33,745.61 Channel Count 29
IP 91.193.4.187:54853
024794d1446e510c75f84bbd75cc151124522aed03ad75a20f1708f77e5f3e674a


Node 2 [MYNODE]: 03e7bd63391110e5f988412524970a0fa3338ce78e0c6d636ed3fb47c82ad0f5c6
Alias Capacity Time Lock Delta Min HTLC Base Fee Fee Rate per sat
mynodebtc.com 0.00515000 BTC 40 1 1.000 sat 0.000001 sat
[myNode] $343.18 515,000 sat $0.000666369 $0.000000000666

Capacity 0.005150000 BTC (0.000%) $343.18 Channel Count 1
IP 7byg3emqy4t3vlt2d274p653gez6vlulvr2pwfiyg2un2jq7kwi72lid.onion:9735
03e7bd63391110e5f988412524970a0fa3338ce78e0c6d636ed3fb47c82ad0f5c6

--
HELP?! HOW CAN I GET THESE BACK?
Right now, this has been a long learning experience to date.
I'm hoping that I am close, but not sure what else to do.
Appreciate any help here

chantools outputs:

rescueclosed-2021-10-20-13-19-33.json
{
"channels": [],
"open_channels": 0,
"closed_channels": 0,
"force_closed_channels": 0,
"coop_closed_channels": 0,
"fully_spent_channels": 0,
"channels_with_unspent_funds": 0,
"channels_with_potential_funds": 0,
"funds_open_channels": 0,
"funds_closed_channels": 0,
"funds_closed_channels_spent": 0,
"funds_force_closed_maybe_ours": 0,
"funds_coop_closed_maybe_ours": 0
}

summary-2021-10-20-13-18-32.json
{
"channels": [],
"open_channels": 0,
"closed_channels": 0,
"force_closed_channels": 0,
"coop_closed_channels": 0,
"fully_spent_channels": 0,
"channels_with_unspent_funds": 0,
"channels_with_potential_funds": 0,
"funds_open_channels": 0,
"funds_closed_channels": 0,
"funds_closed_channels_spent": 0,
"funds_force_closed_maybe_ours": 0,
"funds_coop_closed_maybe_ours": 0
}

LOG FILE:

2021-10-20 13:17:29.926 [INF] CHAN: chantools version v0.9.3 commit
2021-10-20 13:18:32.764 [INF] CHAN: chantools version v0.9.3 commit
2021-10-20 13:18:32.765 [INF] CHAN: Finished scanning.
2021-10-20 13:18:32.765 [INF] CHAN: Open channels: 0
2021-10-20 13:18:32.766 [INF] CHAN: Sats in open channels: 0
2021-10-20 13:18:32.766 [INF] CHAN: Closed channels: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> force closed channels: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> coop closed channels: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> closed channels with all outputs spent: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> closed channels with unspent outputs: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> closed channels with potentially our outputs: 0
2021-10-20 13:18:32.766 [INF] CHAN: Sats in closed channels: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> closed channel sats that have been swept/spent: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> closed channel sats that are in force-close outputs: 0
2021-10-20 13:18:32.766 [INF] CHAN: --> closed channel sats that are in coop close outputs: 0
2021-10-20 13:18:32.767 [INF] CHAN: Writing result to results/summary-2021-10-20-13-18-32.json
2021-10-20 13:19:09.672 [INF] CHAN: chantools version v0.9.3 commit
2021-10-20 13:19:33.686 [INF] CHAN: Found 0 private keys! Import them into bitcoind through the console by pasting:
rescanblockchain 481824

2021-10-20 13:19:33.686 [INF] CHAN: Writing result to results/rescueclosed-2021-10-20-13-19-33.json

Error: funding output script does not match UTXO

I believe I have "funds locked in a funding multisig output that never resulted in a proper channel" and am therefore trying to use rescuefunding, but I may not be doing it right. All I get is "Error: funding output script does not match UTXO."

This is the funding transaction: d89373cf20693b1274882480dafbe8363b4334984ea82975ba383e63052c204d

I am running this:
chantools rescuefunding --confirmedchannelpoint d89373cf20693b1274882480dafbe8363b4334984ea82975ba383e63052c204d:0 --remotepubkey 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f --sweepaddr bc1qmyaddyhere --feerate 30

I got in this situation by accidentally broadcasting this transaction from Electrum, when I meant to only sign the transaction and let balanceofsatoshis tool's bos open open the channel. I see no indication of a "pending channel" in LND, just have this confirmed transaction.

Thank you for any help in advance!

Allow brute-forcing locally force-closed output script in sweeptimelock

Add two more ways for sweeping the time lock of a locally force-closed output:

  • If the channel.backup file is available, take the remote_revocation_basepoint from that file
  • If the remote_revocation_basepoint was obtained from another source, use that

The rest of the information is derived from local keys which can be brute forced.

DB v22 support

# chantools removechannel --channeldb channel.db --channel 0000000000000000000000000000000000000000000000000000000000000000:0
2021-07-24 11:16:35.519 [INF] CHAN: chantools version v0.8.6 commit 
2021-07-24 11:16:37.265 [INF] CHDB: Checking for schema update: latest_version=20, db_version=22
2021-07-24 11:16:37.265 [ERR] CHDB: Refusing to revert from db_version=22 to lower version=20
Error: error opening channel DB: channel db cannot revert to prior version

I hope chantools can get an update to support v22 DB

Create AEZEED cipher from XPRV

Hi Guggero,

I am looking to create a better way of backing up LND wallets, using the BIP85 feature of the ColdCard. This allows me to get XPRV keys that are related to my super secure master seed, and one of those seeds could maybe be my lightning wallet.

From coldcard: use the bip85 "derive entropy" mode, select BIP32 XPRV, then select path 0-(any number), then select save to MicroSD card. Now I have a file with a key starting with "xprv" in it.

Using chantools:
chantools derivekey --rootkey=xprv... --path=m/1
This results in:

Deriving path m/1 for network mainnet.

Public key: ...
Extended public key (xpub): ...
Address: ...
Legacy address: ...

Private key (WIF): ...
Extended private key (xprv): ...

Would it be possible to create an AEZEED cipher for importing into LND with this information?
Is this something that makes sense to be in chantools?

Forceclose: Signature must be zero for failed CHECK(MULTI)SIG operation

Hi, when I use the forceclose command some channels give me this error regarding the signature:

[INF] CHAN: Published TX a445b928e0603d0af0b1c23876adb975c442009aa7c73c1c08bbb9a09bf1918e, response: sendrawtransaction RPC error: {"code":-26,"message":"non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)"}

unpack chan backup: chacha20poly1305: message authentication failed

LND is up and running without errs on raspiblitz 1.7.1

$ lncli restorechanbackup --multi_file /mnt/BKP/channel.backup
[lncli] unable to restore chan backups: rpc error: code = Unknown desc = unable to unpack chan backup: chacha20poly1305: message authentication failed

Got the exact same output on the last six backups, besides channel.backup. I kept the usb, i was about to format it since i had made remote backups of it, so this is the original SBC usb. I had first tried the copy, which failed too

Fresh lnd node - recovery from lnd-rescue failed, i had no option, it kept shutting down the device, but thought i still had a chance to recover some of the funds, since i had the SBC backup to usb set.

Node finished syncing, i tried recovering from seed which failed too.
I got Blitzed alright

feature: support Tor for `triggerforceclose`

I tried to use the triggerforceclose to force close a channel but I get this error error dialing peer: dial tcp: I checked on 1ML and Amboss and the peer is online. Can anyone explain what is happening please.

Sweep transaction doesn't appear in BIP32 HD root key transactions

Hi,

I used chantools to force close 3 channels, waited until there were enough confirmations, and then swept the funds using chantools to an address generated by my bitcoin node. That transaction has 214 confirmations when I check on the blockchain. However, when I use the BIP32 HD root key generated by chantools showrootkey in sparrow wallet with a public electrum node, it doesn't show that transaction. When I specifically look up the transaction using the ID in sparrow, it labels that bitcoin address as an external address instead of an address belonging to the wallet.

In my lightning node, I still see all 3 channels as "closing" even though the transactions to close the channels confirmed weeks ago. It shows the sweep transaction as having 0 confirmations even though it has 214 confirmations. It doesn't allow me to access those funds.

Here is the transaction: https://mempool.space/tx/8a8a45c3c1ebfc80863a6ad79dcda0fb6df252305f350a185a2d8bfa2663cd6a

I should also note that my lightning node says:
"synced_to_chain": false,
"synced_to_graph": false,
I don't know why. I'm using umbrel and it is updated to the latest version. I want to shut down the node anyway, so I'm ok with just transferring the funds to another wallet using sparrow, but the transaction doesn't appear there.

Please help! Maybe I can do a sweep transaction to an external address not owned by the bitcoin node? Very confusing.

Force close with pending HLTC

Hello, I need a little help I recently had to close a lightning channel while an HLTC was active here is the tx that was created, the time lock has expired as we can see on the capture, it is even negative and yet the HLTC funds are still not recoverable, idea to get me out of this situation?

Thank you in advance for the help.

image

update,I just saw that the HLTC have a longer unlocking time.

"pending_htlcs": [
                {
                    "incoming": false,
                    "amount": "500032",
                    "maturity_height": 800406,
                    "blocks_til_maturity": 308,
                    "stage": 1
                }
            ],

Permanently stranded channel?

This one's more a question on whether the following channel can be recovered. I feel ok posting all the details below because I believe it's already all public info anyway.

I've gotten as far as generating the force_close report and am attempting the sweeptimelock step now. I believe the following funds are still stuck because my output is still unspent but the sweeptimelock step fails on it. The channel was first created with one of the v0.5.x versions of lnd (LEGACY?). It first got stranded when my channel partner force-closed the channel after a database corruption on my end from a power failure a while back.

I noticed that the "sweep_privkey" value is empty and am wondering if the funds in this channel are no longer recoverable (something with how channels were created/closed from that lnd version maybe?)

Is it possible to search through the relevant derivation path from my mnemonic for the address it might be at, or was that address generated in some other way when the force-close was done by the channel partner?

 {
   "remote_pubkey": "03a8355790b89f4d96963019eb9413b9a2c884691837ac976bacfe25a5212892d7",
   "channel_point": "99b838681a988269214bfd532982e290873f2746081d41a33ca322278044d579:1",
   "funding_txid": "99b838681a988269214bfd532982e290873f2746081d41a33ca322278044d579",
   "funding_tx_index": 1,
   "capacity": 840000,
   "initiator": true,
   "local_balance": 415780,
   "remote_balance": 420000,
   "chan_exists_onchain": true,
   "has_potential_funds": true,
   "closing_tx": {
    "txid": "ec3bd65141d82a2c024037c0b14619348a85925ad1b75c5f544de3eceb7f7ef8",
    "force_close": true,
    "all_outputs_spent": false,
    "our_addr": "bc1qmyylq9f2k04eyj6tufweaqm3y9neqz0qclqy2w",
    "sweep_privkey": "",
    "conf_height": 646806
   },
   "force_close": null
  }

chantools rescuefunding fails UTXO match

I have a channel funding transaction that is locked but no channel was created because of a disk failure part way through channel creation. So I don't have much to work with. I am trying to contact the other party in case they are able to force close the pending channel.

I have also tried running rescuefunding in case I need to try this method. However, the command fails with the message "funding output script does not match UTXO"

I have supplied confirmedchannelpoint, remotepubkey and rootkey as this is all I know. Am I missing something?

Wait for timelocks - how do I know what is the highest?

On step 9:

9. Wait for timelocks: The previous command closed the remaining open channels by publishing your node's state of the channel.
By design of the Lightning Network, you now have to wait until the channel funds belonging to you are not time locked any longer. 
Depending on the size of the channel, you have to wait for somewhere between 144 and 2000 confirmations of the force-close 
transactions. Only continue with the next step after the channel with the highest csv_timeout has reached that many confirmations of its closing transaction.

I need to wait for the channel with the longest csv_timeout, but how can I know what it is? Is there a way to add it to the output of step 8?
Thanks

chantools genimportscript help

Hi,
I’m a fool and didn’t back up my lightning channel. I have restored my node with a 24 words seed, I had 1 channel but it was forced closed while I was offline. Any chance of funds recovery from the LN?
I was recommended to try chantools genimportscript. Could I get some guidance on this please?
I'm using linux with Umbrel, not on Pi.

Closed hash 0add2fa8c76a6ff90c42489867a6f51edbaafbf13975f373851380bb2b1e4c59

dropchannelgraph no-op?

I tried chantools-darwin-amd64-v0.8.4/chantools dropchannelgraph --channeldb channel.db following an issue on lnd that lead to increase the db by 5Gb in a day (lightningnetwork/lnd#5297)

the output is this, but the file is unchanged:

2021-05-15 08:19:43.881 [INF] CHAN: chantools version v0.8.4 commit 
2021-05-15 08:19:43.988 [INF] CHDB: Checking for schema update: latest_version=20, db_version=20

error compacting DB: bucket already exists

This is the log before the error:

2021-09-18 16:05:02.493 [INF] CHAN: chantools version v0.9.3 commit
2021-09-18 16:05:04.981 [WRN] CHAN: Could not read bucket 'byte' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:04.981 [WRN] CHAN: Could not read bucket 'channelOpeningState' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:04.982 [WRN] CHAN: Could not read bucket 'circuit-adds' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:04.982 [WRN] CHAN: Could not read bucket 'circuit-fwd-log' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:04.982 [WRN] CHAN: Could not read bucket 'circuit-keystones' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:04.982 [WRN] CHAN: Could not read bucket 'closed-chan-bucket' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:04.982 [WRN] CHAN: Could not read bucket 'confirm-hints' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:06.128 [WRN] CHAN: Could not read bucket 'alias' (full path '[graph-edge edge-index]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:06.128 [WRN] CHAN: Could not read bucket 'graph-node-update-index' (full path '[graph-edge edge-index]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.132 [WRN] CHAN: Could not read bucket 'fwd-packages' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.132 [WRN] CHAN: Could not read bucket 'graph-edge' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.132 [WRN] CHAN: Could not read bucket 'graph-meta' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.132 [WRN] CHAN: Could not read bucket 'graph-node' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.132 [WRN] CHAN: Could not read bucket 'invoices' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.844 [WRN] CHAN: Could not read bucket 'alias' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:12.845 [WRN] CHAN: Could not read bucket 'graph-node-update-index' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.223 [WRN] CHAN: Could not read bucket 'alias' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.223 [WRN] CHAN: Could not read bucket 'graph-node-update-index' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.934 [WRN] CHAN: Could not read bucket 'byte' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.935 [WRN] CHAN: Could not read bucket 'channelOpeningState' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.935 [WRN] CHAN: Could not read bucket 'circuit-adds' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.935 [WRN] CHAN: Could not read bucket 'circuit-fwd-log' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.935 [WRN] CHAN: Could not read bucket 'circuit-keystones' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.935 [WRN] CHAN: Could not read bucket 'closed-chan-bucket' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
2021-09-18 16:05:18.935 [WRN] CHAN: Could not read bucket 'confirm-hints' (full path '[graph-edge]') database is likely corrupted. Continuing anyway but skipping corrupt bucket.
Error: error compacting DB: bucket already exists

I created a channel but the funding transaction took too long to confirm and I RBF'd

Hello,

I opened a channel to an eclair Node but the funding transaction took too long to
confirm and I RBF'd* it but now this lnd channel is stuck. How do I find
the funding private/public key pair that my lnd wallet created for the
original funding tx, and use it to create a partially signed
transaction that spends the replaced funding transaction ?

I did Step1) [https://github.com/guggero/chantools/blob/master/doc/chantools_rescuefunding.md]

but the answer from my op. node was:

"I had a look at chantools and I don't think it will help you, it seems
to be designed to help people with corrupted channels db, but that's
not your case."

"...To recover your funds you * must * find that private key/public key
pair that your lnd wallet generated..."

*I RBFd it with electrum - imported seed with with the following guide:

https://openoms.gitbook.io/lightning-node-management/restorelndonchainfundsinelectrum

showroot returns error

I wanted to use showroot and entered my azeed. For one node it returned

error reading root key: failed to decrypt seed with passphrase: invalid passphrase

I entered no passphrase and pressed only enter. The seed was 148 characters long.

Fix MinHTLC/MaxHTLC calculation in dropchannelgraph

The min/max HTLC settings on the freshly inserted edge policies after dropping the graph seem to be incorrect.

[lncli] rpc error: code = Unknown desc = generated invalid channel update sig: max_htlc(20000000000 mSAT) for channel update greater than capacity(1000000000 mSAT)

ChannelAuthProof for own channels is missing after running dropchannelgraph

I used dropchannelgraph with the intention to fix missing channel information that was introduced due to running with routing.assumechanvalid=true when I started using my node for the first time.

The command was successful and my node started synching the graph to a state that had all channel information like I wanted to. So that's awesome.

I did however notice that all my channels were missing when I ran lncli getnodeinfo <my_pubkey> --include_channels. The channels were present when I ran lncli listchannels or when I ran getnodeinfo with my peer's pubkey however.

At this point I asked for help on the LND slack and guggero responded. The issue has to do with the ChannelAuthProof not existing for my own channels. Causing LND to interpret my channels as unannounced and not listing them.

Normally, the ChannelAuthProof is created before the channel is publicly announced and without it the channel cannot be announced because the "proof" is needed by other nodes to verify that the channel is legitimate.

Luckily for me the proof is remembered by my peers that I share the channel with so they can do the broadcasting of the channel. But the situation is not ideal for sure.

So in part this github issue is to document the behavior of dropchannelgraph and also write a bit about ChannelAuthProof since google did not provide any information about it.

The other reason is to make a feature request to dropchannelgraph that will create the proof after adding the nodes edges. Like you (guggero) already said on slack it is a bit tricky since you need to pass the seed to sign the proofs.

High-performance vanity gen

I was attempting to run chantools vanitygen on an AWS m5.24xlarge using this command:
chantools vanitygen --prefix 0212345678 --threads 255
and I only got about a 5x speed improvement over a quad-core laptop.

Any ideas?

This instance should have 96 cores. So was hoping for like a 10-15x improvement.

Produced import file for bitcoin code w/ taproot wont work with Bitcoin Core

I was recovering LND, and generated an import file for BitcoinCore.
All was well, file was imported, however i noticed that BitcoinCore didnt see funds on a taproot address.

import line looked like this:

PRIV KEY HERE 2023-04-01T00:00:01Z label=m/86'/0'/0'/1/52/ # addr=LEGACY ADR,WRAPPED,BECH32,BECH32TAPROOT

Attempting to import only this one line produces following in bitcoin log:

2023-04-20T22:46:48Z [lnd] Importing LEGACE ADDRESS HERE...
2023-04-20T22:46:48Z [lnd] Already have key with pubkey  PUBKEY HEX HERE
2023-04-20T22:46:48Z [lnd] RescanFromTime: Rescanning last 2918 blocks

not sure where the issue is. maybe some additional steps needed for bitcoincore to recognize taproot funds?
bitcoin version 24.0.1
chantools - latest binaries from the release page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.