From 38f9e3076f789101f7f548b84b1daa49bae04fdb Mon Sep 17 00:00:00 2001 From: str4d Date: Mon, 19 Jul 2021 13:56:18 +0100 Subject: [PATCH] Update code comments after review Co-authored-by: Daira Hopwood Co-authored-by: ying tong --- src/circuit/gadget/ecc/chip.rs | 4 ++-- src/circuit/gadget/sinsemilla/chip.rs | 6 +++--- src/circuit/gadget/sinsemilla/merkle/chip.rs | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/circuit/gadget/ecc/chip.rs b/src/circuit/gadget/ecc/chip.rs index 1f4533b9..0b0113d8 100644 --- a/src/circuit/gadget/ecc/chip.rs +++ b/src/circuit/gadget/ecc/chip.rs @@ -183,8 +183,8 @@ impl EccChip { // mul::complete::Config: // - advices[9]: z_complete // - // I have not yet figured out where constants[1] is used in an equality constraint - // but we get synthesis errors without it. + // mul::Config: + // - constants[1]: Setting `z_init` to zero. // // TODO: Refactor away from `impl From for _` so that sub-configs can // equality-enable the columns they need to. diff --git a/src/circuit/gadget/sinsemilla/chip.rs b/src/circuit/gadget/sinsemilla/chip.rs index d43c4f76..02457075 100644 --- a/src/circuit/gadget/sinsemilla/chip.rs +++ b/src/circuit/gadget/sinsemilla/chip.rs @@ -116,9 +116,9 @@ impl SinsemillaChip { lookup: (Column, Column, Column), constants: [Column; 6], // TODO: replace with public inputs API ) -> >::Config { - // This chip requires all advice columns and the `constants` fixed column to be - // equality-enabled. The advice columns are equality-enabled by the calls to - // LookupRangeCheckConfig::configure. + // This chip requires all advice columns and the `constants` fixed columns to be + // equality-enabled. The advice columns and the first five `constants` columns + // are equality-enabled by the calls to LookupRangeCheckConfig::configure. let lookup_config_0 = LookupRangeCheckConfig::configure(meta, advices[0], constants[0], lookup.0); let lookup_config_1 = diff --git a/src/circuit/gadget/sinsemilla/merkle/chip.rs b/src/circuit/gadget/sinsemilla/merkle/chip.rs index b81906ad..cbcafa31 100644 --- a/src/circuit/gadget/sinsemilla/merkle/chip.rs +++ b/src/circuit/gadget/sinsemilla/merkle/chip.rs @@ -53,8 +53,7 @@ impl MerkleChip { meta: &mut ConstraintSystem, sinsemilla_config: SinsemillaConfig, ) -> MerkleConfig { - // TODO: Check whether these advice columns were equality-enabled by - // SinsemillaConfig. We require all five columns to be equality-enabled. + // All five advice columns are equality-enabled by SinsemillaConfig. let advices = sinsemilla_config.advices(); let cond_swap_config = CondSwapChip::configure(meta, advices);