Skip to content

test(fault-proof): add invalid proof rejection tests#775

Open
fakedev9999 wants to merge 3 commits into
mainfrom
taehoon/gro2-921-add-test_invalid_proof_rejected-v1
Open

test(fault-proof): add invalid proof rejection tests#775
fakedev9999 wants to merge 3 commits into
mainfrom
taehoon/gro2-921-add-test_invalid_proof_rejected-v1

Conversation

@fakedev9999
Copy link
Copy Markdown
Member

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

@fakedev9999 fakedev9999 force-pushed the taehoon/gro2-921-add-test_invalid_proof_rejected-v1 branch from c541a19 to 3f9a6e7 Compare January 14, 2026 04:30
…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
@fakedev9999 fakedev9999 force-pushed the taehoon/gro2-921-add-test_invalid_proof_rejected-v1 branch from 061f027 to dc09b94 Compare January 28, 2026 01:51
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.

1 participant