Skip to content

Commit

Permalink
Merge pull request #492 from b-wagn/more-doc-improve
Browse files Browse the repository at this point in the history
Improve Docs of KZGSettings
  • Loading branch information
asn-d6 authored Aug 16, 2024
2 parents b58cd9d + 086183d commit c40cc53
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
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

0 comments on commit c40cc53

Please sign in to comment.