mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-07 22:04:03 -05:00
zk: add Debug trait to ZkCircuit and fill configure trait
This commit is contained in:
@@ -29,7 +29,7 @@ pub enum DebugOpValue {
|
||||
Void,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ZkTracer {
|
||||
pub opvalues: Arc<Mutex<Option<Vec<DebugOpValue>>>>,
|
||||
init_allowed: bool,
|
||||
|
||||
@@ -278,7 +278,7 @@ pub struct ZkParams {
|
||||
init_zerocond: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ZkCircuit {
|
||||
constants: Vec<String>,
|
||||
pub(super) witnesses: Vec<Witness>,
|
||||
@@ -320,8 +320,8 @@ impl Circuit<pallas::Base> for ZkCircuit {
|
||||
}
|
||||
}
|
||||
|
||||
fn configure(_meta: &mut ConstraintSystem<pallas::Base>) -> Self::Config {
|
||||
unreachable!();
|
||||
fn configure(meta: &mut ConstraintSystem<pallas::Base>) -> Self::Config {
|
||||
Self::configure_with_params(meta, ZkParams::default())
|
||||
}
|
||||
|
||||
fn params(&self) -> Self::Params {
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::{
|
||||
|
||||
/// These represent the witness types outside of the circuit
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Witness {
|
||||
EcPoint(Value<pallas::Point>),
|
||||
EcNiPoint(Value<pallas::Point>),
|
||||
|
||||
Reference in New Issue
Block a user