diff --git a/.config/nextest.toml b/.config/nextest.toml index 6ab73993a..1cd2de9fe 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -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]] diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 27ead7844..cc7df46d9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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: @@ -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 diff --git a/sdk/src/artifacts.rs b/sdk/src/artifacts.rs index 6e7fcec4e..9e5475570 100644 --- a/sdk/src/artifacts.rs +++ b/sdk/src/artifacts.rs @@ -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) -> Result<()> { let output_dir: PathBuf = output_dir.into(); let artifacts_dir = if sphinx_prover::build::sphinx_dev_mode() { @@ -21,6 +20,10 @@ pub fn export_solidity_plonk_bn254_verifier(output_dir: impl Into) -> 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 {:?}",