Skip to content

feat(forge): add option to truncate large data in execution traces #10306

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

Closed
wants to merge 2 commits into from

Conversation

crStiv
Copy link

@crStiv crStiv commented Apr 15, 2025

Motivation

Execution traces become unusable when functions pass large byte arrays, making debugging difficult. This addresses issue #10305 by adding a CLI option to truncate large input/output data in traces.

Solution

  • Added a new --truncate-data command line argument to forge test
  • Implemented global configuration for storing the truncation size in TraceMode
  • Added function to truncate large data in execution traces while indicating the number of bytes truncated
  • When truncation is enabled, both function input and output data exceeding the specified size will be truncated

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@crStiv
Copy link
Author

crStiv commented Apr 15, 2025

@zerosnacks what's wrong?!

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

Successfully merging this pull request may close these issues.

2 participants