{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2855","repository_url":"https://api.github.com/repos/ethereum/go-ethereum","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2855/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2855/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2855/events","html_url":"https://github.com/ethereum/go-ethereum/pull/2855","id":167065161,"number":2855,"title":"eth/downloader: fix the stall checks/drops during sync","user":{"login":"karalabe","id":129561,"avatar_url":"https://avatars.githubusercontent.com/u/129561?v=3","gravatar_id":"","url":"https://api.github.com/users/karalabe","html_url":"https://github.com/karalabe","followers_url":"https://api.github.com/users/karalabe/followers","following_url":"https://api.github.com/users/karalabe/following{/other_user}","gists_url":"https://api.github.com/users/karalabe/gists{/gist_id}","starred_url":"https://api.github.com/users/karalabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karalabe/subscriptions","organizations_url":"https://api.github.com/users/karalabe/orgs","repos_url":"https://api.github.com/users/karalabe/repos","events_url":"https://api.github.com/users/karalabe/events{/privacy}","received_events_url":"https://api.github.com/users/karalabe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/review","name":"review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-22T15:02:00Z","updated_at":"2016-07-25T10:08:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ethereum/go-ethereum/pulls/2855","html_url":"https://github.com/ethereum/go-ethereum/pull/2855","diff_url":"https://github.com/ethereum/go-ethereum/pull/2855.diff","patch_url":"https://github.com/ethereum/go-ethereum/pull/2855.patch"},"body":"This is a fix for an interesting corner case regression introduced by the EDGE release. Our code before the EDGE release tried to estimate the capacity of a peer and fetch data proportional to it. If the retrieval timed out, it assumed we were a bit over zealous with te request and reduced the peer capacity to zero (i.e. 1 data item per request). If this also timed out afterwards, the peer was deemed useless beyond retention (during sync, which needs performance) and dropped it.\r\n\r\nThe EDGE release introduced a fancier throughput and latency measurement algo, which among other constantly tries to request just a bit more than the capacity. This way it can correctly separate the latency from the bandwidth. This means however, that it will **never** request just one data item, rather always a minimum of two. Our stall checker code however only assumed 1 to be stalling. So EDGE effectively disabled the stall drop.\r\n\r\nThe big problem with this is that if I connect to two very bad peers, which time out always, then instead of dropping them off eventually, we switch between one or the other, trying to request the same 2 data items will infinity. We'll never break out of this loop as long as they are there, blocking up sync."},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/234913792","html_url":"https://github.com/ethereum/go-ethereum/pull/2855#issuecomment-234913792","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/2855","id":234913792,"user":{"login":"fjl","id":6915,"avatar_url":"https://avatars.githubusercontent.com/u/6915?v=3","gravatar_id":"","url":"https://api.github.com/users/fjl","html_url":"https://github.com/fjl","followers_url":"https://api.github.com/users/fjl/followers","following_url":"https://api.github.com/users/fjl/following{/other_user}","gists_url":"https://api.github.com/users/fjl/gists{/gist_id}","starred_url":"https://api.github.com/users/fjl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjl/subscriptions","organizations_url":"https://api.github.com/users/fjl/orgs","repos_url":"https://api.github.com/users/fjl/repos","events_url":"https://api.github.com/users/fjl/events{/privacy}","received_events_url":"https://api.github.com/users/fjl/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T10:08:06Z","updated_at":"2016-07-25T10:08:06Z","body":":+1: "}}
{"actor":{"display_login":"fjl"}}