Skip to content

Conversation

@fakedev9999
Copy link
Member

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.

@fakedev9999 fakedev9999 requested a review from Copilot October 30, 2025 09:35
Copy link

Copilot AI left a 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...
Copy link

Copilot AI Oct 30, 2025

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.

Suggested change
SP1_PRIVATE_KEY=0x...
NETWORK_PRIVATE_KEY=0x...

Copilot uses AI. Check for mistakes.

# Aggregation proof fulfillment strategy
AGG_PROOF_STRATEGY=auction

Copy link

Copilot AI Oct 30, 2025

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).

Suggested change
# 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

Copilot uses AI. Check for mistakes.
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.

2 participants