diff --git a/zero/src/bin/leader/client.rs b/zero/src/bin/leader/client.rs index 6825b6683..c4ddedd63 100644 --- a/zero/src/bin/leader/client.rs +++ b/zero/src/bin/leader/client.rs @@ -38,6 +38,8 @@ pub(crate) async fn client_main( ) -> Result<()> { use futures::StreamExt; + let test_only = leader_config.prover_config.test_only; + let cached_provider = Arc::new(zero::provider::CachedProvider::new( build_http_retry_provider( rpc_params.rpc_url.clone(), @@ -45,17 +47,20 @@ pub(crate) async fn client_main( rpc_params.max_retries, )?, )); - check_previous_proof_and_checkpoint( - leader_config.checkpoint_block_number, - &leader_config.previous_proof, - block_interval.get_start_block()?, - )?; + + if !test_only { + // For actual proof runs, perform a sanity check on the provided inputs. + check_previous_proof_and_checkpoint( + leader_config.checkpoint_block_number, + &leader_config.previous_proof, + block_interval.get_start_block()?, + )?; + } // Create a channel for block prover input and use it to send prover input to // the proving task. The second element of the tuple is a flag indicating // whether the block is the last one in the interval. let (block_tx, block_rx) = mpsc::channel::<(BlockProverInput, bool)>(zero::BLOCK_CHANNEL_SIZE); - let test_only = leader_config.prover_config.test_only; // Run proving task let runtime_ = runtime.clone();