Skip to content

Conversation

@meyer9
Copy link
Collaborator

@meyer9 meyer9 commented Nov 13, 2025

Adds initialize-op-proofs which is now required before running the node with the proof ExEx.

Fixes #376

@wiz-b4c72f16a4
Copy link

wiz-b4c72f16a4 bot commented Nov 13, 2025

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 1 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@meyer9 meyer9 marked this pull request as ready for review November 13, 2025 19:21
Copilot AI review requested due to automatic review settings November 13, 2025 19:21
Copilot finished reviewing on behalf of meyer9 November 13, 2025 19:24
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 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 InitializeOpProofsCommand that backfills proofs storage with current chain state
  • Replaces automatic backfill in ExEx startup with initialization check
  • Removes unnecessary dependencies from reth-optimism-exex crate

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.

// 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."
Copy link

Copilot AI Nov 13, 2025

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>'

Suggested change
"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."

Copilot uses AI. Check for mistakes.
@emhane emhane added A-cli Area: CLI crate A-trie Area: Merkle Patricia Trie W-historical-proofs Workstream: historical-proofs labels Nov 14, 2025
Copy link
Member

@emhane emhane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@emhane emhane force-pushed the meyer9/add-initialize-op-proofs-cmd branch from 200ad0a to 3decfb4 Compare November 25, 2025 11:12
@emhane
Copy link
Member

emhane commented Nov 25, 2025

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

@dhyaniarun1993
Copy link
Collaborator

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.

@dhyaniarun1993
Copy link
Collaborator

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 have added this here

@dhyaniarun1993
Copy link
Collaborator

The command is working fine on devnet but I was facing some issues on the testnet. I will check again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: CLI crate A-trie Area: Merkle Patricia Trie W-historical-proofs Workstream: historical-proofs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add initialize-op-proofs CLI command

4 participants