Skip to content

Commit

Permalink
[FIX] Broken integration test caused by transcript (#715) (#721)
Browse files Browse the repository at this point in the history
This PR has fixed issue #715 by respect the assertion in `from_base`
method of the Godilock extension field

Notice there is two method `from_base` and `form_limbs` in the
`ExtensionField` trait which is not well illustrated and maybe we should
update them later.

The two running mentioned in #715 have been success under this PR

`cargo run --package ceno_zkvm --bin e2e -- --platform=sp1
ceno_zkvm/examples/fibonacci.elf`

`cargo run --package ceno_zkvm --example riscv_opcodes
-- --start 10 --end 11`
  • Loading branch information
noel2004 authored Dec 10, 2024
1 parent 5cc6959 commit 79ce99f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion transcript/src/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ impl<E: ExtensionField> Transcript<E> for BasicTranscript<E> {
}

fn read_challenge(&mut self) -> Challenge<E> {
let r = E::from_bases(self.permutation.squeeze());
// notice `from_bases` and `from_limbs` has the same behavior but
// `from_bases` has a sanity check for length of input slices
// while `from_limbs` use the first two fields silently
// we select `from_base` here to make it being more clear that
// we only use the first 2 fields here to construct the
// extension field (i.e. the challenge)
let r = E::from_bases(&self.permutation.squeeze()[..2]);

Challenge { elements: r }
}
Expand Down

0 comments on commit 79ce99f

Please sign in to comment.