Skip to content

GraphQL returns transaction.status = 0 (failed) for successful pre-Byzantium transactions #24124

@amyodov

Description

@amyodov

System information

Geth version: 1.10.13
OS & Version: Linux

Expected behaviour

CLI, JSON-RPC:

> eth.getTransactionReceipt("0x8fda3564427d18f119aa2309306babc7cd137893bd32260e4c75b9f74d3eeff6").status
undefined
> eth.getTransactionReceipt("0x78d9eac1a59562696c3b33acf5e32d9e27bb774e307b3c4aa53f8e4626277081").status
"0x1"

GraphQL:

{
  old: transaction(hash: "0x8fda3564427d18f119aa2309306babc7cd137893bd32260e4c75b9f74d3eeff6") { status }
  new: transaction(hash: "0x78d9eac1a59562696c3b33acf5e32d9e27bb774e307b3c4aa53f8e4626277081") { status }
}

GraphQL result:

{
  "data": {
    "old": {
      "status": null
    },
    "new": {
      "status": 1
    }
  }
}

Actual behaviour

CLI, JSON-RPC:

> eth.getTransactionReceipt("0x8fda3564427d18f119aa2309306babc7cd137893bd32260e4c75b9f74d3eeff6").status
undefined
> eth.getTransactionReceipt("0x78d9eac1a59562696c3b33acf5e32d9e27bb774e307b3c4aa53f8e4626277081").status
"0x1"

GraphQL:

{
  old: transaction(hash: "0x8fda3564427d18f119aa2309306babc7cd137893bd32260e4c75b9f74d3eeff6") { status }
  new: transaction(hash: "0x78d9eac1a59562696c3b33acf5e32d9e27bb774e307b3c4aa53f8e4626277081") { status }
}

GraphQL result:

{
  "data": {
    "old": {
      "status": 0
    },
    "new": {
      "status": 1
    }
  }
}

Steps to reproduce the behaviour

Check the "status" field of the transactions via JSON-RPC/CLI, and via GraphQL.
I haven’t checked with many transactions but seems like the bug happens on block 4369999 and doesn’t happen in block 4370000, meaning it is a pre-Byzantium-specific problem.
In general I believe the GraphQL should return the very same data as the JSON-RPC interface; if it does smart detection "which transactions actually considered successful and which don’t" it could be great, too; but it definitely should not return 0/failed for transactions which are valid in any current interpretations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions