test(fault-proof): add invalid proof rejection tests#775
Open
fakedev9999 wants to merge 3 commits into
Open
Conversation
c541a19 to
3f9a6e7
Compare
…rifier Add OPSuccinctFaultDisputeGameInvalidProofTest contract to verify that invalid proofs are properly rejected by the real SP1Verifier, including fuzz testing, empty proof edge case, and garbage proof handling. Fixes GRO2-921
…estBase - Create abstract base contract with shared state and setUp logic - Add virtual functions for verifier type, parent resolution, and initial balance - Refactor OPSuccinctFaultDisputeGameTest to inherit from base - Refactor OPSuccinctFaultDisputeGameInvalidProofTest to inherit from base - Remove unused event declarations from invalid proof test contract - Net reduction of ~70 lines through deduplication
- Add vm.assume(length >= 4) to fuzz test to avoid overlap with empty proof edge case (tested separately in testEmptyProofRejected) - Add testValidSelectorInvalidProofBodyRejected to test deeper Groth16 verification with valid selector but invalid proof body - Remove unnecessary _proposerInitialBalance override (default suffices) - Restore original setUp order (prank before warp) for clarity
061f027 to
dc09b94
Compare
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.
Add OPSuccinctFaultDisputeGameInvalidProofTest contract with comprehensive tests for invalid proof handling using the real SP1Verifier. Tests cover fuzz testing with arbitrary invalid proofs, empty proof edge case (slice bounds error), and garbage proof rejection (WrongVerifierSelector).
Fixes GRO2-921