-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: stack trace support for setup/deployment and invariant tests #799
Conversation
|
Based on this context, it's hard for me to agree or disagree. Maybe we can discuss it tomorrow during our sync? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look good to me. As I mentioned previously, it would be good to discuss the approach taken during the sync, to help me verify my understanding before I can agree/disagree.
I also left one question and one comment on the code changes themselves.
@Wodann thanks for the review! As discussed, pinging for final review of the PR. These are the changes since you've reviewed: Invariant test-related fixes:
Fuzz tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final changes look good to me
Adds stack trace support by re-executing failed calls for
Re-execution on deployment and setup is rather forward, but for invariant tests there are two things to consider:
setUp
method. It greatly simplifies re-execution if we always do tracing on setup and deployment if there are invariant tests. The performance decrease should be negligible, because most invariant test have asetUp
method and since they tend to take longer, the overhead is amortized.TestResult::reason
. I opted to change this behavior so that the revert reason in the test result matches the stack trace which Hardhat relies on. Note that there are some failing Foundry integration tests related to this which I'll fix if we agree on this point.TODOS left for stack traces after this PR:
No changeset as this gets released to @ignored/edr.