-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moved proof parser to crate, added proof as felts #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some general comments, but feel free to ignore them if you think it's not that important
/// It provides convenience methods for working with a vector of `Arg` and implements | ||
/// `Deref` to allow it to be treated like a vector of `Arg`. | ||
#[derive(Debug, Clone)] | ||
pub struct VecFelt(Vec<Felt>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Arg
here, where the type is Felt
?
impl<'de> Visitor<'de> for VecFelt { | ||
type Value = VecFelt; | ||
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
formatter.write_str("a list of arguments") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a more elaborate expectation?
} | ||
|
||
impl VecFelt { | ||
fn visit_seq_helper(seq: &[Value]) -> Result<Self, VecFeltError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit complicated, I suggest creating an enum that would be easily deserializable and adding a converter function to VecFelt
. The logic will remain the same but the intent would be much clearer
I included proof parsing to felt from https://github.com/HerodotusDev/integrity/tree/main/runner/src
and changed there Felt252 from cairo-felt to Felt from starknet_types_core