Skip to content

Commit

Permalink
Remove spartan everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgoergens committed Jan 24, 2025
1 parent 74617a3 commit 285aeea
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 284 deletions.
12 changes: 5 additions & 7 deletions circ_blocks/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,11 @@ def test(features, extra_args):
if "lp" in features:
log_run_check(["./scripts/test_zok_to_ilp.zsh"])
if "r1cs" in features:
if "spartan" in features: # spartan field
log_run_check(["./scripts/spartan_zok_test.zsh"])
else: # bellman field
log_run_check(["./scripts/zokrates_test.zsh"])
if "poly" in features:
log_run_check(["./scripts/cp_test.zsh"])
log_run_check(["./scripts/ram_test.zsh"])
# bellman field
log_run_check(["./scripts/zokrates_test.zsh"])
if "poly" in features:
log_run_check(["./scripts/cp_test.zsh"])
log_run_check(["./scripts/ram_test.zsh"])
if "lp" in features and "r1cs" in features:
log_run_check(["./scripts/test_zok_to_ilp_pf.zsh"])

Expand Down
1 change: 0 additions & 1 deletion circ_blocks/examples/cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ struct Options {

#[derive(PartialEq, Debug, Clone, ValueEnum)]
/// `Prove`/`Verify` execute proving/verifying in bellman separately
/// `Spartan` executes both proving/verifying in spartan
enum ProofAction {
Prove,
Verify,
Expand Down
19 changes: 0 additions & 19 deletions circ_blocks/examples/zk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ use bls12_381::Bls12;
#[cfg(feature = "bellman")]
use circ::target::r1cs::{bellman::Bellman, mirage::Mirage, proof::ProofSystem};

#[cfg(feature = "spartan")]
use circ::ir::term::text::parse_value_map;
#[cfg(feature = "spartan")]
use circ::target::r1cs::spartan;

#[derive(Debug, Parser)]
#[command(name = "zk", about = "The CirC ZKP runner")]
struct Options {
Expand All @@ -39,11 +34,9 @@ struct Options {

#[derive(PartialEq, Debug, Clone, ValueEnum)]
/// `Prove`/`Verify` execute proving/verifying in bellman separately
/// `Spartan` executes both proving/verifying in spartan
enum ProofAction {
Prove,
Verify,
Spartan,
}

#[derive(PartialEq, Debug, Clone, ValueEnum)]
Expand Down Expand Up @@ -89,17 +82,5 @@ fn main() {
}
#[cfg(not(feature = "bellman"))]
(ProofAction::Prove | ProofAction::Verify, _) => panic!("Missing feature: bellman"),
#[cfg(feature = "spartan")]
(ProofAction::Spartan, _) => {
let prover_input_map = parse_value_map(&std::fs::read(opts.pin).unwrap());
println!("Spartan Proving");
let (gens, inst, proof) = spartan::prove(opts.prover_key, &prover_input_map).unwrap();

let verifier_input_map = parse_value_map(&std::fs::read(opts.vin).unwrap());
println!("Spartan Verifying");
spartan::verify(opts.verifier_key, &verifier_input_map, &gens, &inst, proof).unwrap();
}
#[cfg(not(feature = "spartan"))]
(ProofAction::Spartan, _) => panic!("Missing feature: spartan"),
}
}
2 changes: 0 additions & 2 deletions circ_blocks/src/target/r1cs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub mod bellman;
pub mod mirage;
pub mod opt;
pub mod proof;
#[cfg(feature = "spartan")]
pub mod spartan;
pub mod trans;
pub mod wit_comp;

Expand Down
254 changes: 0 additions & 254 deletions circ_blocks/src/target/r1cs/spartan.rs

This file was deleted.

2 changes: 1 addition & 1 deletion circ_blocks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# TODO: add in "kahip", "kahypar" binaries dependencies when adding new MPC changes
cargo_features = {"aby", "c", "lp", "r1cs", "smt",
"zok", "datalog", "bellman", "spartan", "poly"}
"zok", "datalog", "bellman", "poly"}


def save_mode(mode):
Expand Down

0 comments on commit 285aeea

Please sign in to comment.