Parity-ethereum: Traces missing for OOG calls to builtin contracts

Created on 9 Jan 2019  ·  8Comments  ·  Source: openethereum/parity-ethereum

_Before filing a new issue, please provide the following information._

  • Parity Ethereum version: 2.2.5 vs 2.0.9
  • Operating system: Linux
  • Installation: one-line installer
  • Fully synchronized: yes
  • Network: ethereum

_Your issue description goes here below. Try to include actual vs. expected behavior and steps to reproduce the issue._

Issue

Missing several traces in newer versions of parity the first block where this happens is 660372, there are more than a million traces missing in the whole blockchain. The first 1000 transactions where this is happening can be found here: https://pastebin.com/ZEH31jw6

This is one of the trace that we are missing

| transaction_hash | transaction_index | from_address | to_address | value | input | output | trace_type | call_type | reward_type | gas | gas_used | subtraces | trace_address | error | status | block_timestamp | block_number | block_hash |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0x7d7b963d5a2297dc068e64861e9372804f56b520e52c8cdc9478e1d8d4c4c653 |4 |0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec | 0x0000000000000000000000000000000000000004 |0 |0x |null |call |call |null |3 |null |0 |0,0,0,0,0,1 |Out of gas | 0 |2017-11-27 |18:16:30 UTC |4633109 |0x8a377dea6ccc0580eae386eb937334e2a5efe7f2d430b959f297f9c9d8ddbaee |

How to replicate the findings

The result can be replicated using both curl or otther libraries, here attaching results from python library web3.py

Result from old parity versions (parity -v = 2.0.9)

>>> from web3.auto import w3
>>> w3.parity.traceReplayTransaction('0xda83ddaed3bf211c09fad796c6ea842a479e322dadb838582a8e6db611d844e0')
AttributeDict({'output': '0x0000000000000000000000000000000000000000000000000000000000000001', 'stateDiff': None, 'trace': [AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xbe9c2ec66cd1b9a3b65a33a4501bccc50261aee5', 'gas': '0x19caa', 'input': '0xa9059cbb000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be400', 'to': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x18c45', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 1, 'traceAddress': [], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'gas': '0x18a01', 'input': '0x1962df71000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee50000000000000000000000000000000000000000000000000000000000000000', 'to': '0xf4a87ec93a1d26cc82b14aa8874291e7d52d04e7', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x17f56', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 1, 'traceAddress': [0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xf4a87ec93a1d26cc82b14aa8874291e7d52d04e7', 'gas': '0x179a6', 'input': '0x14cba002000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee50000000000000000000000000000000000000000000000000000000000000000', 'to': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x1746a', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 1, 'traceAddress': [0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'gas': '0x166ea', 'input': '0x161ff662000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be4004d524b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee50000000000000000000000000000000000000000000000000000000000000000', 'to': '0x331d077518216c07c87f4f18ba64cd384c411f84', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x166ea', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 2, 'traceAddress': [0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x331d077518216c07c87f4f18ba64cd384c411f84', 'gas': '0x3673', 'input': '0x515c1457000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b010414d524b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000', 'to': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x1fa6', 'output': '0x'}), 'subtraces': 1, 'traceAddress': [0, 0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'delegatecall', 'from': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'gas': '0x2d8a', 'input': '0x515c1457000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b010414d524b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000', 'to': '0x4e8703a59fec01a97d4d2d76271e4f086dbb52fc', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x173c', 'output': '0x'}), 'subtraces': 2, 'traceAddress': [0, 0, 0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'gas': '0x2729', 'input': '0x488725a0000000000000000000000000331d077518216c07c87f4f18ba64cd384c411f84', 'to': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x22f', 'output': '0x0000000000000000000000000000000000000000000000000000000000000002'}), 'subtraces': 0, 'traceAddress': [0, 0, 0, 0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'gas': '0x3', 'input': '0x', 'to': '0x0000000000000000000000000000000000000004', 'value': '0x0'}), 'error': 'Out of gas', 'subtraces': 0, 'traceAddress': [0, 0, 0, 0, 0, 1], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x331d077518216c07c87f4f18ba64cd384c411f84', 'gas': '0xa1b', 'input': '0x23de6651000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be400', 'to': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x984', 'output': '0x'}), 'subtraces': 0, 'traceAddress': [0, 0, 0, 1], 'type': 'call'})], 'vmTrace': None})

This returns the trace with out of gas error

AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'gas': '0x3', 'input': '0x', 'to': '0x0000000000000000000000000000000000000004', 'value': '0x0'}), 'error': 'Out of gas', 'subtraces': 0, 'traceAddress': [0, 0, 0, 0, 0, 1], 'type': 'call'}),

Result from newer versions of parity (parity -v = 2.2.5)

>>> from web3.auto import w3
>>> w3.parity.traceReplayTransaction('0xda83ddaed3bf211c09fad796c6ea842a479e322dadb838582a8e6db611d844e0')
AttributeDict({'output': '0x0000000000000000000000000000000000000000000000000000000000000001', 'stateDiff': None, 'trace': [AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xbe9c2ec66cd1b9a3b65a33a4501bccc50261aee5', 'gas': '0x19caa', 'input': '0xa9059cbb000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be400', 'to': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x18c45', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 1, 'traceAddress': [], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'gas': '0x18a01', 'input': '0x1962df71000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee50000000000000000000000000000000000000000000000000000000000000000', 'to': '0xf4a87ec93a1d26cc82b14aa8874291e7d52d04e7', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x17f56', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 1, 'traceAddress': [0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xf4a87ec93a1d26cc82b14aa8874291e7d52d04e7', 'gas': '0x179a6', 'input': '0x14cba002000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee50000000000000000000000000000000000000000000000000000000000000000', 'to': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x1746a', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 1, 'traceAddress': [0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'gas': '0x166ea', 'input': '0x161ff662000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be4004d524b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee50000000000000000000000000000000000000000000000000000000000000000', 'to': '0x331d077518216c07c87f4f18ba64cd384c411f84', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x166ea', 'output': '0x0000000000000000000000000000000000000000000000000000000000000001'}), 'subtraces': 2, 'traceAddress': [0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x331d077518216c07c87f4f18ba64cd384c411f84', 'gas': '0x3673', 'input': '0x515c1457000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b010414d524b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000', 'to': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x1fa6', 'output': '0x'}), 'subtraces': 1, 'traceAddress': [0, 0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'delegatecall', 'from': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'gas': '0x2d8a', 'input': '0x515c1457000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b010414d524b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000', 'to': '0x4e8703a59fec01a97d4d2d76271e4f086dbb52fc', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x173c', 'output': '0x'}), 'subtraces': 1, 'traceAddress': [0, 0, 0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'gas': '0x2729', 'input': '0x488725a0000000000000000000000000331d077518216c07c87f4f18ba64cd384c411f84', 'to': '0x60bf91ac87fee5a78c28f7b67701fbcfa79c18ec', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x22f', 'output': '0x0000000000000000000000000000000000000000000000000000000000000002'}), 'subtraces': 0, 'traceAddress': [0, 0, 0, 0, 0, 0], 'type': 'call'}), AttributeDict({'action': AttributeDict({'callType': 'call', 'from': '0x331d077518216c07c87f4f18ba64cd384c411f84', 'gas': '0xa1b', 'input': '0x23de6651000000000000000000000000be9c2ec66cd1b9a3b65a33a4501bccc50261aee5000000000000000000000000e79e495012950629bb2d0ffd4c20d2a1c1b0104100000000000000000000000000000000000000000000000000000002540be400', 'to': '0xf453b5b9d4e0b5c62ffb256bb2378cc2bc8e8a89', 'value': '0x0'}), 'result': AttributeDict({'gasUsed': '0x984', 'output': '0x'}), 'subtraces': 0, 'traceAddress': [0, 0, 0, 1], 'type': 'call'})], 'vmTrace': None})

This does not return the out of gas error

Expected behaviour:

Consistency of traces between parity versions.

F2-bug 🐞 M4-core ⛓ P5-sometimesoon 🌲

All 8 comments

Same issue as #10146?

@gsalzer looks like it.

Even though your issue was first, do you mind if I close that as a duplicate so we can focus conversation on the issue on this ticket? @ankitchiplunkar has given pretty comprehensive information on what's going on that should help solve this.

Fine with me.

possibly related: #8956

I checked the traces that are missing in the current versions of parity (or are superfluous in the older versions) for the first million blocks as well as for the recent blocks 7020000-7279999. In each case it is a call to one of the builtin contracts (I only found calls to the addresses 1 and 4) that fails with "out of gas". Maybe this helps ...

That helps alot, thanks. Rules out an entire class of issues that we had thought were already fixed

would like to add that v2.1.10 still seemed to be ok regarding these traces. updated to v2.2.7 after which exhibits the same issue as reported

This issue is still present in version 2.7.2-stable.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barakman picture barakman  ·  3Comments

jacogr picture jacogr  ·  4Comments

danfinlay picture danfinlay  ·  3Comments

m-thomson picture m-thomson  ·  3Comments

retotrinkler picture retotrinkler  ·  3Comments