{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1178","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1178/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1178/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1178/events","html_url":"https://github.com/ethereum/go-ethereum/issues/1178","id":84615137,"number":1178,"title":"eth/downloader: sometimes the sync keeps fetching blocks like crazy","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"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":8,"created_at":"2015-06-03T15:13:39Z","updated_at":"2015-06-04T11:30:33Z","closed_at":null,"body":"*This is a note to myself.*\r\n\r\nSometimes the downloader keeps fetching blocks from a peer, for some reason seems not able to insert them and fetches again, again, again:\r\n\r\n```\r\nI0603 17:24:10.845401   14848 peer.go:109] [eb2aac31c8d58c3d] fetching 95 blocks\r\nI0603 17:24:10.962171   14848 peer.go:109] [eb2aac31c8d58c3d] fetching 95 blocks\r\n...\r\nI0603 17:24:12.512880   14848 peer.go:109] [eb2aac31c8d58c3d] fetching 95 blocks\r\n```\r\n\r\nDuring this time, the exact number of blocks it's refetching is missing from the cache (max 1024):\r\n\r\n```\r\n> admin.progress()\r\n{\r\n  pending: 79176,\r\n  cached: 929\r\n}\r\n```\r\n\r\nI don't really know yet what the cause might be, but it seems as if the blocks we're fetching are not the next ones in line into the cache, hence are discarded. But why retry then? And why not try other peers for it?\r\n\r\nThe problem usually sorts itself out when importing pulls a next batch of blocks, probably that's why we haven't noticed it yet. Should look into this in detail."},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/108849269","html_url":"https://github.com/ethereum/go-ethereum/issues/1178#issuecomment-108849269","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1178","id":108849269,"user":{"login":"Ulysseus","id":10251137,"avatar_url":"https://avatars.githubusercontent.com/u/10251137?v=3","gravatar_id":"","url":"https://api.github.com/users/Ulysseus","html_url":"https://github.com/Ulysseus","followers_url":"https://api.github.com/users/Ulysseus/followers","following_url":"https://api.github.com/users/Ulysseus/following{/other_user}","gists_url":"https://api.github.com/users/Ulysseus/gists{/gist_id}","starred_url":"https://api.github.com/users/Ulysseus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ulysseus/subscriptions","organizations_url":"https://api.github.com/users/Ulysseus/orgs","repos_url":"https://api.github.com/users/Ulysseus/repos","events_url":"https://api.github.com/users/Ulysseus/events{/privacy}","received_events_url":"https://api.github.com/users/Ulysseus/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T11:30:33Z","updated_at":"2015-06-04T11:30:33Z","body":"But I seem to receive the same block over and over, the data use is extreme, network is fast enough, but the data usage seems out of wack, lets assume a block is 20K then on a 12s block time thats 100Kb per minute 600Kb per hour, I am getting 130Mb per hour, I tried --maxpeers \"4\" but it just halved the data rate to 60Mb/hr. Looking at the logs it imports block 528132 repeatedly, thats why I posted it, I get the impression thats its imported the same info, instead of doing it just once 130Mb/day is okay but 130Mb/hr is just way to expensive down here. I have chewed through 60 Gb in the last 10 days. "}}