Эх сурвалжийг харах

zk: Reduced and optimised mint contract rows to allow k=9.

parazyd 4 жил өмнө
parent
commit
7c267e4830

+ 1 - 1
src/node/client.rs

@@ -226,7 +226,7 @@ impl Client {
 
     fn build_mint_pk() -> ProvingKey {
         debug!("Building proving key for MintContract");
-        ProvingKey::build(11, &MintContract::default())
+        ProvingKey::build(9, &MintContract::default())
     }
 
     fn build_burn_pk() -> ProvingKey {

+ 4 - 3
src/zk/circuit/mint_contract.rs

@@ -16,7 +16,10 @@ use halo2_proofs::{
 };
 use pasta_curves::{pallas, Fp};
 
-use crate::crypto::constants::{OrchardFixedBases, OrchardFixedBasesFull, ValueCommitV};
+use crate::{
+    crypto::constants::{OrchardFixedBases, OrchardFixedBasesFull, ValueCommitV},
+    zk::assign_free_advice,
+};
 
 #[derive(Clone, Debug)]
 pub struct MintConfig {
@@ -104,8 +107,6 @@ impl Circuit<pallas::Base> for MintContract {
         // Poseidon requires four advice columns, while ECC incomplete addition
         // requires six. We can reduce the proof size by sharing fixed columns
         // between the ECC and Poseidon chips.
-        // TODO: For multiple invocations they could/should be configured in
-        // parallel rather than sharing perhaps?
         let lagrange_coeffs = [
             meta.fixed_column(),
             meta.fixed_column(),