Repository navigation
Test: Fix flaky setFlags and streaming payment order fuzz tests - #786
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two more fuzz tests failed randomly in CI on
devafter #780 and #781 merged. Neither failure was related to those changes.ERC20PaymentClientBaseV2Test.test_setFlags: with all 256 bits set, the test'suint8flag counter overflows._setFlagshas the same limit because_flagCountis auint8, so setting all 256 flags reverts. It's admin-only and far beyond the number of flags in use, so the contract stays as is and the test excludes that input.PP_StreamingV1Test.test_ValidPaymentOrder: the expected value left out the origin/target chain check thatvalidPaymentOrderperforms. Whenever the fuzzer produced an otherwise valid order (e.g. a deployed token address) with random chain IDs, the test expectedtrue. The streaming mock now exposes_validOriginAndTargetChain(same as thePP_Simple_v2mock), and the test includes it.Test-only change.
Deployment Steps
✅ No deployment steps required.
Test Plan
Pre-merge checklist
FOUNDRY_FUZZ_RUNS=30000FOUNDRY_PROFILE=cipasses under seeds0x1,0x2a,0x1337(1586/1586 each)forge fmt --checkpasses