This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 161
Mismatch Block Hash in RPC Response #721
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
System info:
In RPC
eth.getBlock
Response, the Block Hash is generated byheader.Hash()
which mismatch theheader.LastBlockID.Hash
.For example,
Block[N+1] Parent Hash
!=Block[N] Block Hash
due to theBlock[N].header.Hash() != Block[N+1]. header.LastBlockID.Hash
.Steps to reproduce:
Simply start the chain and observe the
parentHash
field of any Block Height > 1 and the previous Block in RPCeth.getBlock
Response.Some of the Block Hash may not equal the next Block's Parent Hash.
Expected behavior: Block[N] Hash = Block[N+1] Parent Hash
Actual behavior: Block[N] Hash != Block[N+1] Parent Hash
Additional info:
We may use back the BlockID information from the Tendermint
ResultBlock
Response to reproduce a correct Block Hash.A simple modification can reference to Fix Web3 Block Hash
The text was updated successfully, but these errors were encountered: