-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,91 @@ | ||||||
| # Pre-Flight Validation | ||||||
|
|
||||||
| **Proving will break if parameters are incorrect.** After deploying contracts, run this script to verify the contract configuration before the mainnet upgrade. | ||||||
|
|
||||||
| ## What Does Pre-Flight Validate? | ||||||
|
|
||||||
| Catches configuration issues before production by testing the complete proof generation and submission pipeline end-to-end. The game creation and proof submission is simulated on a forked L1 network. | ||||||
|
|
||||||
| ## Prerequisites | ||||||
|
|
||||||
| - Deployed `DisputeGameFactory` contract | ||||||
| - L1/L2 RPC access | ||||||
| - SP1 network prover access | ||||||
|
|
||||||
| ## Required Environment Variables | ||||||
|
|
||||||
| Create a `.env` file with the following variables: | ||||||
|
|
||||||
| ### Contract Configuration | ||||||
| ```bash | ||||||
| # Address of the DisputeGameFactory contract on L1 | ||||||
| FACTORY_ADDRESS=0x... | ||||||
|
|
||||||
| # Game type identifier for OPSuccinctFaultDisputeGames | ||||||
| # This must match the game type registered in the factory | ||||||
| GAME_TYPE=42 | ||||||
|
|
||||||
| # L1 block number where setImplementation was called for this game type | ||||||
| # Must be a finalized L1 block | ||||||
| SET_IMPL_BLOCK=12345678 | ||||||
| ``` | ||||||
|
|
||||||
| ### Network Configuration | ||||||
| ```bash | ||||||
| # L1 RPC endpoint (used for Anvil fork during validation) | ||||||
| L1_RPC=https://ethereum-sepolia-rpc.publicnode.com | ||||||
|
|
||||||
| # L1 beacon chain RPC endpoint | ||||||
| L1_BEACON_RPC=https://ethereum-sepolia-beacon-api.publicnode.com | ||||||
|
|
||||||
| # L2 RPC endpoint | ||||||
| L2_RPC=https://rpc-your-rollup.example.com | ||||||
|
|
||||||
| # L2 node RPC endpoint (often same as L2_RPC) | ||||||
| L2_NODE_RPC=https://rpc-your-rollup.example.com | ||||||
| ``` | ||||||
|
|
||||||
| ### Prover Configuration | ||||||
| ```bash | ||||||
| # Range proof fulfillment strategy | ||||||
| RANGE_PROOF_STRATEGY=auction | ||||||
|
|
||||||
| # Aggregation proof fulfillment strategy | ||||||
| AGG_PROOF_STRATEGY=auction | ||||||
|
|
||||||
| # SP1 network prover private key (required when USE_KMS_REQUESTER=false) | ||||||
| SP1_PRIVATE_KEY=0x... | ||||||
|
||||||
| SP1_PRIVATE_KEY=0x... | |
| NETWORK_PRIVATE_KEY=0x... |
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_REQUESTERenvironment 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. AddUSE_KMS_REQUESTER=falseto the Prover Configuration section with a description explaining when to set it to true (AWS KMS) vs false (local private key).