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

Add trace_id and status field values to ExtractGethTracesJob #400

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

sajithaliyanage
Copy link

Also, This fix is needed to run the extract_contracts command since it checks the status to filter out contracts from the traces. Refer:

and len(trace.get('to_address')) > 0 and trace.get('status') == 1]

@sajithaliyanage
Copy link
Author

@medvedev1088 please review and merge this PR. This is useful for extracting contracts from traces, as deriving contracts from receipts does not give all contracts in the blockchain. Similar fix is already merged in Ethereum ETL airflow dags blockchain-etl/ethereum-etl-airflow#8

@boshmaf
Copy link

boshmaf commented Oct 5, 2022

@medvedev1088 tried this fix and it works fine, could you please consider reviewing? Thanks @sajithaliyanage!

@@ -51,6 +54,10 @@ def _extract_geth_traces(self, geth_traces):
for geth_trace_dict in geth_traces:
geth_trace = self.geth_trace_mapper.json_dict_to_geth_trace(geth_trace_dict)
traces = self.trace_mapper.geth_trace_to_traces(geth_trace)

calculate_trace_statuses(traces)
Copy link
Member

Choose a reason for hiding this comment

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

Geth traces don't have transaction_hash in them so status calculation is not correct. calculate_trace_statuses needs to be accommodated to geth traces

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.

extract_geth_traces not filling status and trace_id field
3 participants