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

Refactor tracing and add support for call/create gas cost calculation #197

Open
Tracked by #303
agostbiro opened this issue Oct 2, 2023 · 0 comments
Open
Tracked by #303
Assignees

Comments

@agostbiro
Copy link
Member

Problem

The way debug_trace is implemented currently is not ideal and doesn't have support for gas cost of calls and creates. The problem is that the current implementation just adopts the REVM TracerEIp3155 implementation that operates conceptually on the opcode level. It already requires some hackery to make this approach work for calls/creates, and it breaks down for call gas cost calculation. A better approach would be to start a new trace for each call/create and then flatten the results to the format that EIP-3155 prescribes. To achieve this, it need a refactoring of rethnet_evm::trace & rethnet_evm::debug_trace to have a single trace collector that collects all the info needed for trace and debug_trace and then have methods that output it in the desired formats.

Definition of done

One implementation for collecting traces that allows granular configuration of what needs to be collected (for efficiency) and methods to output the collected traces in the desired formats. Support for call/create gas cost calculation should also be added.

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

No branches or pull requests

3 participants