-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In batch cell verification, take commitment for each cell (#3834)
- Loading branch information
Showing
5 changed files
with
106 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
# Test format: Verify cell KZG proof batch | ||
|
||
Use the cell KZG `proofs` to verify that the KZG `row_commitments` for the given `cells` are correct. | ||
Use the cell KZG `proofs` to verify that the KZG `commitments` for the given `cells` are correct. | ||
|
||
## Test case format | ||
|
||
The test data is declared in a `data.yaml` file: | ||
|
||
```yaml | ||
input: | ||
row_commitments: List[Bytes48] -- the KZG commitments | ||
row_indices: List[RowIndex] -- the commitment index for each cell | ||
commitments: List[Bytes48] -- the KZG commitments for each cell | ||
column_indices: List[ColumnIndex] -- the column index for each cell | ||
cells: List[Cell] -- the cells | ||
proofs: List[Bytes48] -- the KZG proof for each cell | ||
output: bool -- true (all proofs are correct) or false (some proofs incorrect) | ||
``` | ||
- `Bytes48` is a 48-byte hexadecimal string, prefixed with `0x`. | ||
- `RowIndex` is an unsigned 64-bit integer. | ||
- `ColumnIndex` is an unsigned 64-bit integer. | ||
- `Cell` is a 2048-byte hexadecimal string, prefixed with `0x`. | ||
|
||
All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`. | ||
|
||
## Condition | ||
|
||
The `verify_cell_kzg_proof_batch` handler should verify that `row_commitments` are correct KZG commitments to `cells` by using the cell KZG proofs `proofs`, and the result should match the expected `output`. If any of the commitments or proofs are invalid (e.g. not on the curve or not in the G1 subgroup of the BLS curve), any cell is invalid (e.g. incorrect length or one of the 32-byte blocks does not represent a BLS field element), or any `cell_index` is invalid (e.g. greater than the number of cells for an extended blob), it should error, i.e. the output should be `null`. | ||
The `verify_cell_kzg_proof_batch` handler should verify that `commitments` are correct KZG commitments to `cells` by using the cell KZG proofs `proofs`, and the result should match the expected `output`. If any of the commitments or proofs are invalid (e.g. not on the curve or not in the G1 subgroup of the BLS curve), any cell is invalid (e.g. incorrect length or one of the 32-byte blocks does not represent a BLS field element), or any `cell_index` is invalid (e.g. greater than the number of cells for an extended blob), it should error, i.e. the output should be `null`. |
Oops, something went wrong.