Skip to content

Commit

Permalink
Merge branch 'main' of github.com:manojkgorle/brainfuckvm
Browse files Browse the repository at this point in the history
  • Loading branch information
m-pandey5 committed Dec 16, 2024
2 parents b602a07 + 17b99df commit 271de79
Show file tree
Hide file tree
Showing 8 changed files with 701 additions and 381 deletions.
3 changes: 1 addition & 2 deletions src/fields/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub enum ChallengeIndices {
Eta,
}


impl Field {
pub fn new(x: u128) -> Field {
Field(x)
Expand All @@ -37,7 +36,7 @@ impl Field {
"Field does not have nth root of unity where n > 2^32 or not power of two."
);
let mut root = FieldElement::new(1753635133440165772, self);

let mut order = 1 << 32;

while order != n {
Expand Down
14 changes: 7 additions & 7 deletions src/fri/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ pub fn combination_polynomial(
FieldElement::zero(field),
FieldElement::one(field),
]);
let degree = height-1;
let degree = height - 1;
//@todo what should be degree here since processor and instruction table can have different heights
//@todo we can also pass a single vector of all quotient
//@todo we can also pass a single vector of all quotient

for i in 0..processor_q.clone().len() {
let d = degree - processor_q[i].clone().degree();
Expand Down Expand Up @@ -202,7 +202,7 @@ pub fn decommit_fri_layers(
/// sends
pub fn decommit_on_query(
idx: usize,
blow_up_factor: usize,//expansion_f
blow_up_factor: usize, //expansion_f
f_eval: Vec<&[FieldElement]>, //this contains basecodewords zipped, and extension codewords zipped
f_merkle: Vec<&MerkleTree>, //this contains MerkleTree of base codewords zipped, and extension codewords zipped
fri_layers: &[Vec<FieldElement>],
Expand Down Expand Up @@ -391,10 +391,10 @@ mod test_fri_layer {

assert_eq!(next_poly.coefficients.len(), 2);
assert_eq!(next_poly.coefficients[0].0, 11);
assert_eq!(next_poly.coefficients[1].0, 3);
assert_eq!(next_eval_domain.length, 2);
assert_eq!(next_eval_domain.omega, FieldElement::new(16, field));
assert_eq!(next_evaluations.len(), 2);
assert_eq!(next_poly.coefficients[1].0, 3);
assert_eq!(next_eval_domain.length, 2);
assert_eq!(next_eval_domain.omega, FieldElement::new(16, field));
assert_eq!(next_evaluations.len(), 2);
assert_eq!(next_evaluations[0].0, 14);
assert_eq!(next_evaluations[1].0, 8);
}
Expand Down
Loading

0 comments on commit 271de79

Please sign in to comment.