-
Notifications
You must be signed in to change notification settings - Fork 170
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
[fix]: VerifyCmd Flag Collision #1513
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.
Thank you! And sorry for such a delayed review. I left some comments inline. Also, some code formatting seems to be off. You can run make lint
to fix this automatically.
Hi @varun-doshi - any interest in pushing this PR over the finish line? |
Hi yes apologies for the delay |
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.
Looks good! Thank you. I left a couple more comments inline.
miden/src/cli/verify.rs
Outdated
let base_name = proof_file.file_stem().expect("Invalid proof file").to_str().unwrap(); | ||
|
||
let input_file = self.input_file.clone().unwrap_or_else(|| { | ||
let mut input_path = | ||
proof_file.parent().unwrap_or_else(|| Path::new(".")).to_path_buf(); | ||
input_path.push(base_name); | ||
input_path.set_extension("inputs"); | ||
// input_path.push(format!("{}.inputs", base_name)); | ||
input_path | ||
}); |
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 do we need to first to get the base name and then modify it. Would something like this not work?:
let input_file = self.input_file.unwrap_or_else(|| {
let mut input_path = proof_file.clone();
input_path.set_extension("inputs");
input_path
});
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.
You are right. This makes the code more compact.
Have made the necessary changes
After edits and discussions, the verify cmd works as such:
|
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.
Looks good! Thank you! Could you update the changelog and fix lint errors (to make the CI green), and then we can merge.
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.
All looks good! Thank you!
Describe your changes
Related #1421
This PR does the following:
program-hash
to-x
. No long forminfer_defaults
function which checks the directory specified by the input file passed(with-i
) to search for a.proof
and.outputs
file (only if these files are not already specified) . If these files are already specified by user, then it does not run this check.Hence the command can be called as such:
as well as such:
TODO:
Checklist before requesting a review
next
according to naming convention.