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 Configurable Verbosity Levels for Execution Traces #601

Merged
merged 13 commits into from
Mar 25, 2025

Conversation

priyankabose
Copy link
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
Collaborator

Closes #204

Copy link
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 and others added 8 commits March 24, 2025 12:23

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…nto dev/add-verbosity-levels

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@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.

None yet

2 participants