-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
support state override for debug_traceTransaction ("offchain events") #29423
support state override for debug_traceTransaction ("offchain events") #29423
Conversation
Why is this not possible by using |
I haven't seen this in docs. do you have reference? |
Sure, I'll add it in the docs later today or tomorrow |
@s1na how about let's also add |
@jsvisa Yep I think it makes sense. But with multicall around the corner I'd say it's a short term benefit anyway. @hananbeer let me know if you tried the alternative I suggested and it works for you, then I'd go ahead and close this PR. We can keep the |
that solution is fine I just want it to be standardized across nodes :) |
IMO, it still makes sense to support state overrides on both It would be a two-line code change: just move |
the debug_traceCall function supports state overrides, but debug_traceTransaction does not - it only accepts a transaction hash.
I wrote this originally as the backbone for generating "offchain events" (as developed by shadow / ghost logs)
to prevent confusion with nodes that don't implement this feature I created a distinct function debug_traceTransactionOverrides.
by overriding contracts bytecode it is possible to reexecute onchain transactions in different context, specifically to emit so called "offchain events" but not limited to this.
see equivalent implementations:
reth: paradigmxyz/reth#7410
erigon: erigontech/erigon#9847