update the lookup equations to reflect the changes in 091047f

This commit is contained in:
Balazs Komuves 2025-02-09 11:59:01 +01:00
parent 8bf7b291b8
commit 3c7e5c81ad
No known key found for this signature in database
GPG Key ID: F63B7AEF18435562
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ that the semantics we have to emulate, are _somewhat idiosyncratic_...
- [x] Generating verifier challenges
- [ ] Recursive circuit subtle details (like [this](https://github.com/0xPolygonZero/plonky2/blob/356aefb6863ac881fb71f9bf851582c915428458/plonky2/src/fri/challenges.rs#L55-L64]))
- [x] Constraints check
- [ ] FRI check
- [x] FRI check
- [x] Support lookup tables
- [ ] Support zero-knowledge
- [x] Documenting Plonky2 internals and the verifier algorithm (WIP)

View File

@ -104,7 +104,7 @@ evalLookupEquations (MkCommonCircuitData{..}) lkpSels openings challenges = fina
lut = fromLookupTable table
lut_nrows = length lut `divCeil` num_lut_slots -- number of rows in this table
padded_size = lut_nrows * num_lut_slots -- padded size of the table
lut_padded = take padded_size $ lut ++ repeat (0,0) -- NOTE: this padding causes a soundness bug in Plonky2
lut_padded = take padded_size $ lut ++ repeat (head lut) -- NOTE: the padding was fixed in commit 091047f
cur_eval = foldl' (\acc x -> lookup_delta * acc + x) 0
[ (inp + lookup_B * out) | (inp,out) <- lut_padded ]

View File

@ -24,9 +24,9 @@ import qualified Data.ByteString.Lazy.Char8 as L
main = do
-- let prefix = "fibonacci"
-- let prefix = "lookup"
-- let prefix = "multi_lookup"
let prefix = "multi_lookup"
-- let prefix = "recursion_middle"
let prefix = "recursion_outer"
-- let prefix = "recursion_outer"
text_common <- L.readFile ("../json/" ++ prefix ++ "_common.json")
text_vkey <- L.readFile ("../json/" ++ prefix ++ "_vkey.json" )