-
Notifications
You must be signed in to change notification settings - Fork 115
feat: add preflight check script for fp #669
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a preflight validation script for the OP Succinct Fault Dispute Game that verifies contract configuration before mainnet deployment. The script tests the complete proof generation and submission pipeline end-to-end by simulating game creation and proof submission on a forked L1 network.
Key changes:
- New preflight binary that generates range and aggregation proofs, creates a dispute game on a forked Anvil network, submits proofs, and validates correct game state
- Documentation outlining required environment variables and usage instructions
- Dependencies added to support contract interaction, network forking, and proof generation
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/prove/bin/preflight.rs | New binary implementing the end-to-end preflight validation workflow |
| scripts/prove/Cargo.toml | Adds preflight binary configuration and required dependencies (alloy crates, serde_json, fault_proof) |
| book/fault_proofs/preflight.md | Documentation for preflight validation usage and environment variables |
| Cargo.lock | Dependency graph updates for new dependencies in op-succinct-prove package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| AGG_PROOF_STRATEGY=auction | ||
|
|
||
| # SP1 network prover private key (required when USE_KMS_REQUESTER=false) | ||
| SP1_PRIVATE_KEY=0x... |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation references SP1_PRIVATE_KEY but the code expects NETWORK_PRIVATE_KEY. Based on the implementation in utils/host/src/network.rs, the get_network_signer function uses NETWORK_PRIVATE_KEY environment variable. The documentation should reference NETWORK_PRIVATE_KEY instead of SP1_PRIVATE_KEY to match the actual implementation.
| SP1_PRIVATE_KEY=0x... | |
| NETWORK_PRIVATE_KEY=0x... |
|
|
||
| # Aggregation proof fulfillment strategy | ||
| AGG_PROOF_STRATEGY=auction | ||
|
|
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation for the USE_KMS_REQUESTER environment variable. The code at lines 135 and 187 in preflight.rs requires this variable to be set, but it's not listed in the 'Required Environment Variables' section. Add USE_KMS_REQUESTER=false to the Prover Configuration section with a description explaining when to set it to true (AWS KMS) vs false (local private key).
| # Set to 'true' to use AWS KMS for key management (requires KMS configuration). | |
| # Set to 'false' to use a local private key (requires SP1_PRIVATE_KEY below). | |
| # Default: false | |
| USE_KMS_REQUESTER=false |
Adds a preflight check script for OPSuccinctFaultDistputeGame to catches configuration issues before production by testing the complete proof generation and submission pipeline end-to-end.
Note that the game creation and proof submission is simulated on a forked L1 network to not touch the actual storage on mainnet.