61 Commits

Author SHA1 Message Date
Pawan Dhananjay
78cc0a6e91
Change csc types to uint64 2024-08-30 12:25:26 -07:00
Barnabas Busa
a5990f99ac
EIP-7594: PeerDAS explicit csc integer size (#3897)
* EIP-7594: PeerDAS explicit csc integer size

* add spec test for csc int size

* import uint8

* make linter happy

* add spec

* Update p2p-interface.md

* Update specs/_features/eip7594/das-core.md

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>

* revert metadata name

* Update specs/_features/eip7594/das-core.md

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>

* update tests

* make linter happy

* Make `DATA_COLUMN_SIDECAR_SUBNET_COUNT` in uint8

* add `int` casting for bypassing remerkeable type conversion

---------

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2024-08-29 02:43:34 +08:00
Justin Traglia
121a3b7b24 Fix mistake 2024-08-14 20:32:11 -05:00
Justin Traglia
4eee3b0c3b Remove matrix specific configuration value
This also removes references to the "extended matrix" in favor of just "matrix"
which I think is better. It's not an extended matrix, it's a matrix of extended
blobs. Technically it's just a matrix of cells/proofs.
2024-08-14 20:19:50 -05:00
George Kadianakis
bb8f3caafc
Merge pull request #3836 from jtraglia/columns-cells-and-proofs
Update get_data_column_sidecars to take cells/proofs
2024-07-16 18:25:24 +03:00
Hsiao-Wei Wang
b4432fbef8
Merge pull request #3817 from dapplion/max-blobs-config
Make MAX_BLOBS_PER_BLOCK a config parameter
2024-07-16 22:27:13 +08:00
Justin Traglia
252b852a61
Rename column_index to cell_index in KZG spec (#3841)
* Rename column_index to cell_index in KZG spec

* Fix table of contents

* Replace list(set()) with set()

* Change coset_evals to cell_indices in some places

* Remove punctuation in table description

* Remove "row" from comments & improve docstring

* Replace unique with deduplicated
2024-07-15 19:41:33 +03:00
George Kadianakis
dc5f74da0e
Merge pull request #3830 from jtraglia/remove-verify-cell-kzg-proof
Remove `verify_cell_kzg_proof` (non-batch)
2024-07-10 19:49:58 +03:00
Justin Traglia
9a9fa965b0
In batch cell verification, take commitment for each cell (#3834) 2024-07-10 10:41:37 -05:00
Justin Traglia
c402414489
Merge branch 'dev' into remove-verify-cell-kzg-proof 2024-07-09 11:32:28 -05:00
Justin Traglia
1dbb68d3d7 Update get_data_column_sidecars to take cells/proofs 2024-07-08 14:07:53 -05:00
Justin Traglia
b9e7b031b5 Update algorithm & remove check 2024-07-08 09:00:14 -05:00
Justin Traglia
c078a97f0c Remove verify_cell_kzg_proof (non-batch) 2024-07-02 15:38:15 -05:00
Etan Kissling
b4f44caef3
Fix EL block hash computation for Deneb
The parent beacon block hash was incorrectly set to zero in #3778.
Passing the state to the computation function allows correct hash
computation.
2024-07-02 16:26:04 +02:00
Benedikt Wagner
83da3807ab
EIP7594: Do universal verification in verify_cell_kzg_proof_batch() (#3812)
* restructure verify_cell_kzg_proof_batch a bit

* first draft of universal verification equation

* add one more empty line to make linter happy

* make linter happy

* more testcases for verify_cell_kzg_proof_batch

* verify_cell_kzg_proof_batch: derive coefficient via hash

* rename verify_cell_kzg_proof_batch_challenge -> compute_verify_cell_kzg_proof_batch_challenge

* verify_cell_kzg_proof_batch: editorial + some refactoring

* Improve documentation and variable naming.

* remove k_i from code and doc

---------

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-06-28 18:02:20 +03:00
kevaundray
a3a6c916b2
Remove proof parameter from recover_cells_and_kzg_proofs (#3819) 2024-06-27 14:17:14 -05:00
dapplion
ded072af40 Make MAX_BLOBS_PER_BLOCK a config parameter 2024-06-25 18:22:56 +02:00
Hsiao-Wei Wang
ee977381de
Add test_get_extended_sample_count__table_in_spec to verify the table content in the spec 2024-06-25 16:48:38 +08:00
Hsiao-Wei Wang
1f87bbeac0
Merge branch 'dev' into pr3782 2024-06-25 16:21:00 +08:00
Hsiao-Wei Wang
fb020456cb
Add get_extended_sample_count unit tests 2024-06-19 02:18:29 +08:00
b-wagn
2aeddf2f86 remove trailing whitespaces 2024-06-14 15:18:00 +02:00
b-wagn
7095e14b60 extend test for coset_fft 2024-06-14 14:59:22 +02:00
b-wagn
fc62e59778 extend test for eip7594 2024-06-14 14:23:53 +02:00
kevaundray
6efab19ad0
chore: Refactor cell recovery code (#3781)
* multi:

- Remove shift_polynomial_coeff
- Remove recover_shifted_data
- Remove recover_original_data
- Move `zero_poly_eval_brp ` under sanity check comment as its only used for sanity checking

* chore: remove sanity check -- this was doing a wasteful `compute_root_of_unity` operation

* chore: add previous sanity check as a unit test

* chore: copy values python was taking a reference, so it passes in our regular codepaths but not in isolated test

* chore: add coset_fft test

* Update specs/_features/eip7594/polynomial-commitments-sampling.md

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>

* Update specs/_features/eip7594/polynomial-commitments-sampling.md

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>

* chore: linter

* chore: asn (switch to bls_modular_inverse)

* chore: (ben) rename func to test_construct_vanishing_polynomial

* chore: (ben) rename `extended_evaluations_coeffs` to `extended_evaluation_times_zero_coeffs`

* chore: compute `roots_of_unity_extended` in recover_data method

* chore: add more comments explaining whats happening in recover_data

* chore: compute_zero_poly_coeff in recover_data

* chore: make lint

* chore: add doc comment to coset_fft_field

* chore: (ben) add code to generate the vanishing polynomial when all cells are missing

* chore: remove handling of edge case when constructing a vanishing polynomial

* chore: rename H(x) to Q_3(x)

* chore: remove trailing whitespace

* chore: add whitespace between comments

* chore: (asn) add assert that num missing cells is not 0

* chore: (justin) address comments

* chore: merge resolution

* chore: fixup remaining IDs -> indices

* chore: use indice nomenclature in tests

---------

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-06-11 20:26:19 +03:00
Justin Traglia
d137553f96 Rename CellID to CellIndex 2024-06-11 07:41:52 -05:00
Justin Traglia
5ace424cd8
recover_cells_and_kzg_proofs & matrix refactor (#3788)
* Recover cells and proofs & matrix clean up

* Fix table of contents

* Update reference tests generator

* Update test format

* Remove unused imports

* Fix some minor nits

* Rename MatrixEntry's proof to kzg_proof

* Move RowIndex & ColumnIndex to das-core
2024-06-11 14:52:24 +03:00
Andrew Davis
d295813155
EIP-7594: add custody settings config (#3766)
* EIP-7594: add custody settings config

* Add `TARGET_NUMBER_OF_PEERS` to config

* add TARGET_NUMBER_OF_PEERS

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>

* fix double TARGET_NUMBER_OF_PEERS

* fix tests

---------

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2024-05-15 20:34:41 +08:00
Hsiao-Wei Wang
c9e0e6d5df
Add a short node_id test 2024-05-07 21:47:16 +08:00
Hsiao-Wei Wang
9c1acbb5e5
Fix get_custody_columns 2024-05-06 17:25:47 +08:00
Kevaundray Wedderburn
fa550212c7 lint 2024-05-03 17:10:08 +01:00
Kevaundray Wedderburn
a18c05e7e2 add assert 2024-05-03 17:06:09 +01:00
Hsiao-Wei Wang
b681552cf3
Use bls.use_fastest() in default testgen 2024-04-27 16:23:08 +08:00
Justin Traglia
b4188829b3 Rename compute_cells_and_proofs to compute_cells_and_kzg_proofs 2024-04-25 21:57:22 -05:00
Justin Traglia
ac1ce3b3f0 Rename verify_cell_proof to verify_cell_kzg_proof 2024-04-25 17:31:22 -05:00
Hsiao-Wei Wang
e1d71216bb
Merge pull request #3715 from ethereum/das-test-vectors
Make `get_custody_columns` return sorted values and add `get_custody_columns` tests
2024-04-25 03:01:51 +08:00
Hsiao-Wei Wang
24899b7fba
Apply suggestions from @jtraglia 2024-04-24 19:04:40 +08:00
Hsiao-Wei Wang
57c14e5400
Add get_custody_columns tests 2024-04-23 20:21:33 +08:00
Justin Traglia
bcd0a09e68
Integrate new Coset/CosetEvals types (#3701)
* Add CellBytes type

* Use ByteVector, not Vector

* Fix tests

* Replace b"" with []

* Apply suggestions for bytes_to_cell

* Add/integrate new CosetEvals type

* Remove accidental new line

* Fix recover_all_cells

* Fix recover_matrix

* fix CosetEvals abstraction leak

* Introduce internal Coset type for `coset_for_cell()`

* Use CosetEvals in compute_kzg_proof_multi_impl()

* update test

* satisfy linter

* Fix two nits I noticed

---------

Co-authored-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2024-04-22 17:03:57 +03:00
Kevaundray Wedderburn
3f2d498cee rename 2024-04-22 13:02:42 +01:00
Hsiao-Wei Wang
e46c4c39fb workaround: add a new config MAX_EXTENDED_MATRIX_SIZE to avoid class Container(List[c, a*b]) 2024-04-22 10:31:58 +01:00
Justin Traglia
8707a4c2c1 Fix test_recover_all_cells 2024-04-19 11:18:11 -05:00
Kevaundray Wedderburn
988412ec2c modify test 2024-04-19 12:53:47 +01:00
Kevaundray Wedderburn
b06d431eb6 fix lint 2024-04-18 18:28:10 +01:00
Kevaundray Wedderburn
c9e1291860 update tests 2024-04-18 18:14:32 +01:00
Justin Traglia
3dcf9ebe54 Use FIELD_ELEMENTS_PER_EXT_BLOB in NUMBER_OF_COLUMNS 2024-04-09 08:44:30 -05:00
Hsiao-Wei Wang
5535e6a2ab
fix conflict 2024-04-04 22:55:16 +09:00
Hsiao-Wei Wang
8728561da3
Merge branch 'dev' into peer-das 2024-04-04 22:23:02 +09:00
Hsiao-Wei Wang
89564aaaa6
Add unittest to check FIELD_ELEMENTS_PER_EXT_BLOB value 2024-03-12 21:51:58 +08:00
George Kadianakis
c71fb00c8e PeerDAS: Check for degree overflow in multiply_polynomialcoeff() 2024-03-08 18:04:55 +02:00
Hsiao-Wei Wang
cebf78a83e
Apply PR feedback 2024-02-27 22:42:32 +09:00