Skip to content
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

Improve Docs of KZGSettings #492

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bindings/rust/src/bindings/generated.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 20 additions & 9 deletions src/setup/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,47 @@
/** Stores the setup and parameters needed for computing KZG proofs. */
typedef struct {
/**
* Roots of unity for the subgroup of size `domain_size`.
* Roots of unity for the subgroup of size `FIELD_ELEMENTS_PER_EXT_BLOB`.
*
* The array contains `domain_size + 1` elements, it starts and ends with Fr::one().
* The array contains `FIELD_ELEMENTS_PER_EXT_BLOB + 1` elements.
* The array starts and ends with Fr::one().
*/
fr_t *roots_of_unity;
/**
* Roots of unity for the subgroup of size `domain_size` in bit-reversed order.
* Roots of unity for the subgroup of size `FIELD_ELEMENTS_PER_EXT_BLOB` in bit-reversed order.
*
* This array is derived by applying a bit-reversal permutation to `roots_of_unity`
* excluding the last element. Essentially:
* `brp_roots_of_unity = bit_reversal_permutation(roots_of_unity[:-1])`
*
* The array contains `domain_size` elements.
* The array contains `FIELD_ELEMENTS_PER_EXT_BLOB` elements.
*/
fr_t *brp_roots_of_unity;
/**
* Roots of unity for the subgroup of size `domain_size` in reversed order.
* Roots of unity for the subgroup of size `FIELD_ELEMENTS_PER_EXT_BLOB` in reversed order.
*
* It is the reversed version of `roots_of_unity`. Essentially:
* `reverse_roots_of_unity = reverse(roots_of_unity)`
*
* This array is primarily used in FFTs.
* The array contains `domain_size + 1` elements, it starts and ends with Fr::one().
* The array contains `FIELD_ELEMENTS_PER_EXT_BLOB + 1` elements.
* The array starts and ends with Fr::one().
*/
fr_t *reverse_roots_of_unity;
/** G1 group elements from the trusted setup in monomial form. */
/**
* G1 group elements from the trusted setup in monomial form.
* The array contains `NUM_G1_POINTS = FIELD_ELEMENTS_PER_BLOB` elements.
*/
g1_t *g1_values_monomial;
/** G1 group elements from the trusted setup in Lagrange form and bit-reversed order. */
/**
* G1 group elements from the trusted setup in Lagrange form and bit-reversed order.
* The array contains `NUM_G1_POINTS = FIELD_ELEMENTS_PER_BLOB` elements.
*/
g1_t *g1_values_lagrange_brp;
/** G2 group elements from the trusted setup in monomial form. */
/**
* G2 group elements from the trusted setup in monomial form.
* The array contains `NUM_G2_POINTS` elements.
*/
g2_t *g2_values_monomial;
/** Data used during FK20 proof generation. */
g1_t **x_ext_fft_columns;
Expand Down
Loading