Closed luxebeng closed 3 months ago
There is a compile error for the latest branch which related to enumerate_ref, and it's replaced by a workaround.
enumerate_ref
error: cannot pass `|(&_, &crypto_algebra::Element<bn254_algebra::Fr>)|` to a function which expects argument of type `|(u64, &crypto_algebra::Element<bn254_algebra::Fr>)|` ┌─ /Users/benliu/work/zkmove/halo2-verifier.move/packages/verifier/sources/shplonk.move:237:44 │ 237 │ vector::enumerate_ref(&points, |k, x_k| { │ ╭────────────────────────────────────────────^ 238 │ │ if (k != j) { 239 │ │ vector::push_back(&mut denom, bn254_utils::invert(&crypto_algebra::sub(x_j, x_k))); 240 │ │ }; 241 │ │ }); │ ╰─────────────^ error: cannot pass `|(&_, &crypto_algebra::Element<bn254_algebra::Fr>)|` to a function which expects argument of type `|(u64, &crypto_algebra::Element<bn254_algebra::Fr>)|` ┌─ /Users/benliu/work/zkmove/halo2-verifier.move/packages/verifier/sources/shplonk.move:234:40 │ 234 │ vector::enumerate_ref(&points, |j, x_j| { │ ╭────────────────────────────────────────^ 235 │ │ let denom = vector::empty(); 236 │ │ 237 │ │ vector::enumerate_ref(&points, |k, x_k| { · │ 243 │ │ vector::push_back(&mut denoms, denom); 244 │ │ }); │ ╰─────────^
There is a compile error for the latest branch which related to
enumerate_ref
, and it's replaced by a workaround.