-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add initialize-op-proofs command
#377
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: unstable
Are you sure you want to change the base?
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
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 new initialize-op-proofs CLI command that must be run before starting the node with the proof ExEx. The change separates the initialization/backfill process from the ExEx startup, replacing automatic backfill with an initialization check that provides a clear error message if the storage hasn't been prepared.
Key changes:
- Adds
InitializeOpProofsCommandthat backfills proofs storage with current chain state - Replaces automatic backfill in ExEx startup with initialization check
- Removes unnecessary dependencies from
reth-optimism-exexcrate
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/optimism/exex/src/lib.rs | Replaces automatic backfill with initialization check that returns helpful error |
| crates/optimism/exex/Cargo.toml | Removes unused reth-provider and reth-chainspec dependencies |
| crates/optimism/cli/src/commands/mod.rs | Registers new initialize-op-proofs command |
| crates/optimism/cli/src/commands/initialize_proofs.rs | Implements new initialization command with backfill logic |
| crates/optimism/cli/src/app.rs | Integrates command execution |
| crates/optimism/cli/Cargo.toml | Adds reth-optimism-trie dependency and reformats feature arrays |
| Cargo.lock | Updates dependency graph |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
crates/optimism/exex/src/lib.rs
Outdated
| // Check if proofs storage is initialized | ||
| if self.storage.get_earliest_block_number().await?.is_none() { | ||
| return Err(eyre::eyre!( | ||
| "Proofs storage not initialized. Please run 'op-reth initialize-op-proofs --storage-path <PATH>' first." |
Copilot
AI
Nov 13, 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 error message uses --storage-path <PATH> but the actual argument name in the command definition is --storage-path <PROOFS_HISTORY_STORAGE_PATH>. Update the error message to match the actual value name for consistency: 'op-reth initialize-op-proofs --storage-path <PROOFS_HISTORY_STORAGE_PATH>'
| "Proofs storage not initialized. Please run 'op-reth initialize-op-proofs --storage-path <PATH>' first." | |
| "Proofs storage not initialized. Please run 'op-reth initialize-op-proofs --storage-path <PROOFS_HISTORY_STORAGE_PATH>' first." |
emhane
left a comment
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.
lgtm
200ad0a to
3decfb4
Compare
|
this change will require running the command as part of devnet setup it seems https://github.com/op-rs/op-reth/actions/runs/19668235576/job/56330321432#step:10:3466 @dhyaniarun1993 |
I am working on it. |
I have added this here |
|
The command is working fine on devnet but I was facing some issues on the testnet. I will check again |
Adds
initialize-op-proofswhich is now required before running the node with the proof ExEx.Fixes #376