-
Notifications
You must be signed in to change notification settings - Fork 356
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 missing code to tracer extension #377
Conversation
StackExecutorWrapper
StackExecutorWrapper
if let Some(ret) = (precompile)(address, &data, Some(gas_limit), &context) { | ||
return match ret { | ||
Ok((s, out, cost)) => { | ||
let _ = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@notlesh isn't this also what you recently fixed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, however in our wrapper we need to do exactly what the evm is doing, even if it's wrong! Otherwise the trace won't be replicating the original transaction behaviour.
Of course once the PR is merged we can include that change in our wrapper. Once again, this can be avoided with the hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it looks like it should effectively do the same thing.
Won't do, we want to go for the hook. |
What does it do?
Refactors the runner
trace_call
andtrace_create
in a singletrace
function.And adds missing:
call
contexts.What important points reviewers should know?
For missing precompile handling we have 2 options:
evm::StackExecutor::precompile
.EvmConfig::Precompile::execute
to the executor wrapper in our side.I decided to use the latter because we have access to it, and in both cases we are using the same PrecompileSet.
Is there something left for follow-up PRs?
EVM side is really not compatible with tracing. We enabled some accessors there to be able to mock it's internals, but we still need to duplicate a bunch of code on our side to make sure we behave trace in the same way that the original call was executed.
This PR is a clear demonstration that @nanocryk 's hook is better solution to avoid this type of situations.
Checklist