Skip to content

Commit

Permalink
rusk-prover: Add debug feature to print the test circuit-bytes
Browse files Browse the repository at this point in the history
This behaviour was lost with the merge of PR #2135
  • Loading branch information
moCello committed Oct 2, 2024
1 parent 6d1060d commit b1a5c37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rusk-prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ dusk-plonk = { workspace = true, features = ["rkyv-impl", "alloc"] }
rusk-profile = { workspace = true }
execution-core = { workspace = true, features = ["zk"] }

# debug dependency
hex = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }

[dev-dependencies]
hex = { workspace = true }

Expand All @@ -20,3 +24,4 @@ no_random = []
std = [
"dusk-plonk/std"
]
debug = ["hex", "tracing"]
6 changes: 6 additions & 0 deletions rusk-prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ impl Prove for LocalProver {
#[cfg(feature = "no_random")]
let rng = &mut StdRng::seed_from_u64(0xbeef);

#[cfg(feature = "debug")]
tracing::info!(
"tx_circuit_vec:\n{}",
hex::encode(tx_circuit_vec_bytes)
);

let (proof, _pi) = match tx_circuit_vec.input_notes_info.len() {
1 => TX_CIRCUIT_1_2_PROVER
.prove(rng, &create_circuit::<1>(tx_circuit_vec)?)
Expand Down

0 comments on commit b1a5c37

Please sign in to comment.