-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: Initial impl for KZG10 #234
base: master
Are you sure you want to change the base?
Conversation
This is related to #162 -- one can use this branch to check that the difference in using monomial form is actually negligible while it results in much simpler code |
// Bit reverse the polynomial and interpolate it. | ||
// | ||
// The bit-reversal is an artifact of a feature we want to maintain | ||
// when we use FK20. | ||
let mut poly_lagrange = polynomial_lagrange.to_vec(); | ||
reverse_bit_order(&mut poly_lagrange); | ||
let polynomial_coeff = domain.ifft_scalars(poly_lagrange); | ||
|
||
let quotient_poly = divide_by_linear(&polynomial_coeff, input_point); | ||
let quotient_commitment = commit_key.commit_g1(quotient_poly.as_slice()); | ||
let claimed_evaluation = poly_eval(&polynomial_coeff, &input_point); |
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.
None of these methods are actually new -- they are all a part of eip7594 specs, so in a way this does not add any new complexity
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.
- divide_by_linear is a simpler version of
divide_polynomialcoeff
where b is a linear polynomial - poly_eval is
evaluate_polynomial_coeff
- commit_g1 is g1_lincomb
blst = { version = "0.3", default-features = false } | ||
blst = { version = "0.3", default-features = false, features = ["no-threads"] } |
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 would usually be controlled by the threadpool, but since its not been integrated, I just turn off all threads
This provides an initial impl for some of the methods needed in Deneb, however we compute the quotient commitment using the "conventional" strategy of commiting to the quotient polynomial in monomial form.