Skip to content

Flaky contracts fuzz test #249

@karlb

Description

@karlb

The latest optimism version contains fuzz tests that seem to pick up all contracts in the repo. That sometimes leads to fuzz test failures related to AddressSortedLinkedListWithMedian like https://app.circleci.com/pipelines/github/celo-org/optimism/1829/workflows/f2d42480-6c0f-40fe-9561-5a7bd2ab3932/jobs/32600. Obviously, I would like to get rid of the test failures.

Potential solutions:

  • Change AddressSortedLinkedListWithMedian to pass the tests (I don't know what the problem is, though)
  • Remove AddressSortedLinkedListWithMedian . But it is used in the SortedOracles which is used in the cUSD setup.
  • Skip it in tests. Maybe something like vm.assume(_addr != getAddress("AddressSortedLinkedListWithMedian"));?

Steps to reproduce: Run FOUNDRY_FUZZ_RUNS=1000000 forge test --match-test testFuzz_callWithMinGas_hasEnough_succeeds in packages/contracts-bedrock in the celo8 branch of celo-org/optimism .

Previous discussion: https://clabsco.slack.com/archives/CP5V8KF51/p1726577073321929

@martinvol:

Would focus on reliably disabling the tests

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions