Skip to content

Add Configurable Verbosity Levels for Execution Traces#601

Merged
anishnaik merged 13 commits intomasterfrom
dev/add-verbosity-levels
Mar 25, 2025
Merged

Add Configurable Verbosity Levels for Execution Traces#601
anishnaik merged 13 commits intomasterfrom
dev/add-verbosity-levels

Conversation

@priyankabose
Copy link
Copy Markdown
Contributor

Summary

This PR introduces three distinct verbosity levels for execution traces in Medusa, giving users more control over the level of detail shown in trace outputs. This is especially beneficial for complex systems with multiple call frames, where the current trace output can be overwhelming.

Changes

  • Added an enumerated VerbosityLevel type with three levels:
    • Verbose (0): Shows only top-level transactions in execution traces. Only events in the top-level call frame and return data are handled.
    • VeryVerbose (1): The current behavior (now default). Shows full detail for the current transaction.
    • VeryVeryVerbose (2): Shows full trace details for all call sequence elements, not just the last one (traceAll).
  • Added comprehensive test contracts and tests to verify the behavior of each verbosity level

@anishnaik
Copy link
Copy Markdown
Collaborator

Closes #204

Copy link
Copy Markdown
Collaborator

@anishnaik anishnaik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core functionality looks great! My only gripe is the complexity of the smart contract test case. A simpler test is always better as long as it covers the same code paths as the test case you have written (which I believe it can).

Additionally, can you make sure that the feature works as expected through the CLI? Thus, build the binary and run medusa fuzz -v, medusa fuzz -vv, and medusa fuzz -vvv on the same piece of test code. Maybe a small stress test of medusa fuzz -verbosity -v would be good to see how that would work? You can run these commands on the same contract that you wrote the unit test for.

Finally, one of the linters is complaining so make sure to fix that as well.

@anishnaik anishnaik merged commit e42c46d into master Mar 25, 2025
12 checks passed
@anishnaik anishnaik deleted the dev/add-verbosity-levels branch March 25, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants