parameter #2 'verbosity' must be type int (got bool)
2020-03-31 10:34:58.048 [INF] BTCW: Version 0.11.0-alpha 2020-03-31 10:34:58.066 [INF] RPCS: Listening on 127.0.0.1:18332 2020-03-31 10:34:58.066 [INF] BTCW: Attempting RPC client connection to localhost:18334 2020-03-31 10:34:58.160 [INF] CHNS: Established connection to RPC server localhost:18334 2020-03-31 10:34:59.167 [INF] WLLT: Opened wallet 2020-03-31 16:21:17.579 [INF] RPCS: New websocket client 127.0.0.1:60448 2020-03-31 16:21:17.586 [WRN] RPCS: Websocket receive failed from client 127.0.0.1:60448: websocket: close 1006 unexpected EOF 2020-03-31 16:21:17.587 [INF] RPCS: Disconnected websocket client 127.0.0.1:60448 2020-03-31 17:15:44.171 [INF] WLLT: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250 2020-03-31 17:15:44.194 [INF] WLLT: Seed birthday surpassed, starting recovery of wallet from height=1691396 hash=0000000000001605ddfb355e9d0bc8ff9b069f72eb1d31603693cc366f3c75ef with recovery-window=250 2020-03-31 17:15:44.688 [INF] WLLT: Scanning 1394 blocks for recoverable addresses 2020-03-31 17:15:45.255 [INF] CHNS: Fetching block height=1691802 hash=0000000000000e28379f03272a1367f8be7d9b574babf4a7123865fd39019643 panic: Unable to synchronize wallet to chain: unable to perform wallet recovery: -32602: parameter #2 'verbosity' must be type int (got bool)
goroutine 15 [running]: github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc0000da000) /home/ec2-user/go/src/github.com/btcsuite/btcwallet/wallet/chainntfns.go:117 +0x13b1 created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC /home/ec2-user/go/src/github.com/btcsuite/btcwallet/wallet/wallet.go:191 +0x1aa
What chain backend are you using? And what version?
master, testnet
No, I mean what software is running at localhost:18334, what version? Is it btcd version newer than v0.20.1-beta?
both btcd and btcwallet are the latest master with the --testnet flag
$ btcwallet --testnet
2020-04-02 11:02:16.550 [INF] BTCW: Version 0.11.0-alpha
2020-04-02 11:02:16.658 [INF] BTCW: Attempting RPC client connection to localhost:18334
2020-04-02 11:02:16.721 [INF] RPCS: Listening on 127.0.0.1:18332
2020-04-02 11:02:17.038 [INF] CHNS: Established connection to RPC server localhost:18334
2020-04-02 11:02:23.291 [INF] WLLT: Opened wallet
2020-04-02 11:02:24.293 [INF] WLLT: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250
2020-04-02 11:02:24.319 [INF] WLLT: Seed birthday surpassed, starting recovery of wallet from height=1692678 hash=0000000000000de8d56ba3bde8c59ca0f4fd0507a3a6f3e70f07e1b7442573ef with recovery-window=250
2020-04-02 11:02:26.007 [INF] WLLT: Scanning 931 blocks for recoverable addresses
2020-04-02 11:02:28.174 [INF] CHNS: Fetching block height=1692754 hash=0000000000000e4f66d3eb5bb06b5d437dafc4dfab4815269736f86d4285def4
panic: Unable to synchronize wallet to chain: unable to perform wallet recovery: -32602: parameter #2 'verbosity' must be type int (got bool)
goroutine 34 [running]:
github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc0000b8000)
/home/ec2-user/go/src/github.com/btcsuite/btcwallet/wallet/chainntfns.go:117 +0x13b1
created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC
/home/ec2-user/go/src/github.com/btcsuite/btcwallet/wallet/wallet.go:191 +0x1aa
Yes, that's the problem. The current btcwallet master is not compatible with btcd master, only btcd v0.20.1-beta.
Similar issue:
Unable to synchronize wallet to chain: unable to perform wallet recovery: json: cannot unmarshal object into Go value of type string
Only with testnet. With mainnet all is fine.
2020-06-12 18:36:13.649 [TRC] CHNS: Sending command [getcfilter] with id 3979
2020-06-12 18:36:13.649 [TRC] CHNS: Received response for id 3979 (result "05947595976ff1b99e02c133eaa6")
2020-06-12 18:36:13.649 [TRC] CHNS: Sending command [getcfilter] with id 3980
2020-06-12 18:36:13.649 [TRC] CHNS: Received response for id 3980 (result "057a33716171d733c28880f863cf80")
2020-06-12 18:36:13.649 [TRC] CHNS: Sending command [getcfilter] with id 3981
2020-06-12 18:36:13.649 [TRC] CHNS: Received response for id 3981 (result "0cd43675c6899c13ff16b64d73d0246661364c34be1812f3d0f658ca9fcafebd00")
2020-06-12 18:36:13.649 [INF] CHNS: Fetching block height=1768841 hash=00000000000004b119687c476be725f96224bac9668b22bdc81daf7de00256f6
2020-06-12 18:36:13.649 [TRC] CHNS: Sending command [getblock] with id 3982
2020-06-12 18:36:13.649 [TRC] CHNS: Received response for id 3982 (result {"hash":"00000000000004b119687c476be725f96224bac9668b22bdc81daf7de00256f6","confirmations":1227,"strippedsize":1542,"size":1687,"weight":6313,"height":1768841,"version":541065216,"versionHex":"20400000","merkleroot":"2ffed4050e291c5c0e8eb0d59d4be3a4203c58a9fd9cbe388d2fcee2e49f795d","tx":["482ab70968c9d2355f728d3077477ae0b86504440dc8f60fbc4b73c9715dd167","2d2985ab5c9c4f3a77c0491cef1f695077a863362f187765c1cc8057b82bd24c","abdacc750bf01dd930474d39557aa73c7a79ab55d143fc19122aef8144504db9","79fdc034a3c358035e3d6d25fea3c47b04ebe4aa03dbe375d3051b6371bc385d","f5cde766476cb2c98cd2fdf34ecfa7ecee8cf30aa20b4939c141fccc814da952","82bbd3d14c8354a86ab6b3ae292e6b3cd4546b7a28785f82161e8f4d18863828"],"time":1591865823,"nonce":3914991555,"bits":"1a0ffff0","difficulty":1048576,"previousblockhash":"0000000000000e545b39fa04f6f264caf7c80bb35e09c8a1f823203897b80f93","nextblockhash":"0000000000000b9dba308fbf40d1c984422ae4a1b7dff8febd42713bc4256d66"})
panic: Unable to synchronize wallet to chain: unable to perform wallet recovery: json: cannot unmarshal object into Go value of type string
goroutine 60 [running]:
github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc000138000)
/home/debian/work/src/github.com/btcsuite/btcwallet/wallet/chainntfns.go:117 +0x13b1
created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC
/home/debian/work/src/github.com/btcsuite/btcwallet/wallet/wallet.go:200 +0x1aa
btcd version 0.20.1-beta btcwallet version 0.11.0-alpha
What btcwallet version will be work with testnet ?
This should be addressed with the current master branches of btcd and btcwallet.
Yes, it's latest.
the trouble somwhere here
wallet.go
427:
if w.recoveryWindow > 0 {
if err := w.recovery(chainClient, birthdayStamp); err != nil {
return fmt.Errorf("unable to perform wallet recovery: "+
"%v", err)
}
}
After restarting without recovery mode, everything works fine in the next starts. I hope this helps someone.
So which version of btcwallet is actually working?
Try master.
master is not functional with btcd
The btcd dependency needs to be updated in the project to point to master. We don't see this in lnd because it's enforcing a higher version.
@wpaulino is it btcd/master + btcwallet/master + some hack in go.mod?
Yeah, the patch below should do it. If you can't apply it locally, you can run the following commands within the top level directory of btcwallet:
$ go mod edit -require=github.com/btcsuite/btcd@master
$ go mod tidy
diff --git a/go.mod b/go.mod
index b9d1b4d..475b615 100644
--- a/go.mod
+++ b/go.mod
@@ -1,9 +1,9 @@
module github.com/btcsuite/btcwallet
require (
- github.com/btcsuite/btcd v0.20.1-beta.0.20200513120220-b470eee47728
+ github.com/btcsuite/btcd v0.21.0-beta.0.20210209145433-dff2198fc543
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
- github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
+ github.com/btcsuite/btcutil v1.0.2
github.com/btcsuite/btcutil/psbt v1.0.3-0.20200826194809-5f93e33af2b0
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.0
github.com/btcsuite/btcwallet/wallet/txrules v1.0.0
@@ -17,8 +17,8 @@ require (
github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec // indirect
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf
github.com/lightninglabs/neutrino v0.11.0
- golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67
- golang.org/x/net v0.0.0-20190206173232-65e2d4e15006
+ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
+ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 // indirect
google.golang.org/grpc v1.18.0
)
diff --git a/go.sum b/go.sum
index 3625f4a..f1bc34e 100644
--- a/go.sum
+++ b/go.sum
@@ -5,12 +5,14 @@ github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3 h1:A/EVblehb75cUgXA5
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
-github.com/btcsuite/btcd v0.20.1-beta.0.20200513120220-b470eee47728 h1:kF1MN22IdIZ1I7VMgS5WuihFuYaWOoP69Btm4bLUBxY=
-github.com/btcsuite/btcd v0.20.1-beta.0.20200513120220-b470eee47728/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
+github.com/btcsuite/btcd v0.21.0-beta.0.20210209145433-dff2198fc543 h1:q4eZLEw7wmSoglNMp4W+8XO62AuSapXeOStAJXkn5qI=
+github.com/btcsuite/btcd v0.21.0-beta.0.20210209145433-dff2198fc543/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
+github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts=
+github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=
github.com/btcsuite/btcutil/psbt v1.0.3-0.20200826194809-5f93e33af2b0 h1:3Zumkyl6PWyHuVJ04me0xeD9CnPOhNgeGpapFbzy7O4=
github.com/btcsuite/btcutil/psbt v1.0.3-0.20200826194809-5f93e33af2b0/go.mod h1:LVveMu4VaNSkIRTZu2+ut0HDBRuYjqGocxDMNS1KuGQ=
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw=
@@ -30,6 +32,8 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8=
+github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
@@ -85,6 +89,10 @@ golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 h1:9lP3x0pW80sDI6t1UMSLA4
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw=
+golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -95,12 +103,16 @@ golang.org/x/net v0.0.0-20181106065722-10aee1819953 h1:LuZIitY8waaxUfNIdtajyE/Yz
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006 h1:bfLnR+k0tq5Lqt6dflRLcZiz6UaXCMt3vhYJ1l4FQ80=
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd h1:DBH9mDw0zluJT/R+nGuV3jWFWLFaHyYZWD4tOT+cjn0=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0=