hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.53k stars 850 forks source link

`trace_tansaction` and `trace_replaytransaction` show reverted from Besu Nodes #7885

Open jwelch-qn opened 3 weeks ago

jwelch-qn commented 3 weeks ago

Steps to Reproduce

curl '<BESU_NODE_URL>' --header 'Content-Type: application/json' --data-raw '{"method":"trace_transaction","params":["0x618493c58f08a590884207641fa83d0456168be6ef5e2e29dddc2c7d7f24e150"],"id":1,"jsonrpc":"2.0"}' |jq 

Expected behavior: [What you expect to happen] Erigon, Reth, and Nethermind all report this transaction as successful.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0xf65dbfcbe148c221c5e4156088ba0efff35ae678",
        "callType": "call",
        "gas": "0x2cbaa",
        "input": "0x6a761202000000000000000000000000f7de07215d8a0d44a0a91a7e797d7ef498f39de00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000002488676cad00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3b92d31862b439ce4e07fd952b3506c6138bca0350c7559657b8106de8803921f521db1800f5da8850a7f47a6aace5943f0ba92a4c520ddfa34d5611f634f02ec1ca5804f2e7380d4bd8e999fc376419704053de1db2117105a2baa5cbb0b21296057bca5a693a5613dc04cfebfbfcc16c291d103b4341786dae09eb3351f6d7d8220250136ed80f76e290e6c78a7e03ef6b2b2a85c86ff309ac2e10e9b4f7b991df403d3d6671458b4be448c0afa65d3b15b735df9f5ff8f15fb8f18a781012c8e7a1c0000000000000000000000000000000000000000000000000000000000",
        "to": "0x3aa851404191ccebd499a60a68e6059bc33bcb55",
        "value": "0x0"
      },
      "blockHash": "0xe59ebfd38430eb170d3c1e3b769dc6d159363c7a889625b007aa5e691aa7334a",
      "blockNumber": 21150407,
      "result": {
        "gasUsed": "0x2b5e2",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      "subtraces": 1,
      "traceAddress": [],
      "transactionHash": "0x618493c58f08a590884207641fa83d0456168be6ef5e2e29dddc2c7d7f24e150",
      "transactionPosition": 267,
      "type": "call"
    },
...

Actual behavior: [What actually happens]

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "callType": "call",
        "from": "0xf65dbfcbe148c221c5e4156088ba0efff35ae678",
        "gas": "0x2cbaa",
        "input": "0x6a761202000000000000000000000000f7de07215d8a0d44a0a91a7e797d7ef498f39de00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000002488676cad00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3b92d31862b439ce4e07fd952b3506c6138bca0350c7559657b8106de8803921f521db1800f5da8850a7f47a6aace5943f0ba92a4c520ddfa34d5611f634f02ec1ca5804f2e7380d4bd8e999fc376419704053de1db2117105a2baa5cbb0b21296057bca5a693a5613dc04cfebfbfcc16c291d103b4341786dae09eb3351f6d7d8220250136ed80f76e290e6c78a7e03ef6b2b2a85c86ff309ac2e10e9b4f7b991df403d3d6671458b4be448c0afa65d3b15b735df9f5ff8f15fb8f18a781012c8e7a1c0000000000000000000000000000000000000000000000000000000000",
        "to": "0x3aa851404191ccebd499a60a68e6059bc33bcb55",
        "value": "0x0"
      },
      "blockHash": "0xe59ebfd38430eb170d3c1e3b769dc6d159363c7a889625b007aa5e691aa7334a",
      "blockNumber": 21150407,
      "error": "Reverted",
      "revertReason": "0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000054753303133000000000000000000000000000000000000000000000000000000",
      "subtraces": 1,
      "traceAddress": [],
      "transactionHash": "0x618493c58f08a590884207641fa83d0456168be6ef5e2e29dddc2c7d7f24e150",
      "transactionPosition": 267,
      "type": "call"
    },

Frequency: [What percentage of the time does it occur?] 100% when calling Besu nodes, all others report successful transaction.

Logs

Please post relevant logs from Besu (and the consensus client, if running proof of stake) from before and after the issue.

Versions (Add all that apply)

macfarla commented 1 week ago

I think this is a similar issue to https://github.com/hyperledger/besu/issues/7804 by default, historical data is not stored.