Selaa lähdekoodia

[crypsinous: zk/circuit/lead_contract] add rho to public input

mohab metwally 4 vuotta sitten
vanhempi
sitoutus
cc1c63eb24
2 muutettua tiedostoa jossa 3 lisäystä ja 4 poistoa
  1. 2 2
      src/crypto/leadcoin.rs
  2. 1 2
      src/zk/circuit/lead_contract.rs

+ 2 - 2
src/crypto/leadcoin.rs

@@ -19,7 +19,7 @@ use pasta_curves::{arithmetic::CurveAffine, group::Curve};
 
 
 //use halo2_proofs::arithmetic::CurveAffine;
 //use halo2_proofs::arithmetic::CurveAffine;
 
 
-pub const LEAD_PUBLIC_INPUT_LEN : usize = 9;
+pub const LEAD_PUBLIC_INPUT_LEN : usize = 10;
 
 
 #[derive(Debug, Default, Clone, Copy)]
 #[derive(Debug, Default, Clone, Copy)]
 pub struct LeadCoin {
 pub struct LeadCoin {
@@ -111,7 +111,7 @@ impl LeadCoin {
             po_sn,
             po_sn,
 
 
             po_y,
             po_y,
-            //po_rho,
+            po_rho,
         ];
         ];
         public_inputs
         public_inputs
     }
     }

+ 1 - 2
src/zk/circuit/lead_contract.rs

@@ -637,13 +637,12 @@ impl Circuit<pallas::Base> for LeadContract {
             LEAD_Y_COMMIT_BASE_OFFSET,
             LEAD_Y_COMMIT_BASE_OFFSET,
         )?;
         )?;
 
 
-        /*
         layouter.constrain_instance(
         layouter.constrain_instance(
             rho_commit_base.cell(),
             rho_commit_base.cell(),
             config.primary,
             config.primary,
             LEAD_RHO_COMMIT_BASE_OFFSET,
             LEAD_RHO_COMMIT_BASE_OFFSET,
         )?;
         )?;
-        */
+
         Ok(())
         Ok(())
     }
     }
 }
 }