Thursday, 1 April 2021

Immediately losing peers when using bchwallet in SPV mode

I'm trying to use bchwallet (https://github.com/gcash/bchwallet) in SPV mode, as described in this article: https://medium.com/@bchd.cash/announcing-neutrino-wallet-for-bitcoin-cash-eb7a85a49c0e

I can see that the wallet is finding a bunch of peers and trying to download block headers from those peers. However, it appears that each peer gets immediately dropped once the wallet starts trying to download block headers. Once all the discovered peers are dropped, the wallet simply stalls.

I tried manually adding a specific peer by using the --addpeer option to add bchd.fountainhead.cash. When I did this, rather than stalling, I could see that the wallet kept trying to reconnect to that one peer, but the peer was immediately lost each time.

Has anyone gotten bchwallet to work in SPV mode? Any chance of some pointers on what I'm doing wrong?

Command I run:

./bchwallet -u blahblahuser -P blahblahpassword --usespv --rpclisten=0.0.0.0:8332 --noinitialload --addpeer=bchd.fountainhead.cash

Sample output:

2021-04-01 09:08:37.174 [WRN] BCHW: open /home/nick/.bchwallet/bchwallet.conf: no such file or directory

2021-04-01 09:08:37.175 [INF] BCHW: Version 0.8.2

2021-04-01 09:08:37.185 [INF] RPCS: Listening on 0.0.0.0:8332

2021-04-01 09:08:37.190 [INF] BCHN: Loaded 23 addresses from file '/home/blah/.bchwallet/mainnet/peers.json'

2021-04-01 09:08:37.190 [INF] BCHN: Registering block subscription: id=1

2021-04-01 09:08:37.190 [INF] BCHN: Broadcaster now active

... lots of random peers found and lost, followed by looping over just the bchd.fountainhead.cash peer (136.243.250.139):

2021-04-01 09:08:43.067 [INF] BCHN: New valid peer 51.195.7.112:8333 (outbound) (/bchd:0.17.1(EB32.0)/)

2021-04-01 09:08:43.067 [INF] BCHN: Syncing to block height 681191 from peer 51.195.7.112:8333

2021-04-01 09:08:43.067 [INF] BCHN: Downloading headers for blocks 1 to 11111 from peer 51.195.7.112:8333

2021-04-01 09:08:43.415 [INF] BCHN: Lost peer 51.195.7.112:8333 (outbound)

2021-04-01 09:08:43.415 [WRN] BCHN: No sync peer candidates available

2021-04-01 09:08:43.909 [INF] BCHN: New valid peer 136.243.250.139:8333 (outbound) (/bchd:0.17.1(EB32.0)/)

2021-04-01 09:08:43.909 [INF] BCHN: Syncing to block height 681191 from peer 136.243.250.139:8333

2021-04-01 09:08:43.909 [INF] BCHN: Downloading headers for blocks 1 to 11111 from peer 136.243.250.139:8333

2021-04-01 09:08:44.242 [INF] BCHN: Lost peer 136.243.250.139:8333 (outbound)

2021-04-01 09:08:44.242 [WRN] BCHN: No sync peer candidates available

2021-04-01 09:08:49.932 [INF] BCHN: New valid peer 136.243.250.139:8333 (outbound) (/bchd:0.17.1(EB32.0)/)

2021-04-01 09:08:49.932 [INF] BCHN: Syncing to block height 681191 from peer 136.243.250.139:8333

2021-04-01 09:08:49.932 [INF] BCHN: Downloading headers for blocks 1 to 11111 from peer 136.243.250.139:8333

2021-04-01 09:08:50.272 [INF] BCHN: Lost peer 136.243.250.139:8333 (outbound)

2021-04-01 09:08:50.272 [WRN] BCHN: No sync peer candidates available

2021-04-01 09:08:55.963 [INF] BCHN: New valid peer 136.243.250.139:8333 (outbound) (/bchd:0.17.1(EB32.0)/)

2021-04-01 09:08:55.964 [INF] BCHN: Syncing to block height 681191 from peer 136.243.250.139:8333

2021-04-01 09:08:55.964 [INF] BCHN: Downloading headers for blocks 1 to 11111 from peer 136.243.250.139:8333

2021-04-01 09:08:56.317 [INF] BCHN: Lost peer 136.243.250.139:8333 (outbound)

2021-04-01 09:08:56.318 [WRN] BCHN: No sync peer candidates available

submitted by /u/fatalglory
[link] [comments]

source https://www.reddit.com/r/btc/comments/mhjnjc/immediately_losing_peers_when_using_bchwallet_in/

No comments:

Post a Comment