-
Notifications
You must be signed in to change notification settings - Fork 18
make progress on stack depth issues when running coverage #75
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
Conversation
ok so this error is originating from both of the permit2 even with no named variables and no function body, the error still gets tripped we have a number of options for these:
will plan to modify the interface to get this working for now, which seems fine since we already changed it for the lockTag adjustment; open to other suggestions though |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
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.
lgtm
@@ -264,6 +257,19 @@ contract TheCompact is ITheCompact, ERC6909, TheCompactLogic { | |||
bytes32 witness, | |||
bytes calldata sponsorSignature | |||
) external returns (bytes32 claimHash) { | |||
_enforceConsistentAllocators(idsAndAmounts); |
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.
Note: We may be looping over idsAndAmounts twice in this function. Once in _enforceConsistentAllocators
and once in .hasValidSponsor
if the emissary is checked. Because of stack issues, I don't believe we want to fix.
The goal here is to run
forge coverage
which compiles the code without the IR optimization step (note thatforge coverage --ir-minimum
does not cover the inline assembly so isn't going to work).There are a few places where the code gets uglier for sure, but the actual functionality and efficiency should be intact with the exception of a few gas here and there for an extra calldataload / pop / etc. I think the value of having coverage in place is worth it (with the caveat that once we are comfortable with the coverage in place we can always change things back).
however I'm now hitting a blocker on this dreadful error:
best I can gather is that this means there's some function that has too many arguments which means the function can't even be entered or called at all; if anyone has thoughts on how we might track it down and make progress here it'd be much appreciated!