-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add a timeout for light client sync requests #7848
Conversation
It looks like @tomaka signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
The CI failure is in secret store and looks unrelated to my change. |
I tried two other full synchronizations over the week end, and unfortunately the second one has gotten stuck, meaning that the issue isn't entirely solved :-/ |
The network service already handles timeouts here: https://github.com/paritytech/parity/blob/master/ethcore/light/src/net/mod.rs#L88 although for groups of 256 headers I think it will end up timing out after a minute which is far too long. It should really be mapped onto something like a linear function something like |
Just tested, this does indeed resolve #6319 on first shot within 2 hours. |
* Add a timeout for light client sync requests * Adjusting timeout to number of headers
* update back-references more aggressively after answering from cache (#7578) * Add new EF ropstens nodes. (#7824) * Add new EF ropstens nodes. * Fix tests * Add a timeout for light client sync requests (#7848) * Add a timeout for light client sync requests * Adjusting timeout to number of headers * Flush keyfiles. Resolves #7632 (#7868) * Fix wallet import (#7873) * rpc: generate new account id for imported wallets * ethstore: handle duplicate wallet filenames * ethstore: simplify deduplication of wallet file names * ethstore: do not dedup wallet filenames on update * ethstore: fix minor grumbles * [WASM] mem_cmp added to the Wasm runtime (#7539) * mem_cmp added to the Wasm runtime * schedule.wasm.mem_copy to schedule.wasm.mem_cmp for mem_cmp * [Wasm] memcmp fix and test added (#7590) * [Wasm] memcmp fix and test added * [Wasm] use reqrep_test! macro for memcmp test * wasmi interpreter (#7796) * adjust storage update evm-style (#7812) * disable internal memory (#7842)
Fix #6319
This PR adds a 7 seconds timeout when we request a header range from a remote. If the timeout expires, the request will be re-assigned, most likely to a different node.
My machine is still syncing with this patch right now, but I've successfully synced more than 2 million blocks without dropping to 0 hdr/s at any point.
EDIT: Briefly dropped to 0 hdr/s around the 3 millionth block, but I think it's because my Internet connection briefly dropped. Sync resumed 10 seconds later.
EDIT2: Fully sync'ed from the beginning without any interruption except the one of my first edit.