Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limited = { max-threads = 4 }
very-limited = { max-threads = 1 }

[[profile.ci.overrides]]
filter = '(test(syscall::precompiles) | test(stark::machine) | package(sphinx-recursion-program) | package(sphinx-recursion-circuit))'
filter = '(test(syscall::precompiles) | test(stark::machine) | test(test_verifier_export) | package(sphinx-recursion-program) | package(sphinx-recursion-circuit))'
test-group = 'limited'

[[profile.ci.overrides]]
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
description: "Token to use for private repo access"
required: true
perf:
description: "Set env to optimize performance"
description: "Set env to optimize CI latency"
required: false
default: "true"
runs:
Expand All @@ -21,6 +21,7 @@ runs:
if [[ "${{ inputs.perf }}" == "true" ]]; then
echo "RUSTFLAGS=${{env.RUSTFLAGS}} -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -Ctarget-cpu=native" | tee -a $GITHUB_ENV
echo "FRI_QUERIES=1" | tee -a $GITHUB_ENV
echo "SP1_DEV=true" | tee -a $GITHUB_ENV
fi
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" | tee -a $GITHUB_ENV
echo "RUST_LOG=info" | tee -a $GITHUB_ENV
Expand Down
7 changes: 5 additions & 2 deletions sdk/src/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ pub use sphinx_prover::build::{

/// Exports the solidity verifier for PLONK proofs to the specified output directory.
///
/// WARNING: If you are on development mode, this function assumes that the PLONK artifacts have
/// already been built.
/// WARNING: If you are on development mode, this function will rebuild the PLONK artifacts.
pub fn export_solidity_plonk_bn254_verifier(output_dir: impl Into<PathBuf>) -> Result<()> {
let output_dir: PathBuf = output_dir.into();
let artifacts_dir = if sphinx_prover::build::sphinx_dev_mode() {
Expand All @@ -21,6 +20,10 @@ pub fn export_solidity_plonk_bn254_verifier(output_dir: impl Into<PathBuf>) -> R
};
let verifier_path = artifacts_dir.join("SphinxVerifier.sol");

if !verifier_path.exists() && sphinx_prover::build::sphinx_dev_mode() {
build_plonk_bn254_artifacts_with_dummy(artifacts_dir);
}

if !verifier_path.exists() {
return Err(anyhow::anyhow!(
"verifier file not found at {:?}",
Expand Down