Skip to content

Commit

Permalink
feat(host): assert image_id.is_none
Browse files Browse the repository at this point in the history
  • Loading branch information
keroro520 committed Jan 6, 2025
1 parent 7655373 commit 4031f19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions host/src/server/api/v2/proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ async fn proof_handler(
let mut config = prover_state.request_config();
config.merge(&req)?;

// TODO: remove this assert after we support custom image_id for RISC0/SP1 proof type
assert!(
config.image_id.is_none(),
"currently we don't support custom image_id for RISC0/SP1 proof type"
);
ensure_proof_request_image_id(&mut config)?;

// Construct the actual proof request from the available configs.
Expand Down
6 changes: 6 additions & 0 deletions host/src/server/api/v3/proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ async fn proof_handler(
inc_current_req();

ensure_not_paused(&prover_state)?;

// TODO: remove this assert after we support custom image_id for RISC0/SP1 proof type
assert!(
aggregation_request.image_id.is_none(),
"currently we don't support custom image_id for RISC0/SP1 proof type"
);
ensure_aggregation_request_image_id(&mut aggregation_request)?;

// Override the existing proof request config from the config file and command line
Expand Down

0 comments on commit 4031f19

Please sign in to comment.