Skip to content

lookup_any的一个取0问题 #36

Answered by dajuguan
mdj33 asked this question in Q&A
Oct 31, 2023 · 3 comments · 2 replies
Discussion options

You must be logged in to vote
  • 问题复现: 采用lookup_any进行查找约束,输入witness列包含0, 如[2,0,4]; 查找table未填满,比如为[2,4,6,8]。
  • 期望结果: 因为table中不包含0, 期望lookup失败。
  • 实际结果: lookup约束成功
  • 原因: 默认在lookup_any时会把该table未填满的部分补零(区别于lookup则是pad table的第一row的值)。假设k=3, 则table变为[2,4,6,8,0,0,0,0]
  • 复现代码: https://github.com/dajuguan/halo2_research/blob/main/src/lookup_padding.rs

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@dajuguan
Comment options

Answer selected by Demian101
@Demian101
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants