Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic gate #679

Closed
wants to merge 0 commits into from
Closed

Fix logic gate #679

wants to merge 0 commits into from

Conversation

moCello
Copy link
Member

@moCello moCello commented Apr 25, 2022

The assert at the end of the logic_gate function did not pass for bit_num = 256. The problem was in the unfortunate fact that the BlsScalar created from the bit_mask = [u64::MAX, u64::MAX, u64::MAX, u64::MAX] is in fact invalid. It seems that all BlsScalars created with the from_raw function are invalid if the raw value is larger than the MODULO.

@moCello moCello added the team:Core Low Level Core Development Team (Rust) label Apr 25, 2022
@moCello moCello self-assigned this Apr 25, 2022
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #679 (4d4e73c) into master (4a672c5) will decrease coverage by 0.01%.
The diff coverage is 93.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #679      +/-   ##
==========================================
- Coverage   82.05%   82.03%   -0.02%     
==========================================
  Files          54       54              
  Lines        4418     4437      +19     
==========================================
+ Hits         3625     3640      +15     
- Misses        793      797       +4     
Impacted Files Coverage Δ
src/constraint_system/logic.rs 93.07% <93.84%> (-2.42%) ⬇️
src/plonkup/multiset.rs 73.62% <0.00%> (-0.55%) ⬇️
src/proof_system/prover.rs 88.44% <0.00%> (-0.33%) ⬇️
src/permutation.rs 90.00% <0.00%> (+0.21%) ⬆️
src/fft/polynomial.rs 41.32% <0.00%> (+0.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a672c5...4d4e73c. Read the comment docs.

@moCello moCello force-pushed the mocello/fix_logic branch from 8d65b14 to 21b23e2 Compare April 25, 2022 13:11
@moCello moCello linked an issue May 2, 2022 that may be closed by this pull request
@moCello moCello force-pushed the mocello/fix_logic branch 3 times, most recently from af15ed7 to 4d4e73c Compare May 2, 2022 13:20
@moCello moCello requested a review from ureeves May 2, 2022 13:32
@moCello moCello closed this May 2, 2022
@moCello moCello force-pushed the mocello/fix_logic branch from 4d4e73c to 15fb5af Compare May 2, 2022 15:24
@moCello moCello deleted the mocello/fix_logic branch January 3, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:Core Low Level Core Development Team (Rust)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assert in logic gate fails for larger input
1 participant