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 evm tracing debug method #114

Closed
axic opened this issue Jan 23, 2018 · 1 comment
Closed

Add evm tracing debug method #114

axic opened this issue Jan 23, 2018 · 1 comment
Assignees

Comments

@axic
Copy link
Member

axic commented Jan 23, 2018

Similar to the evmStackTrace method in ewasm-kernel: https://github.com/ewasm/ewasm-kernel/blob/master/debugInterface.js#L30-L40

It should target to have all the content needed for the tracing format as described here: ethereum/tests#249

I propose the following: evmTrace(pc: i32, opcode: i32, cost: i32, sp: i32)

It will then output the following JSON: {'pc': $pc, 'op': $opcode, 'gas': $gasLeft, 'gasCost': $cost, 'stack': $stack, 'depth': $depth} where $gasLeft and $depth are the current values from the environment and $stack is an array of reading 32 bytes from memory_start + $pc and decreasing $pc by 32 until it is less than 0.

@axic
Copy link
Member Author

axic commented Jan 23, 2018

cc @cdetrio what do you think?

This should be close enough to both what ewasm-kernel does and what the tracing JSON requires.

@axic axic self-assigned this Jan 24, 2018
@axic axic closed this as completed in #115 Mar 11, 2018
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

1 participant