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 tx hash to tracers #20629

Closed
kryvel opened this issue Feb 5, 2020 · 7 comments
Closed

Add tx hash to tracers #20629

kryvel opened this issue Feb 5, 2020 · 7 comments

Comments

@kryvel
Copy link

kryvel commented Feb 5, 2020

Hi there,
Is it possible to get transaction hash in tracer?
Using this one or any other (custom) js tracer
https://github.com/ethereum/go-ethereum/blob/master/eth/tracers/internal/tracers/call_tracer.js
I tried to use debug_traceBlock endpount, there are all necessary information except tx hash

My goal is to find all incoming transactions to my addresses by RPC API.

I just moved from parity, and they have trace_block.

TIA

@holiman
Copy link
Contributor

holiman commented Feb 20, 2020

So let me summarize:
From the js context, for certain transactions (that e..g touch your account), you want to spit out the tx hashes.

We agree, it's a feature worth having

@holiman holiman changed the title debug_traceBlock Add tx hash to tracers Feb 20, 2020
@karalabe
Copy link
Member

I think this is a valid feature request, needs a bit of API massaging though. We'd need to modify CaptureStart to add some more contextual fields (block number, tx hash).

@kryvel
Copy link
Author

kryvel commented Feb 20, 2020

So let me summarize:
From the js context, for certain transactions (that e..g touch your account), you want to spit out the tx hashes.

We agree, it's a feature worth having

Hi,
Yes, exactly

@holiman
Copy link
Contributor

holiman commented Nov 3, 2021

cc @s1na want to have a go^ ?

@s1na
Copy link
Contributor

s1na commented Nov 4, 2021

result() has access to the transaction hash (ctx.txHash) now. I'm guessing that should be enough for the use-case. Closing the issue but please re-open if I misunderstood the feature request.

@pyropy
Copy link

pyropy commented Mar 15, 2024

Is this available inside native tracers? I'm using a custom native tracer and currently am limited to mapping traces to txs via index.

Having something like this inside native tracer would be a great addition.

@s1na
Copy link
Contributor

s1na commented Mar 15, 2024

@pyropy Yep, the constructor to the tracer will receive a Context in which it is being executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants