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

In UniStaker tests, remember depositors and surrogates and prevent overlap #75

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

apbendi
Copy link
Collaborator

@apbendi apbendi commented Mar 21, 2024

Due to a recent, undocumented change in the Foundry fuzzer implementation, we are now seeing test failures where the address of a yet-to-be-deployed DelegationSurrogate is selected as a depositor. This breaks our tests. This is occuring despite the include_storage flag being set to false, which previously was sufficient for preventing this edge case.

To accomodate this, we implement a test helper that remembers each depositor and surrogate as they're chosen and deployed respectively, and assures there is no overlap between the two groups of addresses.

…erlap

Due to a recent, undocumented change in the Foundry fuzzer implementation, we are now
seeing test failures where the address of a yet-to-be-deployed DelegationSurrogate is
selected as a depositor. This breaks our tests. This is occuring despite the include_storage
flag being set to false, which previously was sufficient for preventing this edge case.

To accomodate this, we implement a test helper that remembers each depositor and surrogate as
they're chosen and deployed respectively, and assures there is no overlap between the two
groups of addresses.
Copy link

Coverage after merging fix-surrogate-depositor-fuzz into main will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   UniStaker.sol99.49%95.83%100%100%611
   V3FactoryOwner.sol100%100%100%100%

Copy link
Collaborator

@wildmolasses wildmolasses left a comment

Choose a reason for hiding this comment

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

works for me; would look forward to rolling this back if the tooling is fixed.

@apbendi apbendi merged commit 1573451 into main Mar 22, 2024
4 checks passed
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.

3 participants