mempoolco / spruned

A Bitcoin-without-Blockchain client w/ RPC that can fetch any block or transaction
MIT License
170 stars 35 forks source link

Not synced, retrying fallback headers #59

Closed Stadicus closed 6 years ago

Stadicus commented 6 years ago

I try to set up a sPRUNED node in a DigitalOceans droplet (Ubuntu 16.04.4 x64) and the installation went smoothly. Once I start the application, however, it does not seem to find the network.

$ ~/src/spruned/venv/bin/spruned --daemon --debug
$ tail ~/.spruned/bitcoin.testnet/bitcoin.testnet/spruned.log 
2018-07-14 20:30:33,094 - root - DEBUG - Running spruned daemon
2018-07-14 20:30:33,096 - root - WARNING - Starting daemon.
2018-07-14 20:30:33,097 - root - DEBUG - Arguments: Namespace(cache_size=50, daemonize=True, datadir='/home/bitcoin/.spruned/bitcoin.testnet', debug=True, keep_blocks=200, network=None, rpcbind='0.0.0.0', rpcpassword='..................', rpcport=18332, rpcuser='bitcoin')
2018-07-14 20:30:33,099 - leveldb - DEBUG - Ensuring integrity of the storage, and tracking missing items
2018-07-14 20:30:33,099 - leveldb - DEBUG - Ensuring no stales in blockchain repository
2018-07-14 20:30:33,104 - cache - DEBUG - Loaded index
2018-07-14 20:30:33,104 - cache - DEBUG - Empty index found
2018-07-14 20:30:33,105 - cache - INFO -
Purged from storage 0 elements not tracked by cache.
Total tracked: 0
Total protected: 0,
Total cached: 0,
Total entries: 0,
Total transactions: 0

2018-07-14 20:30:33,105 - leveldb - DEBUG - Checking cache limits
2018-07-14 20:30:33,106 - cache - DEBUG - Stales purge done, removed 0 items from index
2018-07-14 20:30:33,107 - cache - INFO - Cache is ok, size: 0, limit: 50
2018-07-14 20:30:33,107 - cache - DEBUG - Stales purge done, removed 0 items from index
2018-07-14 20:30:33,107 - cache - INFO - Cache is ok, size: 0, limit: 50
2018-07-14 20:30:33,134 - electrum - DEBUG - Checking internet connectivity
2018-07-14 20:30:33,305 - electrum - DEBUG - ConnectionPool: connect, needed: 1
2018-07-14 20:30:33,306 - electrum - DEBUG - Connecting to peers (1)
2018-07-14 20:30:33,307 - electrum - DEBUG - Created client instance: testnet.hsmiths.com
2018-07-14 20:30:33,308 - spruned.dependencies.connectrum - DEBUG - Connecting to: <ServerInfo testnet.hsmiths.com nick=bade5985a4fbd742 ports="['s', 't']" v=1.2 prune=0>
2018-07-14 20:30:33,493 - spruned.dependencies.connectrum - DEBUG - Transport connected ok
2018-07-14 20:30:33,833 - spruned.dependencies.connectrum - DEBUG - Connected to: <ServerInfo testnet.hsmiths.com nick=bade5985a4fbd742 ports="['s', 't']" v=1.2 prune=0>
2018-07-14 20:30:33,834 - electrum - DEBUG - Connected to testnet.hsmiths.com
2018-07-14 20:30:34,011 - spruned.dependencies.connectrum - INFO - Error response: '{'code': 2, 'message': "daemon error: {'code': -5, 'message': 'No such mempool or blockchain transaction. Use gettransaction for wallet transactions.'}"}'
2018-07-14 20:30:34,012 - electrum - DEBUG - Exception connecting to testnet.hsmiths.com ('blockhash')
2018-07-14 20:30:34,012 - electrum - DEBUG - Checking internet connectivity
2018-07-14 20:30:39,117 - spruned.dependencies.connectrum - DEBUG - Server version: ['ElectrumX 1.5.1', '1.2']
2018-07-14 20:30:39,120 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s
2018-07-14 20:31:09,131 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s
2018-07-14 20:31:39,139 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s
2018-07-14 20:32:09,150 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s
2018-07-14 20:32:39,151 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s
2018-07-14 20:32:39,297 - spruned.dependencies.connectrum - DEBUG - Server version: ['ElectrumX 1.5.1', '1.2']
2018-07-14 20:33:09,159 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s
2018-07-14 20:33:39,170 - electrum - DEBUG - Fallback headers check: Not synced yet or sync locked (False), retrying fallback headers check in 30s

I have a firewall set up, but only blocking incoming transactions. Outgoing, everything is open. Are there any network settings I need to configure. Or is it something completely different?

Thanks in advance for your support!

gdassori commented 6 years ago

Hello, testnet servers are unreliable, I always thought I should set up one or two. If you have notice of reliable testnet electrum servers you can add your own by making a PR.

Stadicus commented 6 years ago

Thanks for all your work and your quick feedback. I really might think about running an Electrum testserver (I already run a mainnet) if I have some hardware lying around.

I switched to mainnet for the moment and everything's working as expected.