6

I'm currently trying to detect blockchain forks and I noticed that even when dumping all blocks I get to a separate file I seem to miss a few.

Specifically I'm looking for the blocks marked as orphans in blockchain.info/orphaned-blocks in my dump and I'm missing quite a few.

Now I'm wondering whether nodes stop forwarding blocks that they believe to be orphans (because they currently have the concurring block as their blockchain head)? Shouldn't all concurring blocks be distributed?

2

Blockchain.info stores information in a database, it does not show only the information that is currently in it's Bitcoin. It is connected to many nodes, so it may see information your Bitcoin doesn't, and will store data after a normal Bitcoin client would discard it.

Bitcoin uses a basic rule "I'm going to use the first block I receive as the current best block". The duplicate numbered orphaned block was usually broadcast too late to everybody. If the "unpopular" later block is somehow the one that is next built upon, there will be many requests between clients for the correct blockchain up to the new block.

0

A block is only relayed when it is part of the (new) best chain. If a second block at the same height as current best tip is received, it is not considered the new best, and thus not relayed. The reason for this is simple: it doesn't help for achieving consensus (=getting the world to agree on which block at a given height is the one considered correct). Any peer receiving the second block at a given height would already have the first one as well (since that got relayed too), and wouldn't consider it valid either.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.