-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implements kzg tests #364
Implements kzg tests #364
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.
looks great! I'd follow the structure of the bls tests for how to move forward
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.
amazing! left some comments
spec-tests/runners/kzg.rs
Outdated
|
||
match (input_result, output_result) { | ||
(Ok(blob), Ok(Some(expected))) => { | ||
let kzg_commitment = blob_to_kzg_commitment(&blob, &kzg_settings).unwrap(); |
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.
p sure we can just do this to simplify the code a bit
let kzg_commitment = blob_to_kzg_commitment(&blob, &kzg_settings).unwrap(); | |
let kzg_commitment = blob_to_kzg_commitment(&blob, &kzg_settings)?; |
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.
updates look good!
I would consider at this point moving each block of code in each handler to its own function so this doesn't become one huge function inside dispatch
so it would look something like
match meta.handler.0.as_str() {
"blob_to_kzg_committment" => run_blob_to_kzg_committment_test(test, &kzg_settings),
"compute_kzg_proof" => run_compute_kzg_proof_test(test, &kzg_settings),
// etc...
where each "run_*_test" fn would be something like
fn run_*_test(test: &TestCase, kzg_settings: &KzgSettings) -> Result<(), Error> {
// specific logic in here
}
118293d
to
46d7a6c
Compare
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 great! left a few comments from a quick skim, getting there!!
…for some reason)
…om `should_ignore()`
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 great! we did compute some values an additional time when we don't need to
Remove duplicate evaluations
Begins to fix #352