Skip to content

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

Open
@mds1

Description

@mds1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions