Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fix: reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko committed Jun 14, 2024
1 parent 7410c71 commit dcd3a7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions leader/src/jerigon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use common::block_interval::BlockInterval;
use common::fs::generate_block_proof_file_name;
use paladin::runtime::Runtime;
use proof_gen::proof_types::GeneratedBlockProof;
use tracing::{error, info};
use tracing::{error, warn};

#[derive(Debug, Default)]
pub(crate) struct JerigonParams {
pub struct JerigonParams {
pub checkpoint_block_number: u64,
pub previous_proof: Option<GeneratedBlockProof>,
pub proof_output_dir: Option<PathBuf>,
Expand Down Expand Up @@ -44,8 +44,6 @@ pub(crate) async fn jerigon_main(
.await?;
runtime.close().await?;

info!("Proved blocks: {proved_blocks:?}");

if !params.keep_intermediate_proofs {
if let Some(proof_output_dir) = params.proof_output_dir.as_ref() {
proved_blocks
Expand All @@ -58,6 +56,8 @@ pub(crate) async fn jerigon_main(
error!("Failed to remove intermediate proof file: {e}");
}
});
} else {
warn!("Skipping cleanup, intermediate proofs are kept");
}
}

Expand Down
4 changes: 2 additions & 2 deletions tools/prove_blocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fi
if [[ $5 == "test_only" ]]; then
# test only run
echo "Proving blocks ${BLOCK_INTERVAL} in a test_only mode now... (Total: ${TOT_BLOCKS})"
cargo r --release --features test_only --bin leader -- --runtime in-memory --load-strategy on-demand jerigon --rpc-url "$NODE_RPC_URL" --block-interval $BLOCK_INTERVAL --proof-output-dir $PROOF_OUTPUT_DIR $PREV_PROOF_EXTRA_ARG 2>&1 > $OUT_LOG_PATH
cargo r --release --features test_only --bin leader -- --runtime in-memory --load-strategy on-demand jerigon --rpc-url "$NODE_RPC_URL" --block-interval $BLOCK_INTERVAL --proof-output-dir $PROOF_OUTPUT_DIR $PREV_PROOF_EXTRA_ARG > $OUT_LOG_PATH 2>&1
if grep 'Successfully generated witness for block' $OUT_LOG_PATH; then
echo "Success - Note this was just a test, not a proof"
# Remove the log on success if we don't want to keep it.
Expand All @@ -96,7 +96,7 @@ if [[ $5 == "test_only" ]]; then
else
# normal run
echo "Proving blocks ${BLOCK_INTERVAL} now... (Total: ${TOT_BLOCKS})"
cargo r --release --bin leader -- --runtime in-memory --load-strategy on-demand jerigon --rpc-url "$3" --block-interval $BLOCK_INTERVAL --proof-output-dir $PROOF_OUTPUT_DIR $PREV_PROOF_EXTRA_ARG 2>&1 > $OUT_LOG_PATH
cargo r --release --bin leader -- --runtime in-memory --load-strategy on-demand jerigon --rpc-url "$3" --block-interval $BLOCK_INTERVAL --proof-output-dir $PROOF_OUTPUT_DIR $PREV_PROOF_EXTRA_ARG > $OUT_LOG_PATH 2>&1

retVal=$?
if [ $retVal -ne 0 ]; then
Expand Down

0 comments on commit dcd3a7c

Please sign in to comment.