onflow / flow-evm-gateway

FlowEVM Gateway implements an Ethereum-equivalent JSON-RPC API for EVM clients to use
https://developers.flow.com/evm/about
Apache License 2.0
11 stars 9 forks source link

Broken Chain in JSON rpc nodes with Flow-Testnet #534

Open rayyan224 opened 3 weeks ago

rayyan224 commented 3 weeks ago

Problem

It appears that there are inconsistencies in the public JSON RPC nodes, where the parent hash of block N does not align with the parent hash of block N-1. This discrepancy creates a broken chain in the blockchain

Example

Broken Chain on Block 1
Block 0 Hash -> 0xa09863d709f761517109ed4318c98d646bda9101f421882fa487b13ee3597408
Block 1 Parent Hash -> 0x3cdc76671b5549cd2e025369b3f0ff0e37152ad33757b17376907d259274a8e5
Broken Chain on Block 1385491
Block 1385490 Hash ->0xfc9a0204b12bc4875ed880300d07f27de4f9857be67d13cf72f53b09e8942ced
Block 1385491 Parent Hash->0x0e742970c53cc2924d55830a588609ca1db460cce41850df7af119639fe42d91

Steps to Reproduce

  1. Curl a post command to the public nodes with this payload
  2. Update the "0x0" with the block number in hex
  3. Look at the hash and parent hash field. Make sure that block N and N-1 match {"method":"eth_getBlockByNumber","params":["0x0",false],"id":1,"jsonrpc":"2.0"}
m-Peter commented 2 weeks ago

Thanks for the report @rayyan224 , we'll get this fixed asap :pray: