mirror of
https://github.com/vacp2p/zerokit.git
synced 2025-02-26 13:15:27 +00:00
Revert "remove tracing"
This reverts commit 74f6588f5afa79dc7b1c91e6061261a35be74b14.
This commit is contained in:
parent
f7fc0d137b
commit
e020b53acc
@ -9,6 +9,11 @@ use ark_groth16::{
|
||||
|
||||
use num_bigint::BigInt;
|
||||
|
||||
// Tracing
|
||||
use tracing::{span, event, Level};
|
||||
use ark_relations::r1cs::{ConstraintTrace, ConstraintLayer, ConstraintSystem, TracingMode};
|
||||
use tracing_subscriber::layer::SubscriberExt;
|
||||
|
||||
// JSON
|
||||
use serde::Deserialize;
|
||||
use serde_json;
|
||||
@ -30,11 +35,24 @@ struct WitnessInput {
|
||||
// Poseidon-tornado
|
||||
fn groth16_proof_example() -> Result<()> {
|
||||
|
||||
// Tracing to help with debugging
|
||||
let mut layer = ConstraintLayer::default();
|
||||
layer.mode = TracingMode::OnlyConstraints;
|
||||
let subscriber = tracing_subscriber::Registry::default().with(layer);
|
||||
let _guard = tracing::subscriber::set_default(subscriber);
|
||||
|
||||
let trace = ConstraintTrace::capture();
|
||||
println!("Trace is: {:?}", trace);
|
||||
|
||||
let cfg = CircomConfig::<Bn254>::new(
|
||||
"./resources/withdraw.wasm",
|
||||
"./resources/withdraw.r1cs",
|
||||
)?;
|
||||
|
||||
// Test
|
||||
let trace = ConstraintTrace::capture();
|
||||
println!("Trace is: {:?}", trace);
|
||||
|
||||
// From poseidon-tornado JSON witness
|
||||
let input_json_str = r#"
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user