Skip to content

Commit

Permalink
misc: Do not perform sanity check on test_only runs (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Sep 20, 2024
1 parent 3af1f29 commit e13af35
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions zero/src/bin/leader/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,29 @@ 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(),
rpc_params.backoff,
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();
Expand Down

0 comments on commit e13af35

Please sign in to comment.