Parity-ethereum: trace_filter does not return failed contract creation

Created on 29 Oct 2018  Â·  21Comments  Â·  Source: openethereum/parity-ethereum

  • Parity Ethereum version: Parity-Ethereum/v2.0.8-stable-ef8f95e-20181015/x86_64-linux-gnu/rustc1.29.0
  • Operating system: Linux
  • Installation: Docker
  • Fully synchronized: yes
  • Network: ethereum
  • Restarted: yes

debug_trace API for block 2,878,467 is missing the trace for transaction https://etherscan.io/tx/0xb8965886e04cdbf18132a722f5a556a378b9dbcab5d1fc4050e54eadc12fafbd. Is it an expected behaviour? If yes, what's the rationale for skipping such traces?

Below is the JSON API request and response for the block.

> curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock": "0x2BEC03", "toBlock": "0x2BEC03"}],"id":1}'

{
    "jsonrpc": "2.0",
    "result": [
        {
            "action": {
                "callType": "call",
                "from": "0xcaa216e03ee4932941ef0729f250e297fd5655ad",
                "gas": "0xb9d8",
                "input": "0xe637a44b000000000000000000000000000000000000000000000000000529f0a21a905f00000000000000000000000000000000000000000000000000050498d760af01",
                "to": "0xfdc77b9cb732eb8c896b152e28294521f5f62e67",
                "value": "0x0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x5f74",
                "output": "0x"
            },
            "subtraces": 1,
            "traceAddress": [],
            "transactionHash": "0x03c0d74b32caac835805eb8eb4b174685fd72379c981369672dfee925aa720d9",
            "transactionPosition": 0,
            "type": "call"
        },
        {
            "action": {
                "callType": "callcode",
                "from": "0xfdc77b9cb732eb8c896b152e28294521f5f62e67",
                "gas": "0xae05",
                "input": "0x5035db4a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000caa216e03ee4932941ef0729f250e297fd5655ad",
                "to": "0xfdc77b9cb732eb8c896b152e28294521f5f62e67",
                "value": "0x0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x255",
                "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
            },
            "subtraces": 0,
            "traceAddress": [
                0
            ],
            "transactionHash": "0x03c0d74b32caac835805eb8eb4b174685fd72379c981369672dfee925aa720d9",
            "transactionPosition": 0,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x91337a300e0361bddb2e377dd4e88ccb7796663d",
                "gas": "0x10d88",
                "input": "0x",
                "to": "0x8f6e97be83af27a8ceb0b795ec6c86962c2135f6",
                "value": "0x164a5305742c38000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x5151ddfa2cc70ddcdfb84c44dd61ed1a49c185f68e0f7ad2c15bfc4b32aff755",
            "transactionPosition": 1,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0xc68c06c5ee03b0d5b3b6e830b9c471571eeb8923",
                "gas": "0x10d38",
                "input": "0x0000000000000000000000000000000000000000",
                "to": "0xf90c9ac616ecfefb3860aaa5bc33caf9bc606441",
                "value": "0x380afb26cf85000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x58e048c45856325f5ae171458b1f7a80db4b80e626407d265078c9a8960e88e3",
            "transactionPosition": 2,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x11af339e6b44a1e36ebdfaa08cce5a4f16df5b0f",
                "gas": "0x10d88",
                "input": "0x",
                "to": "0xdfad8c8a6172d33b95038ec5bb067239b71f70d0",
                "value": "0x1bc09ddb5ad7f100"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x84c232c5111aaee45a0eb374d224e102bc05149dde75f29e32b428ce96c5ddbf",
            "transactionPosition": 3,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x4bb96091ee9d802ed039c4d1a5f6216f90f81b01",
                "gas": "0x4650",
                "input": "0x",
                "to": "0x82d6ab6c1d6532640d1a2cef44a7c43a66bf748c",
                "value": "0x44b1eec6162f0000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x895a19c1058b20f07756aab6c9660ab669588ae19bd8c5843d201369b067b1ab",
            "transactionPosition": 4,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x6000a0d1503631443e7833de6ed46f91d7787219",
                "gas": "0x10d88",
                "input": "0x",
                "to": "0xaf139302bc27c1ca18320d3fce01b90a74dc879b",
                "value": "0x4563918244f40000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0xecdb5c9f49351eee67347bef9d451fa7f793d575dc7bb769665acb01c5962f34",
            "transactionPosition": 6,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x1e9939daaad6924ad004c2560e90804164900341",
                "gas": "0x4650",
                "input": "0x",
                "to": "0xa1af766e540b28dc551fd02d372549d55b087251",
                "value": "0x45cd921d348be3d0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x799",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0xf52aa5d07bafcb704ba0804d2989f317c5698a0cd70064baf65ed440d06d6006",
            "transactionPosition": 7,
            "type": "call"
        },
        {
            "action": {
                "author": "0x1a060b0604883a99809eb3f798df71bef6c358f1",
                "rewardType": "block",
                "value": "0x4563918244f40000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": null,
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": null,
            "transactionPosition": null,
            "type": "reward"
        }
    ],
    "id": 83
}
F3-annoyance 💩 M4-core ⛓

All 21 comments

Is the trace also missing in trace_block for that block?

I'm sure that the trace exists (etherscan has it, for example https://etherscan.io/vmtrace?txhash=0xb8965886e04cdbf18132a722f5a556a378b9dbcab5d1fc4050e54eadc12fafbd&type=parity#raw), this might be an issue regarding how trace_filter works as opposed to trace_block.

Indeed, in trace_block this trace exists:

> curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"trace_block","params":["0x2BEC03"],"id":1}'
{
    "jsonrpc": "2.0",
    "result": [
        {
            "action": {
                "callType": "call",
                "from": "0xcaa216e03ee4932941ef0729f250e297fd5655ad",
                "gas": "0xb9d8",
                "input": "0xe637a44b000000000000000000000000000000000000000000000000000529f0a21a905f00000000000000000000000000000000000000000000000000050498d760af01",
                "to": "0xfdc77b9cb732eb8c896b152e28294521f5f62e67",
                "value": "0x0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x5f74",
                "output": "0x"
            },
            "subtraces": 1,
            "traceAddress": [],
            "transactionHash": "0x03c0d74b32caac835805eb8eb4b174685fd72379c981369672dfee925aa720d9",
            "transactionPosition": 0,
            "type": "call"
        },
        {
            "action": {
                "callType": "callcode",
                "from": "0xfdc77b9cb732eb8c896b152e28294521f5f62e67",
                "gas": "0xae05",
                "input": "0x5035db4a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000caa216e03ee4932941ef0729f250e297fd5655ad",
                "to": "0xfdc77b9cb732eb8c896b152e28294521f5f62e67",
                "value": "0x0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x255",
                "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
            },
            "subtraces": 0,
            "traceAddress": [
                0
            ],
            "transactionHash": "0x03c0d74b32caac835805eb8eb4b174685fd72379c981369672dfee925aa720d9",
            "transactionPosition": 0,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x91337a300e0361bddb2e377dd4e88ccb7796663d",
                "gas": "0x10d88",
                "input": "0x",
                "to": "0x8f6e97be83af27a8ceb0b795ec6c86962c2135f6",
                "value": "0x164a5305742c38000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x5151ddfa2cc70ddcdfb84c44dd61ed1a49c185f68e0f7ad2c15bfc4b32aff755",
            "transactionPosition": 1,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0xc68c06c5ee03b0d5b3b6e830b9c471571eeb8923",
                "gas": "0x10d38",
                "input": "0x0000000000000000000000000000000000000000",
                "to": "0xf90c9ac616ecfefb3860aaa5bc33caf9bc606441",
                "value": "0x380afb26cf85000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x58e048c45856325f5ae171458b1f7a80db4b80e626407d265078c9a8960e88e3",
            "transactionPosition": 2,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x11af339e6b44a1e36ebdfaa08cce5a4f16df5b0f",
                "gas": "0x10d88",
                "input": "0x",
                "to": "0xdfad8c8a6172d33b95038ec5bb067239b71f70d0",
                "value": "0x1bc09ddb5ad7f100"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x84c232c5111aaee45a0eb374d224e102bc05149dde75f29e32b428ce96c5ddbf",
            "transactionPosition": 3,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x4bb96091ee9d802ed039c4d1a5f6216f90f81b01",
                "gas": "0x4650",
                "input": "0x",
                "to": "0x82d6ab6c1d6532640d1a2cef44a7c43a66bf748c",
                "value": "0x44b1eec6162f0000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x895a19c1058b20f07756aab6c9660ab669588ae19bd8c5843d201369b067b1ab",
            "transactionPosition": 4,
            "type": "call"
        },
        {
            "action": {
                "from": "0x2a125b9db31e1257a887b674ab586c96c11e4cb7",
                "gas": "0x8af8",
                "init": "0xe20151d500000000000000000000000000000000000000000000000000000000000004570000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043232323200000000000000000000000000000000000000000000000000000000",
                "value": "0x0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "error": "Bad instruction",
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0xb8965886e04cdbf18132a722f5a556a378b9dbcab5d1fc4050e54eadc12fafbd",
            "transactionPosition": 5,
            "type": "create"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x6000a0d1503631443e7833de6ed46f91d7787219",
                "gas": "0x10d88",
                "input": "0x",
                "to": "0xaf139302bc27c1ca18320d3fce01b90a74dc879b",
                "value": "0x4563918244f40000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0xecdb5c9f49351eee67347bef9d451fa7f793d575dc7bb769665acb01c5962f34",
            "transactionPosition": 6,
            "type": "call"
        },
        {
            "action": {
                "callType": "call",
                "from": "0x1e9939daaad6924ad004c2560e90804164900341",
                "gas": "0x4650",
                "input": "0x",
                "to": "0xa1af766e540b28dc551fd02d372549d55b087251",
                "value": "0x45cd921d348be3d0"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": {
                "gasUsed": "0x799",
                "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0xf52aa5d07bafcb704ba0804d2989f317c5698a0cd70064baf65ed440d06d6006",
            "transactionPosition": 7,
            "type": "call"
        },
        {
            "action": {
                "author": "0x1a060b0604883a99809eb3f798df71bef6c358f1",
                "rewardType": "block",
                "value": "0x4563918244f40000"
            },
            "blockHash": "0x667bcaac622ef255cd664fd6afc69fb86bea698de72770ea86bd71fed691a761",
            "blockNumber": 2878467,
            "result": null,
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": null,
            "transactionPosition": null,
            "type": "reward"
        }
    ],
    "id": 83
}

Seems the issue is here: https://github.com/paritytech/parity-ethereum/blob/9982eba1889cfc20e7a614da5e809b1dd4d8a729/ethcore/src/trace/types/filter.rs#L109

For some reason we return false in matches for such contracts. I'd say it should be equal to to_adress.matches_all()

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to it as part of the Ethereum Foundation fund.__

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Workers have applied to start work__.

These users each claimed they can complete the work by 3 weeks, 2 days from now.
Please review their action plans below:

1) aashutoshrathi has applied to start work _(Funders only: approve worker | reject worker)_.

Check for the function where failed contract creation is handled, probably problem is with this as mentioned in the comment above.

Learn more on the Gitcoin Issue Details page.

@aashutoshrathi Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Hey @aashutoshrathi you're good to go on this, let us know if you have any questions!

Is this bounty still open ? I'd love to help with it. @ceresstation

@xiaods yes it's open, feel free to take it ;)

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work has been started__.

These users each claimed they can complete the work by 2 months, 3 weeks ago.
Please review their action plans below:

1) xiaods has been approved to start work.

i currently maintain parity node and familiar with the parity apis. i can have a try to resolve it. thanks a lot.

Learn more on the Gitcoin Issue Details page.

@Tbaut cloud you approve my work request?

@medvedev1088 cloud you approve my work request?

I think @ceresstation can approve it.

@ceresstation hi, cloud you please approve it?

@xiaods Sorry for the delay, just approved you :)

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work for 60.0 DAI (60.0 USD @ $1.0/DAI) has been submitted by__:

  1. @xiaods

@ceresstation please take a look at the submitted work:

  • PR by @xiaods

@ceresstation when review done, it will merge asap.

Superseded by #10140, it already mark as good. it will merge asap.

@medvedev1088 you can check it.

@ceresstation cloud you please check gitcoin task status? it already done.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__The funding of 60.0 DAI (60.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @xiaods.__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dukei picture dukei  Â·  3Comments

BillSantos picture BillSantos  Â·  3Comments

tzapu picture tzapu  Â·  3Comments

bryaan picture bryaan  Â·  3Comments

0x7CFE picture 0x7CFE  Â·  3Comments