Skip to content
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

feat(zksync_server): adding --only-verify-config flag #3666

Merged
merged 8 commits into from
Mar 5, 2025
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core/bin/zksync_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ struct Cli {
/// Now the node framework is used by default and this argument is left for backward compatibility.
#[arg(long)]
use_node_framework: bool,

/// Used for testing whether provided config is correct.
/// The node will not be started, only the config will be verified.
#[arg(long, conflicts_with = "genesis")]
only_verify_config: bool,
}

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -165,6 +170,12 @@ fn main() -> anyhow::Result<()> {
secrets,
)?;

if opt.only_verify_config {
node.build(opt.components.0)?;
tracing::info!("Config verification is successful!");
return Ok(());
}

let observability_guard = {
// Observability initialization should be performed within tokio context.
let _context_guard = node.runtime_handle().enter();
Expand Down
Loading