gcash / bchwallet

A secure bitcoin cash wallet daemon written in Go (golang)
ISC License
43 stars 29 forks source link

Unable to connect in SPV mode #65

Closed musashidev closed 4 years ago

musashidev commented 4 years ago

Im trying to connect using the SPV mode in Ubuntu 20.04 with the wallet "bchwallet-linux_amd64.zip" published in https://github.com/gcash/bchwallet/releases

When I launch the wallet with ./bchwallet --usespv -u user -P 1234 -d=debug I get this error with all peers:

[DBG] BCHN: Received reject (cmd verack, code REJECT_MALFORMED, reason a verack message must follow version) from 136.243.250.139:8333 (outbound)

The files in the mainnet folder never update. I have tried removing all files and creating a new wallet but the problem persists.

Sample output:

2020-05-07 13:05:23.897 [INF] BCHW: Version 0.8.2 2020-05-07 13:05:23.908 [INF] RPCS: Listening on 127.0.0.1:8332 2020-05-07 13:05:23.909 [INF] BCHN: Loaded 20 addresses from file 2020-05-07 13:05:23.909 [DBG] BCHN: Starting block notifications subscription manager 2020-05-07 13:05:23.913 [DBG] BCHN: Waiting for peer connection... 2020-05-07 13:05:23.913 [INF] BCHN: Registering block subscription: id=1 2020-05-07 13:05:23.913 [DBG] BCHN: Delivering backlog of block notifications: id=1, start_height=0, end_height=0 2020-05-07 13:05:23.913 [INF] BCHN: Broadcaster now active 2020-05-07 13:05:24.012 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.052 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 3.85.109.130:8333 (outbound) 2020-05-07 13:05:24.056 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.064 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.070 [DBG] BCHN: Received version (agent /bchd:0.15.2(EB32.0)/, pver 70015, block 634070) from 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.070 [DBG] BCHN: Negotiated protocol version 70013 for peer 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.070 [DBG] BCHN: Added time sample of 0s (total: 1) 2020-05-07 13:05:24.070 [DBG] BCHN: Connected to 136.243.250.139:8333 2020-05-07 13:05:24.070 [INF] BCHN: New valid peer 136.243.250.139:8333 (outbound) (/bchd:0.15.2(EB32.0)/) 2020-05-07 13:05:24.070 [INF] BCHN: Syncing to block height 634070 from peer 136.243.250.139:8333 2020-05-07 13:05:24.070 [INF] BCHN: Downloading headers for blocks 1 to 11111 from peer 136.243.250.139:8333 2020-05-07 13:05:24.070 [DBG] BCHN: Sending getaddr to 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.070 [DBG] BCHN: Sending verack to 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.070 [DBG] BCHN: Received verack from 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.070 [DBG] BCHN: Sending getheaders (locator 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, stop 0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d) to 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.074 [DBG] BCHN: New peer 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.074 [DBG] BCHN: Peer connected, starting cfHandler. 2020-05-07 13:05:24.074 [INF] BCHN: Waiting for more block headers, then will start cfheaders sync from height 0... 2020-05-07 13:05:24.083 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 35.209.240.120:8333 (outbound) 2020-05-07 13:05:24.090 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 3.88.239.185:8333 (outbound) 2020-05-07 13:05:24.128 [DBG] BCHN: Received reject (cmd verack, code REJECT_MALFORMED, reason a verack message must follow version) from 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.128 [INF] BCHN: Lost peer 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.128 [WRN] BCHN: No sync peer candidates available 2020-05-07 13:05:24.128 [DBG] BCHN: Removed peer 136.243.250.139:8333 (outbound) 2020-05-07 13:05:24.145 [DBG] BCHN: Sending version (agent neutrino:0.0.4-beta/, pver 70013, block 0) to 76.102.192.81:8333 (outbound) 2020-05-07 13:05:24.160 [DBG] BCHN: Received version (agent /bchd:0.16.0(EB32.0)/, pver 70015, block 634070) from 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.160 [DBG] BCHN: Negotiated protocol version 70013 for peer 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.160 [DBG] BCHN: Added time sample of 0s (total: 2) 2020-05-07 13:05:24.160 [DBG] BCHN: Connected to 3.222.251.214:8333 2020-05-07 13:05:24.160 [DBG] BCHN: Received verack from 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.160 [INF] BCHN: New valid peer 3.222.251.214:8333 (outbound) (/bchd:0.16.0(EB32.0)/) 2020-05-07 13:05:24.160 [INF] BCHN: Syncing to block height 634070 from peer 3.222.251.214:8333 2020-05-07 13:05:24.160 [INF] BCHN: Downloading headers for blocks 1 to 11111 from peer 3.222.251.214:8333 2020-05-07 13:05:24.160 [DBG] BCHN: Sending getaddr to 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.160 [DBG] BCHN: Sending verack to 3.222.251.214:8333 (outbound) 2020-05-07 13:05:24.160 [DBG] BCHN: Sending getheaders (locator 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, stop 0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d) to 3.222.251.214:8333 (outbound)

musashidev commented 4 years ago

The problem is solved when building from source.