diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b80b8f5..f691d63 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.81" +channel = "1.85" components = ["rustfmt", "rust-src", "clippy"] profile = "minimal" diff --git a/src/citrea_config/batch_prover.rs b/src/citrea_config/batch_prover.rs index c72a86c..217dbb4 100644 --- a/src/citrea_config/batch_prover.rs +++ b/src/citrea_config/batch_prover.rs @@ -1,33 +1,17 @@ use serde::{Deserialize, Serialize}; /// The possible configurations of the prover. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] -#[serde(rename_all = "lowercase")] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] pub enum ProverGuestRunConfig { /// Skip proving. Skip, - /// Run the rollup verification logic inside the current process. - Simulate, /// Run the rollup verifier in a zkVM executor. Execute, /// Run the rollup verifier and create a SNARK of execution. Prove, -} - -impl<'de> Deserialize<'de> for ProverGuestRunConfig { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let s = String::deserialize(deserializer)?; - match s.as_str() { - "skip" => Ok(ProverGuestRunConfig::Skip), - "simulate" => Ok(ProverGuestRunConfig::Simulate), - "execute" => Ok(ProverGuestRunConfig::Execute), - "prove" => Ok(ProverGuestRunConfig::Prove), - _ => Err(serde::de::Error::custom("invalid prover guest run config")), - } - } + /// Run the rollup verifier and create a SNARK or a fake proof of execution. + ProveWithFakes, } /// Prover configuration diff --git a/src/citrea_config/rollup.rs b/src/citrea_config/rollup.rs index 6a3c2f0..e030705 100644 --- a/src/citrea_config/rollup.rs +++ b/src/citrea_config/rollup.rs @@ -149,7 +149,7 @@ impl Default for RollupConfig { storage: StorageConfig { path: TempDir::new() .expect("Failed to create temporary directory") - .into_path(), + .keep(), db_max_open_files: None, }, runner: None, @@ -161,9 +161,10 @@ impl Default for RollupConfig { da_private_key: None, tx_backup_dir: TempDir::new() .expect("Failed to create temporary directory") - .into_path() + .keep() .display() .to_string(), + monitoring: Some(MonitoringConfig::default()), }, public_keys: RollupPublicKeys { diff --git a/src/config/bitcoin.rs b/src/config/bitcoin.rs index ba70f0f..a627240 100644 --- a/src/config/bitcoin.rs +++ b/src/config/bitcoin.rs @@ -29,7 +29,7 @@ impl Default for BitcoinConfig { rpc_password: "password".to_string(), data_dir: TempDir::new() .expect("Failed to create temporary directory") - .into_path(), + .keep(), extra_args: Vec::new(), network: Network::Regtest, docker_image: None, diff --git a/src/config/test_case.rs b/src/config/test_case.rs index 61a927c..f91fb17 100644 --- a/src/config/test_case.rs +++ b/src/config/test_case.rs @@ -81,7 +81,7 @@ impl Default for TestCaseConfig { |_| { TempDir::new() .expect("Failed to create temporary directory") - .into_path() + .keep() }, PathBuf::from, )