Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Mismatch Block Hash in RPC Response #721

Closed
@ghost

Description

System info:

In RPC eth.getBlock Response, the Block Hash is generated by header.Hash() which mismatch the header.LastBlockID.Hash.

For example, Block[N+1] Parent Hash != Block[N] Block Hash due to the Block[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 RPC eth.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions