This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 856
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: modify assign function of LtChip to take
Value<F>
input instea…
…d of `F` (#1456) ### Description The PR modifies the assign function of the LtChip to take `Value<F>` input instead of `F`. According to this discussion [Halo2 - Discord](https://discord.com/channels/995022112811135148/1113747239534346250/1113854493646397621) with @therealyingtong and @ed255, it emerged how the current design of the chip makes its usage prone to bugs. For example, this is how it is currently used in summa-solvency => https://github.com/summa-dev/summa-solvency/blob/a7d0c1f51c7e146bac2686c432c945ff6f3f063f/src/chips/merkle_sum_tree.rs#L338-L354 In order to extract `F` from an assigned cell, I need to create an if conditional that performs the `assign` function only if a witness value is Some. This is a problem as the assignment function won't be called during keygen. ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### How Has This Been Tested? `cargo test less_than`
- Loading branch information
1 parent
7b77f9c
commit 06cce9f
Showing
2 changed files
with
36 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters