eth_getBlockByHash doesn't provide correct block hash. #679
Replies: 4 comments
-
hi @scalalang2 |
Beta Was this translation helpful? Give feedback.
-
Hi @scalalang2
This is tricky to fix, also we are planning to add more info in header.ExtraData (Parant Commited Seals). With different ExtraData our block hash would always be different from the one go-ethereum client gets. I would like to understand:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your efforts and invetigation :) I wanted to make some communication channel between the offchain server and the blockchain. At this time, Only I think all features of the ethclient should be eventually available or a polygon specific client is required |
Beta Was this translation helpful? Give feedback.
-
Hey, @scalalang2 As I said the core issue is that Polygon Edge is calculating block hash differently than the go-ethereum, to be exact we are not using Nonce and MixHash when computing block hashes, as well as the fact that nothing except Validators should be in extraData. You can check the code of how we are computing hash here (https://github.com/0xPolygon/polygon-edge/blob/develop/consensus/ibft/header_hash.go#L11) Currently, we don't have the capacity to contribute on go-ethereum/ethclient, or to create a fork that modifies how they are calculating block hash to match Polygon Edge. I am moving this issue to a discussion. In the future, we will consider adding our own client or contributing to go-ethereum/ethclient. 😃 |
Beta Was this translation helpful? Give feedback.
-
eth_getBlockByHash doesn't provide correct block hash.
Description
Hi,
I've been stuck in trouble for integration with polygon edge.
I made a jsonrpc call
eth_getBlockByHash
with go-ethereum client code.Then it gives me an incorrect block hash.
Your environment
Steps to reproduce
Please execute following test code.
This calls official polygon edge network and try to retreive block information.
Then it gives me an incorect
block hash
.The result of this code looks as below
It does not seem to be a json rpc protocol problem,
It seems that the block schema of polygon edge do not fit into ethereum one.
Beta Was this translation helpful? Give feedback.
All reactions