Skip to content

already have block - causing bandwidth to be wasted - vicious circle? #1120

@rebroad

Description

@rebroad

It occurs to me that this happens as the node asks several other nodes for the same blocks when it does not see the block appear within a certain time. Due to the speed of the nodes providing blocks, they both respond with the blocks requested, but one will send the block first and usually stay ahead. This isn't a major issue, but it does mean that bandwidth is wasted, and since it's probably the bandwidth which is causing the problem in the first place, I expect this will continue to get worse due to being a vicious circle. My proposed solution probably requires a BIP, which would allow a node to request to another node to stop sending blocks (i.e. to the node sending the blocks which it already has). It could do this after one duplicate block, or perhaps after several.

Sample case:

04/17/12 22:08:49 askfor block 000000000000096fd80c 0
04/17/12 22:08:50 sending getdata: block 000000000000096fd80c
04/17/12 22:14:12 askfor block 000000000000096fd80c 1334700530000000
04/17/12 22:14:12 sending getdata: block 000000000000096fd80c
04/17/12 22:16:39 received block 000000000000096fd80c
04/17/12 22:16:40 SetBestChain: new best=000000000000096fd80c height=176035 work=29615794588444859740
04/17/12 22:20:07 received block 00000000000009856606
04/17/12 22:20:07 ERROR: ProcessBlock() : already have block 176020 00000000000009856606
04/17/12 22:20:56 received block 00000000000008862df7
04/17/12 22:20:56 ERROR: ProcessBlock() : already have block 176021 00000000000008862df7
04/17/12 22:21:36 received block 000000000000035a84ac
04/17/12 22:21:36 ERROR: ProcessBlock() : already have block 176022 000000000000035a84ac
04/17/12 22:21:59 received block 0000000000000a881c26
04/17/12 22:21:59 ERROR: ProcessBlock() : already have block 176023 0000000000000a881c26
04/17/12 22:22:18 received block 00000000000004ed81e6
04/17/12 22:22:18 ERROR: ProcessBlock() : already have block 176024 00000000000004ed81e6
04/17/12 22:22:52 received block 000000000000068bbe48
04/17/12 22:22:52 ERROR: ProcessBlock() : already have block 176025 000000000000068bbe48
04/17/12 22:23:12 received block 00000000000003425f71
04/17/12 22:23:12 ERROR: ProcessBlock() : already have block 176026 00000000000003425f71
04/17/12 22:23:39 received block 00000000000000f89962
04/17/12 22:23:39 ERROR: ProcessBlock() : already have block 176027 00000000000000f89962
04/17/12 22:23:48 received block 000000000000083ec278
04/17/12 22:23:48 ERROR: ProcessBlock() : already have block 176028 000000000000083ec278
04/17/12 22:24:06 received block 000000000000088984c6
04/17/12 22:24:06 ERROR: ProcessBlock() : already have block 176029 000000000000088984c6
04/17/12 22:24:29 received block 00000000000002857e8b
04/17/12 22:24:29 ERROR: ProcessBlock() : already have block 176030 00000000000002857e8b
04/17/12 22:24:45 received block 000000000000075834ed
04/17/12 22:24:45 ERROR: ProcessBlock() : already have block 176031 000000000000075834ed
04/17/12 22:25:10 received block 000000000000033b7b3e
04/17/12 22:25:10 ERROR: ProcessBlock() : already have block 176032 000000000000033b7b3e
04/17/12 22:25:56 received block 00000000000001f32a95
04/17/12 22:25:56 ERROR: ProcessBlock() : already have block 176033 00000000000001f32a95
04/17/12 22:26:20 received block 00000000000004dffd6d
04/17/12 22:26:20 ERROR: ProcessBlock() : already have block 176034 00000000000004dffd6d
04/17/12 22:26:20 received block 000000000000096fd80c
04/17/12 22:26:20 ERROR: ProcessBlock() : already have block 176035 000000000000096fd80c

Much of this output has been cut, but if I grep my debug.log for "already have", I can see that blocks 174591 to 176061 (1470 blocks and counting) were being sent by two nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions