Skip to content

Commit

Permalink
refact: remove redunction code in generate witness
Browse files Browse the repository at this point in the history
  • Loading branch information
SuccinctPaul committed Nov 10, 2023
1 parent b9a0c17 commit 79e0a9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
11 changes: 1 addition & 10 deletions algebraic/src/witness/witness_calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,7 @@ impl WitnessCalculator {
"writeBufferMessage" => runtime::write_buffer_message(&mut store),
}
};
let instance = Wasm::new(Instance::new(&mut scope, &module, &import_object)?);
let mut store = Store::default();
let env = FunctionEnv::new(&mut store, ());
let module = Module::new(&store, "(module)")?;
let imports = imports! {
"host" => {
"var" => Global::new(&mut store, Value::I32(2))
}
};
let instance = Instance::new(&mut store, &module, &imports)?;
let instance = Wasm::new(Instance::new(&mut store, &module, &import_object)?);

// Circom 2 feature flag with version 2
fn new_circom(instance: Wasm, memory: Memory) -> Result<WitnessCalculator> {
Expand Down
1 change: 1 addition & 0 deletions groth16/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ thiserror="1.0"
fnv = { version = "1.0.3", default-features = false }
num = { version = "0.4.0" }
algebraic = { path = "../algebraic", default-features=false }
rand = "0.4"

[dev-dependencies]
env_logger = "0.10"
Expand Down
1 change: 1 addition & 0 deletions plonky/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ thiserror="1.0"
fnv = { version = "1.0.3", default-features = false }
num = { version = "0.4.0" }
algebraic = { path = "../algebraic", default-features=false }
rand = "0.4"

[dev-dependencies]
env_logger = "0.10"
Expand Down

0 comments on commit 79e0a9c

Please sign in to comment.