-
Notifications
You must be signed in to change notification settings - Fork 1.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
feat: tracing in Rethnet using JS callbacks #3593
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
result: rethnet_evm::ExecutionResult { | ||
exit_reason: ret, | ||
out: rethnet_evm::TransactOut::Call(out.clone()), | ||
gas_used: if ret == Return::InvalidOpcode || ret == Return::OpcodeNotFound { |
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.
I had to do this to match ethereumjs (same pattern below). What do you think, @fvictorio, should this be handled in revm
or here?
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.
Ugh, good question, I don't know. It seems to me like something revm should do, but maybe there's a good reason to do it this way. In any case, it's worth opening an issue to discuss it.
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.
The stack trace implementation has some caveats:
traceTransaction
is not implemented for Rethnet. This means that there are still 10 failing tests inHARDHAT_EXPERIMENTAL_VM_MODE=rethnet
due toError: traceTransaction not implemented for Rethnet
"Before byzantium"
test is skippedeth_sendTransaction > when automine is enabled > Shoud throw if the transaction fails
; all due to differences in the number of stack trace steps. We agreed that it's a time sync to try and resolve them nowIn the future we need to revisit the
JsTracer
implementation to remove ethereumjs specific fixes. This will be a breaking change for the Hardhat tracer ABI, but makes the implementation more "sane".