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

meta(tracing): tracking issue for tracing improvements #3390

Open
mds1 opened this issue Sep 27, 2022 · 1 comment
Open

meta(tracing): tracking issue for tracing improvements #3390

mds1 opened this issue Sep 27, 2022 · 1 comment
Labels
A-config Area: config A-tracing Area: tracing C-cast Command: cast C-forge Command: forge T-meta Type: meta

Comments

@mds1
Copy link
Collaborator

mds1 commented Sep 27, 2022

Component

Forge, Cast

Describe the feature you would like

forge test, forge script, and cast run all produce traces. Depending on your use case, there are various display modes that may be the most helpful:

  1. Hiding addresses if you have a label vs. showing label + addr vs. always showing addr (ref feat(tracing): add flag to hide address when label is available #3381)
  2. Truncated address like 0x123...def vs full addresses (this has come up in an issue before, can't find it now though)
  3. Overall tx state diffs vs. no state diffs (ref feat(cheatcodes): ability to capture and store state diffs #2846)
  4. Call-level state diffs within the trace (arguably would get cluttered, but still is useful)
  5. Showing only logs instead of a full trace
  6. Showing vs. hiding function parameter names
  7. Showing vs. hiding decoded SSTOREs and SLOADs in a call, similar to https://tx.eth.samczsun.com/#txhash=0x3443cd8f0c722fa9d83e12033f29eb590b177804ae625f2072625dfb79b329c2
  8. Hide/modify certain calls in the traces, for example file/json reading/writing large files can quickly clutter logs. Perhaps a flag that takes an array of VM function names/signatures and replaces them with some other value

I think we should support these various options in two ways:

  • A new [trace] section in the config file (more useful for forge)
  • CLI flags (more useful for cast)

Additional context

No response

@mds1 mds1 added the T-feature Type: feature label Sep 27, 2022
@gakonst gakonst added this to Foundry Sep 27, 2022
@gakonst gakonst moved this to Todo in Foundry Sep 27, 2022
@rkrasiuk rkrasiuk added A-tracing Area: tracing A-config Area: config C-cast Command: cast C-forge Command: forge labels Sep 28, 2022
@odyslam
Copy link
Contributor

odyslam commented Nov 22, 2022

Linking also this as relevant: #3599

I will probably PR a quick fix for #3599, as it's really painful. But, generally, really like this "proper" solution to this family of use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config Area: config A-tracing Area: tracing C-cast Command: cast C-forge Command: forge T-meta Type: meta
Projects
Archived in project
Development

No branches or pull requests

4 participants