diff --git a/zkstack_cli/crates/zkstack/README.md b/zkstack_cli/crates/zkstack/README.md index 6e529efc200..f352d96fec4 100644 --- a/zkstack_cli/crates/zkstack/README.md +++ b/zkstack_cli/crates/zkstack/README.md @@ -508,7 +508,11 @@ Initialize prover - `--public-location ` - `--public-project-id ` - `--bellman-cuda-dir ` -- `--download-key ` +- `--bellman-cuda` + + Possible values: `true`, `false` + +- `--setup-compressor-key ` Possible values: `true`, `false` @@ -564,6 +568,10 @@ Run prover Possible values: `true`, `false` +- `--tag' - Tag of the docker image to run. + + Default value is `latest2.0` but you can specify your prefered one. + - `--round ` Possible values: `all-rounds`, `basic-circuits`, `leaf-aggregation`, `node-aggregation`, `recursion-tip`, `scheduler` diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs index 280b5b2e91d..fab79899302 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs @@ -61,7 +61,7 @@ pub struct ProverInitArgs { pub bellman_cuda: Option, #[clap(long, default_missing_value = "true", num_args = 0..=1)] - pub setup_compressor_keys: Option, + pub setup_compressor_key: Option, #[clap(flatten)] pub compressor_keys_args: CompressorKeysArgs, @@ -363,7 +363,7 @@ impl ProverInitArgs { }); } - let download_key = self.clone().setup_compressor_keys.unwrap_or_else(|| { + let download_key = self.clone().setup_compressor_key.unwrap_or_else(|| { PromptConfirm::new(MSG_DOWNLOAD_SETUP_COMPRESSOR_KEY_PROMPT) .default(false) .ask() diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs index d7600ba2d31..b79af777673 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs @@ -35,6 +35,8 @@ pub struct ProverRunArgs { pub circuit_prover_args: CircuitProverArgs, #[clap(long)] pub docker: Option, + #[clap(long)] + pub tag: Option, } #[derive( @@ -300,6 +302,8 @@ impl ProverRunArgs { .ask() }); + let tag = self.tag.unwrap_or("latest2.0".to_string()); + Ok(ProverRunArgs { component: Some(component), witness_generator_args, @@ -307,6 +311,7 @@ impl ProverRunArgs { fri_prover_args: self.fri_prover_args, circuit_prover_args, docker: Some(docker), + tag: Some(tag), }) } } diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/run.rs b/zkstack_cli/crates/zkstack/src/commands/prover/run.rs index 863816b9ae6..85495d12404 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/run.rs @@ -33,7 +33,7 @@ pub(crate) async fn run(args: ProverRunArgs, shell: &Shell) -> anyhow::Result<() let application_args = component.get_application_args(in_docker)?; let additional_args = - component.get_additional_args(in_docker, args, &chain, &path_to_ecosystem)?; + component.get_additional_args(in_docker, args.clone(), &chain, &path_to_ecosystem)?; let (message, error) = match component { ProverComponent::WitnessGenerator => ( @@ -83,6 +83,7 @@ pub(crate) async fn run(args: ProverRunArgs, shell: &Shell) -> anyhow::Result<() run_dockerized_component( shell, component.image_name(), + &args.tag.unwrap(), &application_args, &additional_args, message, @@ -110,6 +111,7 @@ pub(crate) async fn run(args: ProverRunArgs, shell: &Shell) -> anyhow::Result<() fn run_dockerized_component( shell: &Shell, image_name: &str, + tag: &str, application_args: &[String], args: &[String], message: &'static str, @@ -124,7 +126,7 @@ fn run_dockerized_component( let mut cmd = Cmd::new(cmd!( shell, - "docker run --net=host -v {path_to_prover}/data/keys:/prover/data/keys -v {path_to_prover}/artifacts:/artifacts -v {path_to_configs}:/configs {application_args...} {image_name} {args...}" + "docker run --net=host -v {path_to_prover}/data/keys:/prover/data/keys -v {path_to_prover}/artifacts:/artifacts -v {path_to_configs}:/configs {application_args...} {image_name}:{tag} {args...}" )); cmd = cmd.with_force_run(); diff --git a/zkstack_cli/crates/zkstack/src/consts.rs b/zkstack_cli/crates/zkstack/src/consts.rs index ba00af77b5a..b7c4d2a2070 100644 --- a/zkstack_cli/crates/zkstack/src/consts.rs +++ b/zkstack_cli/crates/zkstack/src/consts.rs @@ -17,14 +17,13 @@ pub const EXPLORER_APP_DOCKER_IMAGE: &str = "matterlabs/block-explorer-app"; pub const PORTAL_DOCKER_CONFIG_PATH: &str = "/usr/src/app/dist/config.js"; pub const PORTAL_DOCKER_IMAGE: &str = "matterlabs/dapp-portal"; -pub const PROVER_GATEWAY_DOCKER_IMAGE: &str = "matterlabs/prover-fri-gateway:latest2.0"; -pub const WITNESS_GENERATOR_DOCKER_IMAGE: &str = "matterlabs/witness-generator:latest2.0"; -pub const WITNESS_VECTOR_GENERATOR_DOCKER_IMAGE: &str = - "matterlabs/witness-vector-generator:latest2.0"; -pub const PROVER_DOCKER_IMAGE: &str = "matterlabs/prover-gpu-fri:latest2.0"; -pub const CIRCUIT_PROVER_DOCKER_IMAGE: &str = "matterlabs/circuit-prover-gpu:latest2.0"; -pub const COMPRESSOR_DOCKER_IMAGE: &str = "matterlabs/proof-fri-gpu-compressor:latest2.0"; -pub const PROVER_JOB_MONITOR_DOCKER_IMAGE: &str = "matterlabs/prover-job-monitor:latest2.0"; +pub const PROVER_GATEWAY_DOCKER_IMAGE: &str = "matterlabs/prover-fri-gateway"; +pub const WITNESS_GENERATOR_DOCKER_IMAGE: &str = "matterlabs/witness-generator"; +pub const WITNESS_VECTOR_GENERATOR_DOCKER_IMAGE: &str = "matterlabs/witness-vector-generator"; +pub const PROVER_DOCKER_IMAGE: &str = "matterlabs/prover-gpu-fri"; +pub const CIRCUIT_PROVER_DOCKER_IMAGE: &str = "matterlabs/circuit-prover-gpu"; +pub const COMPRESSOR_DOCKER_IMAGE: &str = "matterlabs/proof-fri-gpu-compressor"; +pub const PROVER_JOB_MONITOR_DOCKER_IMAGE: &str = "matterlabs/prover-job-monitor"; pub const PROVER_GATEWAY_BINARY_NAME: &str = "zksync_prover_fri_gateway"; pub const WITNESS_GENERATOR_BINARY_NAME: &str = "zksync_witness_generator";