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(zk_toolbox): Add prover run #2272

Merged
merged 110 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
f3efb31
Add init command boilerplate
matias-gonz Jun 12, 2024
0a694dc
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 12, 2024
ee26056
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 13, 2024
d82b8b3
Run key generator
matias-gonz Jun 13, 2024
351c9ee
fix setup data path
matias-gonz Jun 13, 2024
866bdc9
Refactor msgs
matias-gonz Jun 13, 2024
535fd18
fmt
matias-gonz Jun 13, 2024
4458d71
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 13, 2024
ae75d11
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 14, 2024
660f1f8
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 14, 2024
29e4459
Save link to prover in ecosystem config
matias-gonz Jun 14, 2024
8766e45
Add link_to_prover to ZkStack config
matias-gonz Jun 14, 2024
511c318
Remove type annotation
matias-gonz Jun 14, 2024
8ed3f19
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 14, 2024
6628238
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 18, 2024
f58ef92
Rename command to generate-sk
matias-gonz Jun 18, 2024
3891d63
Add get_link_to_prover
matias-gonz Jun 18, 2024
595e98f
fmt
matias-gonz Jun 18, 2024
15002a8
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 18, 2024
8a84d66
Remove link_to_prover from ZkStack config
matias-gonz Jun 18, 2024
4eb1363
Merge branch 'matias-gonz-zk-toolbox-add-prover-init' of github.com:m…
matias-gonz Jun 18, 2024
af51320
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-init
matias-gonz Jun 18, 2024
50f1a1d
Add ProverCommands::Run
matias-gonz Jun 18, 2024
be724af
Merge branch 'main' of github.com:matter-labs/zksync-era into matias-…
matias-gonz Jun 19, 2024
29940c7
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-run
matias-gonz Jun 25, 2024
5ab441d
Add ProverRunArgs
matias-gonz Jun 25, 2024
6bb0d45
Add run functions
matias-gonz Jun 25, 2024
c6c6fa8
fmt
matias-gonz Jun 25, 2024
515f3a9
Add run_gateway
matias-gonz Jun 25, 2024
1b283ab
Add run in background
matias-gonz Jun 25, 2024
a5b663b
fix run in background
matias-gonz Jun 25, 2024
627f39a
Use nohup
matias-gonz Jun 25, 2024
6f060da
fix fmt
matias-gonz Jun 25, 2024
e9b4ac3
Add PID message
matias-gonz Jun 25, 2024
bccf534
add sh
matias-gonz Jun 25, 2024
ffe5901
remove \'
matias-gonz Jun 25, 2024
193ff58
remove sh
matias-gonz Jun 25, 2024
aee700e
Remove nohup
matias-gonz Jun 25, 2024
b620f25
remove command variable
matias-gonz Jun 25, 2024
fe6aabe
Run with command
matias-gonz Jun 26, 2024
364664c
Update current dur
matias-gonz Jun 26, 2024
ccf013c
Refactor msgs
matias-gonz Jun 26, 2024
f5dea76
Fix params
matias-gonz Jun 26, 2024
65e6399
Remove run in background
matias-gonz Jun 27, 2024
f18c527
Add run_witness_generator
matias-gonz Jun 27, 2024
47236a6
Fix run_witness_generator
matias-gonz Jun 27, 2024
dca0c41
Add run_witness_vector_generator
matias-gonz Jun 27, 2024
c28ca67
Add run_prover
matias-gonz Jun 27, 2024
f2f577b
Fix prover command
matias-gonz Jun 27, 2024
3a476ce
Merge branch 'main' of github.com:matter-labs/zksync-era into matias-…
matias-gonz Jul 1, 2024
a9d1580
fmt
matias-gonz Jul 1, 2024
017850e
Add WitnessGeneratorArgs
matias-gonz Jul 1, 2024
83da0e1
Add run_compressor
matias-gonz Jul 1, 2024
2112fd4
Fix run_compressor
matias-gonz Jul 1, 2024
89e83e3
Remove unused function
matias-gonz Jul 1, 2024
b0b49d1
Fix download_setup_key
matias-gonz Jul 1, 2024
3be1b70
Update genesis protocol version
matias-gonz Jul 2, 2024
d021255
Fix setup_key_path
matias-gonz Jul 2, 2024
9c40be7
Merge branch 'main' of github.com:matter-labs/zksync-era into matias-…
matias-gonz Jul 2, 2024
962c540
Add static KEYSTORE
matias-gonz Jul 2, 2024
5dd5ee7
Merge branch 'main' into matias-vk-setup-data-generator-file-based-co…
matias-gonz Jul 2, 2024
774f932
Update variable name
matias-gonz Jul 2, 2024
df5907f
lint
matias-gonz Jul 2, 2024
f4b720b
Merge branch 'main' of github.com:matter-labs/zksync-era into matias-…
matias-gonz Jul 2, 2024
03b6ab8
Update vk hashes
matias-gonz Jul 2, 2024
7a1472e
Merge branch 'matias-vk-setup-data-generator-file-based-config' of gi…
matias-gonz Jul 2, 2024
f359b4f
Fix public object store
matias-gonz Jul 2, 2024
d752fe4
Fix object store
matias-gonz Jul 2, 2024
06d37c0
Update prometheus listener port
matias-gonz Jul 2, 2024
15b4c92
Update prometheus ports
matias-gonz Jul 2, 2024
213ebf8
Fix witness vector generator file based config
matias-gonz Jul 2, 2024
245047b
Fix run_compressor
matias-gonz Jul 3, 2024
0316019
Add init_bellman_cuda
matias-gonz Jul 3, 2024
7fc56e1
Add BELLMAN_CUDA_DIR variable
matias-gonz Jul 4, 2024
6a3986a
fmt
matias-gonz Jul 4, 2024
9bf2d5a
Update readme
matias-gonz Jul 4, 2024
d58a4ce
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-run
matias-gonz Jul 4, 2024
e7f274d
Add nvidia prerequisite
matias-gonz Jul 4, 2024
0cc9ca8
Update strum version
matias-gonz Jul 4, 2024
ce41b12
Update get_default_setup_key_path
matias-gonz Jul 4, 2024
3cbb8d0
Update download_setup_key
matias-gonz Jul 4, 2024
225479b
Fix download_setup_key
matias-gonz Jul 4, 2024
a457c37
Remove unused variable
matias-gonz Jul 4, 2024
1c05899
lint
matias-gonz Jul 4, 2024
b908055
Add prometheus_listener_port to FriWitnessGeneratorConfig
matias-gonz Jul 4, 2024
8357145
Update prometheus_listener_port
matias-gonz Jul 4, 2024
c136429
Add prometheus_listener_port to general config
matias-gonz Jul 4, 2024
86adc0d
Add prometheus_listener_port variable
matias-gonz Jul 4, 2024
585e612
Remove mut
matias-gonz Jul 4, 2024
0542ac0
Fix prometheus_listener_port
matias-gonz Jul 4, 2024
5a4aaa2
Update prometheus listener ports
matias-gonz Jul 4, 2024
a7aec18
Do not fail if prometheus config not provided when not needed
matias-gonz Jul 8, 2024
2d2d09b
Refactor prometheus config req
matias-gonz Jul 8, 2024
6c37439
Merge branch 'main' of github.com:matter-labs/zksync-era into matias-…
matias-gonz Jul 8, 2024
3b4c6b2
Merge branch 'main' into matias-gonz-prometheus-port-witness-generator
matias-gonz Jul 8, 2024
cd83f5a
Remove unused variable
matias-gonz Jul 8, 2024
324db12
Update prometheus listener_port
matias-gonz Jul 8, 2024
0c66acb
Add nvidia-smi prerequisite
matias-gonz Jul 8, 2024
2ad428d
Fix setup key download
matias-gonz Jul 8, 2024
c0f2e22
Merge branch 'matias-gonz-prometheus-port-witness-generator' of githu…
matias-gonz Jul 8, 2024
eeecf5a
Fix prover gateway prometheus port
matias-gonz Jul 8, 2024
d08d76c
Add InitBellmanCuda
matias-gonz Jul 8, 2024
68cab6e
fmt
matias-gonz Jul 8, 2024
54f6343
lint
matias-gonz Jul 8, 2024
156e2b8
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-run
matias-gonz Jul 8, 2024
edce71a
Make bellman_cuda_dir optional
matias-gonz Jul 8, 2024
22a2f19
lint
matias-gonz Jul 8, 2024
55fe720
Merge branch 'main' into matias-gonz-zk-toolbox-add-prover-run
matias-gonz Jul 9, 2024
3d55d83
Refactor init bellmancuda
matias-gonz Jul 9, 2024
7153685
Refactor init bellmancuda
matias-gonz Jul 9, 2024
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
1 change: 1 addition & 0 deletions ZkStack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: zk
l1_network: Localhost
link_to_code: .
bellman_cuda_dir: .
chains: ./chains
config: ./configs/
default_chain: era
Expand Down
12 changes: 12 additions & 0 deletions zk_toolbox/crates/config/src/ecosystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct EcosystemConfigInternal {
pub name: String,
pub l1_network: L1Network,
pub link_to_code: PathBuf,
pub bellman_cuda_dir: PathBuf,
Deniallugo marked this conversation as resolved.
Show resolved Hide resolved
pub chains: PathBuf,
pub config: PathBuf,
pub default_chain: String,
Expand All @@ -40,6 +41,7 @@ pub struct EcosystemConfig {
pub name: String,
pub l1_network: L1Network,
pub link_to_code: PathBuf,
pub bellman_cuda_dir: PathBuf,
pub chains: PathBuf,
pub config: PathBuf,
pub default_chain: String,
Expand Down Expand Up @@ -72,6 +74,11 @@ impl<'de> Deserialize<'de> for EcosystemConfig {
.absolutize()
.expect("Failed to parse zksync-era path")
.to_path_buf(),
bellman_cuda_dir: config
.bellman_cuda_dir
.absolutize()
.expect("Failed to parse bellman-cuda path")
.to_path_buf(),
chains: config.chains.clone(),
config: config.config.clone(),
default_chain: config.default_chain.clone(),
Expand Down Expand Up @@ -202,6 +209,11 @@ impl EcosystemConfig {
.absolutize()
.expect("Failed to parse zksync-era path")
.into(),
bellman_cuda_dir: self
.bellman_cuda_dir
.absolutize()
.expect("Failed to parse bellman-cuda path")
.into(),
chains: self.chains.clone(),
config: self.config.clone(),
default_chain: self.default_chain.clone(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use crate::{
create_configs::{create_erc20_deployment_config, create_initial_deployments_config},
},
},
consts::BELLMAN_CUDA_DIR,
messages::{
MSG_CLONING_ERA_REPO_SPINNER, MSG_CREATED_ECOSYSTEM, MSG_CREATING_DEFAULT_CHAIN_SPINNER,
MSG_CREATING_ECOSYSTEM, MSG_CREATING_INITIAL_CONFIGURATIONS_SPINNER,
Expand Down Expand Up @@ -76,6 +77,7 @@ fn create(args: EcosystemCreateArgs, shell: &Shell) -> anyhow::Result<()> {
name: ecosystem_name.clone(),
l1_network: args.l1_network,
link_to_code: link_to_code.clone(),
bellman_cuda_dir: shell.current_dir().join(BELLMAN_CUDA_DIR),
chains: chains_path.clone(),
config: configs_path,
era_chain_id: get_default_era_chain_id(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use std::path::PathBuf;

use clap::Parser;
use common::Prompt;

use crate::messages::MSG_BELLMAN_CUDA_DIR_PROMPT;

#[derive(Debug, Clone, Parser, Default)]
pub struct InitBellmanCudaArgs {
#[clap(long)]
pub bellman_cuda_dir: Option<String>,
}

impl InitBellmanCudaArgs {
pub fn fill_values_with_prompt(
self,
default_bellman_cuda_dir: &PathBuf,
) -> anyhow::Result<InitBellmanCudaArgs> {
let bellman_cuda_dir = self.bellman_cuda_dir.unwrap_or_else(|| {
Prompt::new(MSG_BELLMAN_CUDA_DIR_PROMPT)
.default(default_bellman_cuda_dir.to_str().unwrap_or_default())
.ask()
});

Ok(InitBellmanCudaArgs {
bellman_cuda_dir: Some(bellman_cuda_dir),
})
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod init;
pub mod init_bellman_cuda;
pub mod run;
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
use anyhow::Ok;
use common::{cmd::Cmd, logger, spinner::Spinner};
use common::{check_prover_prequisites, cmd::Cmd, logger, spinner::Spinner};
use config::EcosystemConfig;
use xshell::{cmd, Shell};

use super::utils::get_link_to_prover;
use crate::messages::{MSG_GENERATING_SK_SPINNER, MSG_SK_GENERATED};

pub(crate) async fn run(shell: &Shell) -> anyhow::Result<()> {
check_prover_prequisites(shell);

let ecosystem_config = EcosystemConfig::from_file(shell)?;
let link_to_prover = get_link_to_prover(&ecosystem_config);
shell.change_dir(&link_to_prover);
Expand Down
31 changes: 2 additions & 29 deletions zk_toolbox/crates/zk_inception/src/commands/prover/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ use super::{
utils::get_link_to_prover,
};
use crate::{
consts::{BELLMAN_CUDA_DIR, PROVER_STORE_MAX_RETRIES},
consts::PROVER_STORE_MAX_RETRIES,
messages::{
MSG_BUILDING_BELLMAN_CUDA_SPINNER, MSG_CHAIN_NOT_FOUND_ERR,
MSG_CLONING_BELLMAN_CUDA_SPINNER, MSG_DOWNLOADING_SETUP_KEY_SPINNER,
MSG_CHAIN_NOT_FOUND_ERR, MSG_DOWNLOADING_SETUP_KEY_SPINNER,
MSG_GENERAL_CONFIG_NOT_FOUND_ERR, MSG_PROOF_COMPRESSOR_CONFIG_NOT_FOUND_ERR,
MSG_PROVER_CONFIG_NOT_FOUND_ERR, MSG_PROVER_INITIALIZED, MSG_SETUP_KEY_PATH_ERROR,
},
Expand Down Expand Up @@ -68,8 +67,6 @@ pub(crate) async fn run(args: ProverInitArgs, shell: &Shell) -> anyhow::Result<(

chain_config.save_zksync_general_config(&general_config)?;

init_bellman_cuda(shell)?;

logger::outro(MSG_PROVER_INITIALIZED);
Ok(())
}
Expand Down Expand Up @@ -136,27 +133,3 @@ fn get_object_store_config(

Ok(object_store)
}

fn init_bellman_cuda(shell: &Shell) -> anyhow::Result<()> {
if shell.path_exists(BELLMAN_CUDA_DIR) {
return Ok(());
}

let spinner = Spinner::new(MSG_CLONING_BELLMAN_CUDA_SPINNER);
Cmd::new(cmd!(
shell,
"git clone https://github.com/matter-labs/era-bellman-cuda"
))
.run()?;
spinner.finish();

let spinner = Spinner::new(MSG_BUILDING_BELLMAN_CUDA_SPINNER);
Cmd::new(cmd!(
shell,
"cmake -Bera-bellman-cuda/build -Sera-bellman-cuda/ -DCMAKE_BUILD_TYPE=Release"
))
.run()?;
Cmd::new(cmd!(shell, "cmake --build era-bellman-cuda/build")).run()?;
spinner.finish();
Ok(())
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
use common::{check_prover_prequisites, cmd::Cmd, logger, spinner::Spinner};
use config::{traits::SaveConfigWithBasePath, EcosystemConfig};
use xshell::{cmd, Shell};

use crate::messages::{
MSG_BELLMAN_CUDA_DIR_ERR, MSG_BELLMAN_CUDA_INITIALIZED_MSG, MSG_BUILDING_BELLMAN_CUDA_SPINNER,
MSG_CLONING_BELLMAN_CUDA_SPINNER,
};

use super::args::init_bellman_cuda::InitBellmanCudaArgs;

pub(crate) async fn run(shell: &Shell, args: InitBellmanCudaArgs) -> anyhow::Result<()> {
check_prover_prequisites(shell);

let mut ecosystem_config = EcosystemConfig::from_file(shell)?;

let args = args.fill_values_with_prompt(&ecosystem_config.bellman_cuda_dir)?;

let bellman_cuda_dir = args.bellman_cuda_dir.expect(MSG_BELLMAN_CUDA_DIR_ERR);
ecosystem_config.bellman_cuda_dir = bellman_cuda_dir.clone().into();

if shell.path_exists(&bellman_cuda_dir) {
return save_bellman_cuda_dir(shell, &ecosystem_config);
}

let spinner = Spinner::new(MSG_CLONING_BELLMAN_CUDA_SPINNER);
Cmd::new(cmd!(
shell,
"git clone https://github.com/matter-labs/era-bellman-cuda {bellman_cuda_dir}"
))
.run()?;
spinner.finish();

let spinner = Spinner::new(MSG_BUILDING_BELLMAN_CUDA_SPINNER);
Cmd::new(cmd!(
shell,
"cmake -B{bellman_cuda_dir}/build -S{bellman_cuda_dir}/ -DCMAKE_BUILD_TYPE=Release"
))
.run()?;
Cmd::new(cmd!(shell, "cmake --build {bellman_cuda_dir}/build")).run()?;
spinner.finish();

save_bellman_cuda_dir(shell, &ecosystem_config)
}

fn save_bellman_cuda_dir(shell: &Shell, ecosystem: &EcosystemConfig) -> anyhow::Result<()> {
ecosystem.save_with_base_path(shell, ".")?;
logger::outro(MSG_BELLMAN_CUDA_INITIALIZED_MSG);
Ok(())
}
6 changes: 5 additions & 1 deletion zk_toolbox/crates/zk_inception/src/commands/prover/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use args::{init::ProverInitArgs, run::ProverRunArgs};
use args::{init::ProverInitArgs, init_bellman_cuda::InitBellmanCudaArgs, run::ProverRunArgs};
use clap::Subcommand;
use xshell::Shell;

mod args;
mod gcs;
mod generate_sk;
mod init;
mod init_bellman_cuda;
mod run;
mod utils;

Expand All @@ -17,12 +18,15 @@ pub enum ProverCommands {
GenerateSK,
/// Run prover
Run(ProverRunArgs),
/// Initialize bellman-cuda
InitBellmanCuda(Box<InitBellmanCudaArgs>),
}

pub(crate) async fn run(shell: &Shell, args: ProverCommands) -> anyhow::Result<()> {
match args {
ProverCommands::Init(args) => init::run(*args, shell).await,
ProverCommands::GenerateSK => generate_sk::run(shell).await,
ProverCommands::Run(args) => run::run(args, shell).await,
ProverCommands::InitBellmanCuda(args) => init_bellman_cuda::run(shell, *args).await,
}
}
35 changes: 15 additions & 20 deletions zk_toolbox/crates/zk_inception/src/commands/prover/run.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
use std::path::PathBuf;

use anyhow::Context;
use common::{cmd::Cmd, logger};
use common::{check_prover_prequisites, cmd::Cmd, logger};
use config::{ChainConfig, EcosystemConfig};
use path_absolutize::Absolutize;
use xshell::{cmd, Shell};

use super::{
args::run::{ProverComponent, ProverRunArgs, WitnessGeneratorArgs, WitnessGeneratorRound},
utils::get_link_to_prover,
};
use crate::{
consts::BELLMAN_CUDA_DIR,
messages::{
MSG_BELLMAN_CUDA_DIR_ERR, MSG_CHAIN_NOT_FOUND_ERR, MSG_MISSING_COMPONENT_ERR,
MSG_RUNNING_COMPRESSOR, MSG_RUNNING_COMPRESSOR_ERR, MSG_RUNNING_PROVER,
MSG_RUNNING_PROVER_ERR, MSG_RUNNING_PROVER_GATEWAY, MSG_RUNNING_PROVER_GATEWAY_ERR,
MSG_RUNNING_WITNESS_GENERATOR, MSG_RUNNING_WITNESS_GENERATOR_ERR,
MSG_RUNNING_WITNESS_VECTOR_GENERATOR, MSG_RUNNING_WITNESS_VECTOR_GENERATOR_ERR,
MSG_WITNESS_GENERATOR_ROUND_ERR,
},
use crate::messages::{
MSG_CHAIN_NOT_FOUND_ERR, MSG_MISSING_COMPONENT_ERR, MSG_RUNNING_COMPRESSOR,
MSG_RUNNING_COMPRESSOR_ERR, MSG_RUNNING_PROVER, MSG_RUNNING_PROVER_ERR,
MSG_RUNNING_PROVER_GATEWAY, MSG_RUNNING_PROVER_GATEWAY_ERR, MSG_RUNNING_WITNESS_GENERATOR,
MSG_RUNNING_WITNESS_GENERATOR_ERR, MSG_RUNNING_WITNESS_VECTOR_GENERATOR,
MSG_RUNNING_WITNESS_VECTOR_GENERATOR_ERR, MSG_WITNESS_GENERATOR_ROUND_ERR,
};

pub(crate) async fn run(args: ProverRunArgs, shell: &Shell) -> anyhow::Result<()> {
Expand All @@ -41,14 +34,15 @@ pub(crate) async fn run(args: ProverRunArgs, shell: &Shell) -> anyhow::Result<()
run_witness_vector_generator(shell, &chain)?
}
Some(ProverComponent::Prover) => run_prover(shell, &chain)?,
Some(ProverComponent::Compressor) => run_compressor(shell, &chain)?,
Some(ProverComponent::Compressor) => run_compressor(shell, &chain, &ecosystem_config)?,
None => anyhow::bail!(MSG_MISSING_COMPONENT_ERR),
}

Ok(())
}

fn run_gateway(shell: &Shell, chain: &ChainConfig) -> anyhow::Result<()> {
check_prover_prequisites(shell);
logger::info(MSG_RUNNING_PROVER_GATEWAY);
let config_path = chain.path_to_general_config();
let secrets_path = chain.path_to_secrets_config();
Expand Down Expand Up @@ -104,15 +98,16 @@ fn run_prover(shell: &Shell, chain: &ChainConfig) -> anyhow::Result<()> {
cmd.run().context(MSG_RUNNING_PROVER_ERR)
}

fn run_compressor(shell: &Shell, chain: &ChainConfig) -> anyhow::Result<()> {
fn run_compressor(
shell: &Shell,
chain: &ChainConfig,
ecosystem: &EcosystemConfig,
) -> anyhow::Result<()> {
logger::info(MSG_RUNNING_COMPRESSOR);
let config_path = chain.path_to_general_config();
let secrets_path = chain.path_to_secrets_config();

let bellman_cuda_dir = PathBuf::from(BELLMAN_CUDA_DIR);
let bellman_cuda_dir = bellman_cuda_dir.absolutize()?;
let bellman_cuda_str = bellman_cuda_dir.to_str().expect(MSG_BELLMAN_CUDA_DIR_ERR);
shell.set_var("BELLMAN_CUDA_DIR", bellman_cuda_str);
shell.set_var("BELLMAN_CUDA_DIR", ecosystem.bellman_cuda_dir.clone());

let mut cmd = Cmd::new(cmd!(shell, "cargo run --features gpu --release --bin zksync_proof_fri_compressor -- --config-path={config_path} --secrets-path={secrets_path}"));
cmd = cmd.with_force_run();
Expand Down
4 changes: 4 additions & 0 deletions zk_toolbox/crates/zk_inception/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ pub(super) const MSG_SETUP_KEY_PATH_ERROR: &str = "Failed to get setup key path"
pub(super) const MSG_CLONING_BELLMAN_CUDA_SPINNER: &str = "Cloning bellman-cuda...";
pub(super) const MSG_BUILDING_BELLMAN_CUDA_SPINNER: &str = "Building bellman-cuda...";
pub(super) const MSG_BELLMAN_CUDA_DIR_ERR: &str = "Failed to get bellman-cuda directory";
pub(super) const MSG_BELLMAN_CUDA_DIR_PROMPT: &str =
"Provide the path to the bellman-cuda directory:";
pub(super) const MSG_BELLMAN_CUDA_INITIALIZED_MSG: &str =
"bellman-cuda has been initialized successfully";

pub(super) fn msg_bucket_created(bucket_name: &str) -> String {
format!("Bucket created successfully with url: gs://{bucket_name}")
Expand Down