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

Schema for internal transactions #72

Closed

Conversation

AyushyaChitransh
Copy link

@AyushyaChitransh AyushyaChitransh commented Aug 4, 2018

Schema for internal transactions #53

Copy link
Member

@medvedev1088 medvedev1088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good!

"description": "The level of nesting of an internal transaction"
},
{
"name": "internal_tx_is_error",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this column have BOOLEAN type?

"description": "Gas used by the internal transaction"
},
{
"name": "internal_tx_trace_id",
Copy link
Member

@medvedev1088 medvedev1088 Aug 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The internal_tx_trace_id column can have MODE: REPEATED since it's an array. Then the export job will use json output format for which BigQuery supports REPEATED columns.

"description": "Gas used by the internal transaction"
},
{
"name": "internal_tx_trace_id",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call it internal_tx_trace_address for consistency with Parity https://wiki.parity.io/JSONRPC-trace-module#trace_block?

@medvedev1088
Copy link
Member

medvedev1088 commented Aug 4, 2018

I think we can also add internal_tx_output column which corresponds to Parity's result.result.output field.

@medvedev1088
Copy link
Member

For the export job implementation I think we should add trace_filter API to web3.py (somewhere here). Then the job implementation will mostly resemble the flow in ExportErc20TransfersJob from export_erc20_transfers_job.py

@medvedev1088
Copy link
Member

@AyushyaChitransh the Issue on Github now has $400 funding #53. Would you like to continue working on it?

@AyushyaChitransh
Copy link
Author

@medvedev1088 I have been working on this issue using a different setup, and am facing multiple performance issues. The coding part is completed, but the migration part(using geth) has been a bigger issue.

For now, I have made some progress on the performance issues related to this. Am hoping to improve the performance by this weekend.

@medvedev1088
Copy link
Member

@AyushyaChitransh could you elaborate on the performance issues? Also are you using geth's debug_subscribe method described here ethereum/go-ethereum#15516?

@AyushyaChitransh
Copy link
Author

While I was tracing individual transaction hashes, I was having trouble tracing internal transactions for blocks issued around DAO fork(around block numbers 2.3M). These transactions were big and trace for these blocks was slow.

Geth occasionally times out with a response of:

ERROR[08-04|08:11:16.028] write tcp x.x.x.x-> y.y.y.y: i/o timeout

or

Tracer timed out

Now I am going to look into subscribe functions. And see if this speeds up process.

@medvedev1088
Copy link
Member

@AyushyaChitransh interesting. Why did you give up using Parity?

@AyushyaChitransh
Copy link
Author

I never used parity in the first place. When I came across this issue, my setup was preconfigured to use geth. But am inclined towards testing the performance of parity.

@medvedev1088
Copy link
Member

@AyushyaChitransh got it. Let me know if you are interested in contributing for geth implementation. I will create and ask to fund an issue similar to this one but for geth #53.

debug_subscribe only works via websockets or ipc as I understand.

The Tracer timed out exception you got for debug_traceTransaction?

@AyushyaChitransh
Copy link
Author

That is correct. I encountered this error for debug_traceTransaction. Fix for this was to increase the timeout but that slowed down the overall process.

And no, I do not recommend geth. Geth is unable to trace internal transactions related to self_destruct opcode. While parity is much suited for it. I have explored very deeply using geth and have mentioned almost all points of failure.

So I would like to contribute for parity implementation.

@medvedev1088
Copy link
Member

The parity one is already taken by another dev, unfortunately #53.

Regarding selfdestruct, I can see it's implemented in call_tracer.js https://github.com/karalabe/go-ethereum/blob/master/eth/tracers/internal/tracers/call_tracer.js

@AyushyaChitransh
Copy link
Author

No problem then. I am glad someone is already working on that.

Regarding self_destruct, there is an open issue: ethereum/go-ethereum#16459

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