Fulu -- Polynomial Commitments Sampling¶
- Introduction
- Public Methods
- Custom types
- Cryptographic types
- Preset
- Blob
- Helper functions
- BLS12-381 helpers
- FFTs
- Polynomials in coefficient form
- KZG multiproofs
- Cell cosets
- Cells
- Cell computation
- Cell verification
- Reconstruction
- construct_vanishing_polynomial
- recover_polynomialcoeff
- recover_cells_and_kzg_proofs
Introduction¶
This document extends polynomial-commitments.md with the functions required for data availability sampling (DAS). It is not part of the core Deneb spec but an extension that can be optionally implemented to allow nodes to reduce their load using DAS.
Public Methods¶
For any KZG library extended to support DAS, functions flagged as "Public method" MUST be provided by the underlying KZG library as public functions. All other functions are private functions used internally by the KZG library.
Public functions MUST accept raw bytes as input and perform the required cryptographic normalization before invoking any internal functions.
The following is a list of the public methods:
Custom types¶
| Name | SSZ equivalent | Description | 
|---|---|---|
| Cell | ByteVector[BYTES_PER_FIELD_ELEMENT * FIELD_ELEMENTS_PER_CELL] | The unit of blob data that can come with its own KZG proof | 
| CellIndex | uint64 | Validation: x < CELLS_PER_EXT_BLOB | 
| CommitmentIndex | uint64 | The type which represents the index of an element in the list of commitments | 
Cryptographic types¶
| Name | SSZ equivalent | Description | 
|---|---|---|
| PolynomialCoeff | List[BLSFieldElement, FIELD_ELEMENTS_PER_EXT_BLOB] | A polynomial in coefficient form | 
| Coset | Vector[BLSFieldElement, FIELD_ELEMENTS_PER_CELL] | The evaluation domain of a cell | 
| CosetEvals | Vector[BLSFieldElement, FIELD_ELEMENTS_PER_CELL] | A cell's evaluations over its coset | 
Preset¶
Blob¶
Cells are the smallest unit of blob data that can come with their own KZG proofs. Samples can be constructed from one or several cells (e.g. an individual cell or line).
| Name | Value | Description | 
|---|---|---|
| FIELD_ELEMENTS_PER_EXT_BLOB | 2 * FIELD_ELEMENTS_PER_BLOB | Number of field elements in a Reed-Solomon extended blob | 
| FIELD_ELEMENTS_PER_CELL | uint64(64) | Number of field elements in a cell | 
| BYTES_PER_CELL | FIELD_ELEMENTS_PER_CELL * BYTES_PER_FIELD_ELEMENT | The number of bytes in a cell | 
| CELLS_PER_EXT_BLOB | FIELD_ELEMENTS_PER_EXT_BLOB // FIELD_ELEMENTS_PER_CELL | The number of cells in an extended blob | 
| RANDOM_CHALLENGE_KZG_CELL_BATCH_DOMAIN | b'RCKZGCBATCH__V1_' | 
Helper functions¶
BLS12-381 helpers¶
cell_to_coset_evals¶
coset_evals_to_cell¶
FFTs¶
_fft_field¶
fft_field¶
coset_fft_field¶
compute_verify_cell_kzg_proof_batch_challenge¶
Polynomials in coefficient form¶
polynomial_eval_to_coeff¶
add_polynomialcoeff¶
multiply_polynomialcoeff¶
divide_polynomialcoeff¶
interpolate_polynomialcoeff¶
vanishing_polynomialcoeff¶
evaluate_polynomialcoeff¶
KZG multiproofs¶
Extended KZG functions for multiproofs
compute_kzg_proof_multi_impl¶
verify_cell_kzg_proof_batch_impl¶
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |  |