dashpay / electrum-dash-old

Electrum-DASH - a Dash thin client
https://electrum-dash.org
MIT License
37 stars 113 forks source link

10s blockchain request time out too small #18

Open guruvan opened 8 years ago

guruvan commented 8 years ago

With a slow network connection (under 100kbps) 10s isn't enough time to receive a full chunk

L580 elif time.time() - req_time > 60:

(thought my servers had suddenly failed, but was my own network connections)

guruvan commented 8 years ago

not sure what the better timeout is - 30s seems also too short here, have it to 60 on my local host and testing

guruvan commented 8 years ago

hrm - I can't get it to wait any longer with that - @Kefkius maybe you could take a look at this? It may not be much issue for most people, but I'm sure unable to get anything from this workstation/network today. Have tried all the servers, not just my own, and it's the same - times out without getting any data.

Kefkius commented 8 years ago

Each chunk should be 161280 (2016 headers * 80 bytes per header) bytes. So that should be 1290.24 kilobits per chunk. At under 100 kbps, there is indeed not enough time to receive a chunk in 10 seconds.

@guruvan What do you mean you can't get it to wait any longer? Are you modifying https://github.com/dashpay/electrum-dash/blob/master/lib/network.py#L583 and running electrum-dash locally?

guruvan commented 8 years ago

yes - that's what I've done, exactly. have also messed with the SERVER_RETRY_INTERVAL the longest I've seen the "blockchain request timeout" message take to appear is 37s, not sure if I did that or not. ;)

meanwhile - if you could have a quick test of the following servers: electrum.maza.club:50002:s 52.36.21.221:50001:t 52.37.252.153:50001:t

I'm attempting to install a remote desktop for testing as well.

Kefkius commented 8 years ago

@guruvan I can connect to all three of those.

SERVER_RETRY_INTERVAL is used as follows:

If we're not connected to any server and auto_connect is not enabled, and we have disconnected from default_server, then after SERVER_RETRY_INTERVAL we try to connect to default_server again.

You may want to try removing ~/.electrum-dash/blockchain_headers?

guruvan commented 8 years ago

Each time I test I remove the recent_servers, edit config to correct server, and remove blockchain_headers - should be a clean test. All I'm not doing is changing the wallet out.

The client definitely retries - it keeps retrying, in fact, which is how I've noticed it's not transient, or some startup issue. Simply, my network today is slowwww. But I'd think that electrum should work over a slow connection. (It will, but apparently it won't get a whole chunk, much less hundreds of 'em to get started up)

guruvan commented 8 years ago

also thanks for testing that :)