thetatoken/theta-protocol-ledger

bug with theta rpc interface

larryro opened this issue · 1 comments

We can get transaction 0x4a9c74bf71ac6a3591672d67e975887ef8374ba34b45342305e656666d9cdcf1 with GetBlockByHeight interace in block height 12695839.

image

But if query the 0x4a9c74bf71ac6a3591672d67e975887ef8374ba34b45342305e656666d9cdcf1 transaction with GetTransaction rpc interface, it will show it's in block height 12695859

image

Request

{
  ThetaRpc {
    GetBlockByHeight(height: 12695839) {
      transactions {
        hash
        type
      }
    }
    GetTransaction(
      hash: "0x4a9c74bf71ac6a3591672d67e975887ef8374ba34b45342305e656666d9cdcf1"
    ) {
      status
      type
      block_height
    }
  }
}

Response

{
  "data": {
    "ThetaRpc": {
      "GetBlockByHeight": {
        "transactions": [
          {
            "hash": "0x0dc1235fbdd893e512b12f7f026e9236321c1fa6152fe75cfb09a6dd701a5e2c",
            "type": "TxCoinbase"
          },
          {
            "hash": "0x4a9c74bf71ac6a3591672d67e975887ef8374ba34b45342305e656666d9cdcf1",
            "type": "TxSmartContract"
          }
        ]
      },
      "GetTransaction": {
        "status": "finalized",
        "type": "TxSmartContract",
        "block_height": "12695859"
      }
    }
  }
}

image

another block hash conflict in 14821985
0x82236267393c31c17bf4e79fb14f9fc0396c05821ebd357e6b420a43933d64db

image

image