Skip to content

Commit

Permalink
fix: no panic for degree missing
Browse files Browse the repository at this point in the history
  • Loading branch information
eigmax committed Aug 15, 2023
1 parent 897a8e9 commit be33b49
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions starky/src/starkinfo_Z.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ impl StarkInfo {
let z = E::cm(pu_ctx.z_id, None);
let zp = E::cm(pu_ctx.z_id, Some(true));

if pil.references.get(&"first_step".to_string()).is_none() {
panic!("first_step must be defined");
if pil.references.get(&"main.first_step".to_string()).is_none() {
panic!("main.first_step must be defined: {:?}", pil.references);
}

let l1 = E::const_(pil.references[&"first_step".to_string()].id, None);
let l1 = E::const_(pil.references[&"main.first_step".to_string()].id, None);
let mut c1 = E::mul(&l1, &E::sub(&z, &E::number("1".to_string())));
c1.deg = 2;

Expand Down Expand Up @@ -207,10 +207,10 @@ impl StarkInfo {
let z = E::cm(self.pe_ctx[i].z_id, None);
let zp = E::cm(self.pe_ctx[i].z_id, Some(true));

if pil.references.get(&"first_step".to_string()).is_none() {
panic!("first_step must be defined");
if pil.references.get(&"main.first_step".to_string()).is_none() {
panic!("main.first_step must be defined");
}
let l1 = E::const_(pil.references[&"first_step".to_string()].id, None);
let l1 = E::const_(pil.references[&"main.first_step".to_string()].id, None);
let mut c1 = E::mul(&l1, &E::sub(&z, &E::number("1".to_string())));
c1.deg = 2;

Expand Down Expand Up @@ -364,10 +364,10 @@ impl StarkInfo {
let z = E::cm(ci_ctx.z_id, None);
let zp = E::cm(ci_ctx.z_id, Some(true));

if pil.references.get(&"first_step".to_string()).is_none() {
panic!("first_step must be defined");
if pil.references.get(&"main.first_step".to_string()).is_none() {
panic!("main.first_step must be defined");
}
let l1 = E::const_(pil.references[&"first_step".to_string()].id, None);
let l1 = E::const_(pil.references[&"main.first_step".to_string()].id, None);
let mut c1 = E::mul(&l1, &E::sub(&z, &E::number("1".to_string())));
c1.deg = 2;

Expand Down

0 comments on commit be33b49

Please sign in to comment.