eth_getBlockByNumber: error: got null header for uncle 0 of block

Hi,

Get the error like “got null header for uncle 0 of block 31a5349bbb0f6962d9580a8e05677e9b8c50f0f73822686c1dd126ee93e09fcc” quite often when call eth_getBlockByNumber. Anyone knows what it is? Does disappear after ~8 seconds when the query is retried.

Sounds like this is a case where it’s looking for an uncle that doesn’t exist. As long as it disappears, I’d say it’s nothing to worry about

Understood. Thank you for the answer!

Is there any recommended strategy for dealing with this? I sometimes get this error and im not sure how to handle it so that I can still process the block in question.

Hey @bonedaddy, this is a related thread on our community about avoiding issues with uncles. One way to mitigate this error is to use eth_getBlockByHash rather than eth_getBlockByNumber, if that’s a possibility. Hope this helps!

1 Like