I'm using the Geth Real-Time Event to get the new blocks via web-socket and there's a subscription called "newHeads" for that propose.

The thing is sometimes the socket returns a duplicate block with different content. Why?

I'm using "Simple Websocket Client" extension for the socket.

Look at the attached picture and check block number "0x9073d7"

enter image description here

This is a diff of the content of both blocks: https://www.diffchecker.com/2UUt8n6H

  • Did you resolve this?
    – David
    May 23, 2021 at 16:58
  • We suppose that it was a fork, but I can't answer your previous question. I suppose you need to wait for the following block to check which one has the same hash as the "parentHash". May 25, 2021 at 11:53

1 Answer 1


It was a fork that was later replaced by the main chain. Fork may be more than one block.

  • But how can we know at the time of receiving the block that it won't be contained in the canonical chain? Should we just wait for the next block number? Even if we would wait, how could we determine which one of the duplicates will eventually show up on bscscan?
    – David
    May 23, 2021 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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