1

I am trying to export internal transactions from Ethereum network via geth tracers. For that, I think call_tracer would be a suitable candidate. However, I am having trouble interpreting its output and would appreciate some help.

For instance, in block 50117 there is a transaction 0x1072369c82...4617 which has 1 internal transaction. call_tracer returns this:

{
    'from': '0x834e9b529ac9fa63b39a06f8d8c9b0d6791fa5df',
    'gas': '0x2be92',
    'gasUsed': '0x10912',
    'input': '0x',
    'output': '0x',
    'time': '2.843415ms',
    'to': '0x109c4f2ccc82c4d77bde15f306707320294aea3f',
    'type': 'CALL',
    'value': '0xde0b6b3a7640000',
    'calls': [
        {
            'from': '0x109c4f2ccc82c4d77bde15f306707320294aea3f',
            'input': '0x',
            'to': '0x881b0a4e9c55d08e31d8d3c022144d75a454211c',
            'type': 'CALL',
            'value': '0xde0b6b3a7640000'
        }
    ]
}

However in a block 700000 there is transaction 0x1a0e7e095...6d3e. According to Etherscan, it has no internal transactions, but it does have 4 events. call_tracer tells this about it:

{
    'from': '0xbb96fed30742eadedb9f0578876c8871edc7bfe8',
    'gas': '0x33738',
    'gasUsed': '0x22af2',
    'input': '0x3ed48679000000000000000000000000f6869286c14193f97292d7e3aa9c086deaba7c4b000000000000000000000000000000000000000000000000000000005671377e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000e8b61ccea39114f2d589272d5ad24ebabcf34df8000000000000000000000000000000000000000000000000000000000a7d8c00000000000000000000000000000000000000000000000000000000000000000660d15e1338e132128dfcdf95bf90d16218e113f970b3f44545bf2a2ee8a491264a8218e2fec5a37375530cebdf2eff9a3575b6aae57c5af7f48de98f45c6e934ca4fb9f6130e9ea2ead7edfb8774f6a8158cef03a706772ac470da0fdf2a698d77fb9ed1df3be4cdecc2235831394370f19fc1b2ee88779fe7910397ee2fa54fdb07137559c37c3e4ad47ed53be9023d1e60f06306e3438ca993d3a72d7f2e7f6333c56fceb646f95e9285e021aea5c7f4c7a2c4c023225289b373cba8fd39f40000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001b',
    'output': '0x0000000000000000000000000000000000000000000000000000000000000001',
    'time': '73.293893ms',
    'to': '0x7de5aba7de728950c92c57d08e20d4077161f12f',
    'type': 'CALL',
    'value': '0x1',
    'calls': [
        {
            'from': '0x7de5aba7de728950c92c57d08e20d4077161f12f',
            'gas': '0x256db',
            'gasUsed': '0x1abbe',
            'input': '0xbeabacc8000000000000000000000000f6869286c14193f97292d7e3aa9c086deaba7c4b000000000000000000000000e8b61ccea39114f2d589272d5ad24ebabcf34df8000000000000000000000000000000000000000000000000000000000a7d8c00',
            'output': '0x0000000000000000000000000000000000000000000000000000000000000001',
            'to': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
            'type': 'CALL',
            'value': '0x0',
            'calls': [
                {
                    'from': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
                    'gas': '0x1eefc',
                    'gasUsed': '0x1df',
                    'input': '0xf8b2cb4f000000000000000000000000f6869286c14193f97292d7e3aa9c086deaba7c4b',
                    'output': '0x000000000000000000000000000000000000000000000000000000006164dc58',
                    'to': '0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3',
                    'type': 'CALL',
                    'value': '0x0'
                },
                {
                    'from': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
                    'gas': '0x1ebaa',
                    'gasUsed': '0x3a53',
                    'input': '0x07bc6fad000000000000000000000000f6869286c14193f97292d7e3aa9c086deaba7c4b000000000000000000000000000000000000000000000000000000000a7d8c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
                    'output': '0x0000000000000000000000000000000000000000000000000000000000000001',
                    'to': '0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3',
                    'type': 'CALL',
                    'value': '0x0',
                    'calls': [
                        {
                            'from': '0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3',
                            'input': '0x',
                            'to': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
                            'type': 'CALL',
                            'value': '0xa7d8c00'
                        }
                    ]
                },
                {
                    'from': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
                    'gas': '0x1aee9',
                    'gasUsed': '0x1f7c',
                    'input': '0xec2ac54e000000000000000000000000e8b61ccea39114f2d589272d5ad24ebabcf34df8000000000000000000000000000000000000000000000000000000000a7d8c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
                    'output': '0x0000000000000000000000000000000000000000000000000000000000000001',
                    'to': '0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3',
                    'type': 'CALL',
                    'value': '0x0'
                },
                {
                    'from': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
                    'gas': '0x1856e',
                    'gasUsed': '0x1f7c',
                    'input': '0xec2ac54e00000000000000000000000048175da4c20313bcb6b62d74937d3ff985885701000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
                    'output': '0x0000000000000000000000000000000000000000000000000000000000000001',
                    'to': '0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3',
                    'type': 'CALL',
                    'value': '0x0'
                },
                {
                    'from': '0x1158c3c9a70e85d8358972810ed984c8e6ffcf0f',
                    'gas': '0x14cf4',
                    'gasUsed': '0x1df',
                    'input': '0xf8b2cb4f000000000000000000000000f6869286c14193f97292d7e3aa9c086deaba7c4b',
                    'output': '0x0000000000000000000000000000000000000000000000000000000056e75058',
                    'to': '0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3',
                    'type': 'CALL',
                    'value': '0x0'
                }
            ]
        }
    ]
}

Note that number of calls is larger than 4 and that they are nested.

Is there some way I can distinguish internal transactions from any other call (event,...)? That is, I am interested in all ways that ETH value is transferred between addresses, and nothing else. Can this be done?

EDIT: as @Ismael pointed out, Etherscan results for block 700000 are probably invalid - both Geth and Parity return no events for this block and their traces both return multiple internal calls.

However it seems that either Geth's or Parity's handling of value is invalid somehow. Parity's CALLs all have value 0, while one of Geth's CALLs has a value of 0xa7d8c00 (this can be see both in above output and in a call to debug_traceTranscation). Does anyone know where the discrepancy comes from?

  • 1
    Have you considered it may be a bug in etherscan? Geth vm trace fails and parity trace show several calls. – Ismael Feb 22 '18 at 20:46
  • Thanks, didn't think of that! My geth (v1.8.0) returned the results, but there is still mismatch in values between Parity and Geth (or, more likely, I am interpreting the results incorrectly). I have updated the question, if you have any idea, I would appreciate it... – johndodo Feb 26 '18 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.