Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: add check to geth traces for missing output #150

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

charlielewisme
Copy link
Collaborator

@charlielewisme charlielewisme commented Mar 19, 2023

Check for errors where node response is missing output fields. Use similar retry mechanism to existing check for responses with null result.

The issue we encountered is probably related to: maticnetwork/bor#763

Also:

  • update the test_export_geth_traces.py mock test data
  • use expected Polygon values to make test more realistic
  • required to prevent the new check raising errors

The basis for the check is the bad data I found in the geth_traces_00.json of a failed run. This source file is now overwritten, but here's the line I cut from it, a single block (which I've then formatted for readability):
bad_geth_trace.txt

I've inferred (from export_geth_traces_job.py) that the bad response would have been:
bad_response_full.txt

{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "params": [
    "0x2698501",
    {
      "tracer": "callTracer",
      "timeout": "120s"
      
    }
  ],
  "id": 40469761
}
{
  "jsonrpc": "2.0",
  "id": 40469761,
  "result": [
    {
      ...
    }
​
    ...
    
    {
      "result": {
        "type": "CREATE",
        "from": "0x6443fdb921b5e97e56ce68f17e136173e34022c9",
        "to": "0xc041db08566c3051ae0d7acb2fc9b929ddce155c",
        "value": "0x0",
        "gas": "0x8d709",
        "gasUsed": "0x6cd1c",
        "input": "0x60806040526040516 ... ... 000",
        "calls": [
          ...
        ]
      }
    },
​
    ...
​
    {
      ...
    }
  ]
}

I noted that traces with returned error field do also not have output, hence why I excluded these, see this genuine RPC response for block_with_error

@charlielewisme charlielewisme force-pushed the hotfix/add-check-geth-traces-missing-output branch from 4062a7b to 76af4b8 Compare March 19, 2023 11:25
@charlielewisme charlielewisme marked this pull request as draft March 19, 2023 12:26
@charlielewisme charlielewisme force-pushed the hotfix/add-check-geth-traces-missing-output branch from 76af4b8 to 2be00c8 Compare March 19, 2023 17:36
@charlielewisme charlielewisme marked this pull request as ready for review March 21, 2023 10:30
@charlielewisme charlielewisme merged commit a5801dc into main Mar 21, 2023
@charlielewisme charlielewisme deleted the hotfix/add-check-geth-traces-missing-output branch March 21, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants