Skip to content

Commit

Permalink
Merge pull request powdr-labs#697 from powdr-labs/hint-query
Browse files Browse the repository at this point in the history
Implement hint query
  • Loading branch information
chriseth authored Oct 12, 2023
2 parents b48099a + 67a5826 commit b6450fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ pub fn inputs_to_query_callback<T: FieldElement>(inputs: Vec<T>) -> impl Fn(&str
print!("{}", items[1].parse::<u8>().unwrap() as char);
Some(0.into())
}
"\"hint\"" => {
assert_eq!(items.len(), 2);
Some(T::from_str(items[1]))
}
_ => None,
}
}
Expand Down
4 changes: 4 additions & 0 deletions halo2/src/mock_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ mod test {
print!("{}", items[1].parse::<u8>().unwrap() as char);
Some(0.into())
}
"\"hint\"" => {
assert_eq!(items.len(), 2);
Some(Bn254Field::from_str(items[1]))
}
_ => None,
}
};
Expand Down

0 comments on commit b6450fa

Please sign in to comment.