Commit Graph

2049 Commits

Author SHA1 Message Date
Mikhail Kalinin 5e06787db8
Apply suggestions by @fradamt
Co-authored-by: fradamt <104826920+fradamt@users.noreply.github.com>
2024-08-07 15:54:50 +06:00
Hsiao-Wei Wang 8f8ab03acf
Merge pull request #3828 from potuz/epbs_cl_repo
EIP-7732: Enshrined Proposer-Builder Separation
2024-08-07 01:19:53 +09:00
Mikhail Kalinin b665698350 Fix off-by-one in process_pending_balance_deposits 2024-08-06 17:29:13 +06:00
Mikhail Kalinin fcca2b5c71 Fix off-by-one in process_pending_consolidations 2024-08-06 17:17:26 +06:00
Hsiao-Wei Wang b5cea48d45
bump to 1.5.0-alpha.4 2024-08-03 19:14:40 +09:00
Mikhail Kalinin 10becc58b7
Merge pull request #3595 from etan-status/bf-safehash
Rename `get_safe_execution_payload_hash` -> `*_block_hash`
2024-08-02 18:31:10 +06:00
Hsiao-Wei Wang b394b27e2b
Merge pull request #3848 from ethereum/jtraglia-eip7594-format-fix
Update description for test format
2024-08-02 11:42:41 +09:00
Agnish Ghosh 31c23f8dbf
Remove compute_cells test format 2024-07-31 12:09:16 -05:00
Justin Traglia 2d59c55524 Fix indentation for kzg_7594 tests
Somehow (probably because of a merge conflict) the last three
verify_cell_kzg_proof_batch test cases were indented too far and as a result
were part of the loop above, and as a result executed multiple times. This
doesn't change the generated tests because it would try to do the same test
with the same inputs.
2024-07-25 17:07:53 +09:00
Justin Traglia f3dcc597e4
Update description for test format 2024-07-18 16:18:30 -05:00
Etan Kissling 460d46ddcd
Merge branch 'dev' into lc-electra 2024-07-17 13:30:30 +02: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
Etan Kissling 82fe862a47
Fix lint 2024-07-09 21:22:30 +02:00
Etan Kissling 63433ec847
Use separate constant names for post-Electra gindices 2024-07-09 20:15:31 +02: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
Hsiao-Wei Wang eb3382faa5 Disable eip7732 tests like whisk-style 2024-07-08 14:36:49 -03:00
Potuz dba3cda3aa Fix python execution 6 2024-07-08 14:36:49 -03:00
Potuz e3cd216d3a Fix python execution 5 2024-07-08 14:36:49 -03:00
Potuz e9a8ddad03 Fix python execution 4 2024-07-08 14:36:49 -03:00
Potuz a11ffb5278 use definitive EIP number 2024-07-08 14:36:49 -03:00
terence 6e02cb4ea4 Fix epbs consensus spec to be executable (#10)
Fix epbs consensus spec to be executable
2024-07-08 14:36:49 -03:00
Justin Traglia b9e7b031b5 Update algorithm & remove check 2024-07-08 09:00:14 -05:00
Justin Traglia 1189d52526 Remove VALID_INDIVIDUAL_RANDOM_CELL_BYTES import 2024-07-02 16:35:28 -05:00
Justin Traglia c078a97f0c Remove verify_cell_kzg_proof (non-batch) 2024-07-02 15:38:15 -05:00
Etan Kissling a63bad0c09
Fix Deneb `test_process_execution_payload` 2024-07-02 19:56:14 +02: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
Alex Stokes 090d349faf
Merge pull request #3764 from ethereum/electra-fork-tests
Add more Electra fork tests
2024-07-01 13:32:45 -06: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
Hsiao-Wei Wang 0a49572799
Merge pull request #3782 from cskiraly/peer-das-sampling
PeerDAS sampling clarifications
2024-06-27 19:27:57 +08:00
Hsiao-Wei Wang 29f39487de
Merge pull request #3814 from ethereum/update-consolidation-tests
Update `test_incorrect_not_enough_consolidation_churn_available` and add assertions to test cases
2024-06-27 00:17:52 +08:00
dapplion 25b810f5a4 lint 2024-06-26 11:01:50 +02: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 f30a3a3b05
Update `test_incorrect_not_enough_consolidation_churn_available` and add assertions to test cases 2024-06-24 23:38:01 +08:00
Etan Kissling 835576a47c
Enable light client data test generation for Electra 2024-06-21 14:49:33 +02:00
Etan Kissling 2035a9fcad
Update light client specifications for Electra
Electra introduces two changes that affect light client data handling:

1. The `ExecutionPayloadHeader` is extended with new fields.
   This is handled similarly as before with the Deneb fork.

2. The `BeaconState` generalized indices change due to lack of EIP-6493.
   This is handled by making the generalized index be fork dependent via
   a helper function that computes it dynamically. Furthermore, the case
   where pre-Electra light client data is consumed by an Electra based
   `LightClientStore` requires normalizing the shorter proof of the
   pre-Electra data to fit into the Electra data structure by prepending
   a zero hash.
2024-06-21 11:33:52 +02:00
Etan Kissling 2c384da092
Fix typing issue when `10e10` is interpreted as float
On macOS Python, passing `10e10` to `rng.randint` results in an error
when generating certain tests. Forcing `int` avoids the problem.
2024-06-21 10:51:18 +02:00
Hsiao-Wei Wang 29d3a24f46
Merge pull request #3763 from ethereum/electra-merkle-proof-tests
Add Electra merkle proof test vectors
2024-06-19 16:40:36 +08:00
Hsiao-Wei Wang fb020456cb
Add `get_extended_sample_count` unit tests 2024-06-19 02:18:29 +08:00
Hsiao-Wei Wang 7064b1a2e8
Merge pull request #3805 from ethereum/fix-testgen
fix typo
2024-06-14 23:55:23 +08:00
Hsiao-Wei Wang ae654d2281
fix typo 2024-06-14 23:05:41 +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
Hsiao-Wei Wang ca6485012f
Merge pull request #3783 from mkalinin/electra-maxeb-preset
Switch the rest of the spec to MAX_EFFECTIVE_BALANCE_ELECTRA
2024-06-14 16:34:24 +08:00
Hsiao-Wei Wang 718aadf263
Fix tests and remove duplicate `_WITHDRAWAL_PREFIX` definition 2024-06-14 15:57:33 +08:00
Hsiao-Wei Wang 490c89a3c2
bump version to `1.5.0-alpha.3` 2024-06-13 23:42:36 +08:00
Hsiao-Wei Wang a24837b12c
Merge pull request #3778 from jtraglia/electra-block-hash
Update compute_el_header_block_hash for EIP-7685
2024-06-12 22:49:49 +08: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
George Kadianakis 10bac07b39 Remove compute_cells method 2024-06-11 19:17:43 +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
Justin Traglia 83cb494e31 Rename receipt to request 2024-06-10 11:28:54 -05:00
Justin Traglia 0298370af2 Fix rlp_bytes methods 2024-06-10 11:28:18 -05:00
Hsiao-Wei Wang 12f0e7cc44
Merge branch 'dev' into pr3778 2024-06-10 22:40:17 +08:00
Hsiao-Wei Wang 99dfc9ab5b
Update file names 2024-06-07 23:41:05 +08:00
Preston Van Loon 5910aeed4d Rename ExecutionLayerConsolidationRequest->ConsolidationRequest 2024-06-05 15:12:56 -05:00
Preston Van Loon 2e6c59393f Rename ExecutionLayerWithdrawalRequest->WithdrawalRequest 2024-06-05 15:12:56 -05:00
Hsiao-Wei Wang 3644f360b8
Merge pull request #3757 from mkalinin/receipt-to-request
Rename DepositReceipt to DepositRequest
2024-06-05 14:41:01 +08:00
Hsiao-Wei Wang 12d95da0da
Merge branch 'dev' into pr3757 2024-06-05 00:42:37 +08:00
Hsiao-Wei Wang 4223bc0ae6
Merge branch 'dev' into pr3776 2024-06-05 00:34:22 +08:00
Hsiao-Wei Wang 0de125274c
Merge pull request #3775 from fradamt/EL-consolidations
EL-triggered consolidations
2024-06-04 23:31:12 +08:00
Mikhail Kalinin eb0cdc72e8 Update tests 2024-05-31 22:02:22 +06:00
Justin Traglia 9b15abc798 Append "_bytes" to modified RLP functions 2024-05-31 08:53:18 -05:00
Hsiao-Wei Wang 79d67ba8e2
minor refactor 2024-05-31 21:47:50 +08:00
Hsiao-Wei Wang ffebf88de5
Fix testgen and test format 2024-05-31 19:50:59 +08:00
Hsiao-Wei Wang 744ae2e687
Add EIP-6800 linter checks.
Fix the lint errors.
Remove custom type `StateDiff` and then use `List[StemStateDiff, MAX_STEMS]` directly in `ExecutionWitness`.
2024-05-28 16:24:11 +08:00
Justin Traglia 12cab5a864 Make request type a bytes type 2024-05-23 16:17:29 -05:00
Justin Traglia d46e4aa36b Split long line into two 2024-05-23 15:55:16 -05:00
Justin Traglia 1d02110a68 Update compute_el_header_block_hash for EIP-7685 2024-05-23 15:30:49 -05:00
fradamt 69ee35d4e3 handle top-ups to exiting/exited validators 2024-05-22 12:31:22 +02:00
fradamt 6a731e9115 fix lint 2024-05-22 10:03:03 +02:00
fradamt 1970b56f8f add consolidation_requests_root to get_execution_payload_header test helper 2024-05-22 09:37:16 +02:00
fradamt f0ef76ada1 minor fixes 2024-05-21 23:03:34 +02:00
fradamt 6b6936836a Revert "minor fixes, doctoc"
This reverts commit dc2a2bd85a.
2024-05-21 22:54:25 +02:00
fradamt c17f22fedc add missing decorators 2024-05-21 22:46:44 +02:00
fradamt dc2a2bd85a minor fixes, doctoc 2024-05-21 22:30:14 +02:00
fradamt 7c4b32a717 renaming consolidations to consolidation_requests 2024-05-21 22:29:30 +02:00
fradamt 17c51488eb add tests for remaining failure cases 2024-05-21 22:29:30 +02:00
fradamt c492d6198a adjust consolidations tests for EL consolidations 2024-05-21 22:27:06 +02:00
terence tsao eb380c1e83 Remove Deneb from all phases 2024-05-20 12:25:29 -07:00
Hsiao-Wei Wang 0f5f155d1b
fix typo (#3771) 2024-05-17 14:38:58 +08: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
George Kadianakis fdeff744ff
EIP-7594: Add a missing check and a missing test vector (#3765) 2024-05-14 17:18:14 +03:00
George Kadianakis e5813bd692
Merge pull request #3758 from jtraglia/improve-dup-cell-test
Change duplicate cell id test to use 65 cell ids
2024-05-14 17:14:56 +03:00
Hsiao-Wei Wang 8b264704aa
Add `test_fork_pre_activation` test case 2024-05-13 15:37:32 +03:00
Hsiao-Wei Wang 01a2c7ba07
Add `test_fork_has_compounding_withdrawal_credential` test case 2024-05-13 15:27:52 +03:00
Hsiao-Wei Wang 94535a6a58
Add Electra merkle proof test vectors 2024-05-13 14:35:28 +03:00
Justin Traglia 0891be24f6 Change cell -> cells 2024-05-07 13:34:35 -05:00
Justin Traglia cd0f8a1201 Change duplicate cell id test to use 65 cell ids 2024-05-07 13:25:53 -05:00
Mikhail Kalinin d8c486bcc5 Rename DepositReceipt to DepositRequest 2024-05-07 23:34:03 +06:00
Hsiao-Wei Wang 2cef9ae076
bump version v1.5.0-alpha.2 2024-05-07 22:45:00 +08:00
Hsiao-Wei Wang 313a64e9c1
Merge pull request #3748 from ethereum/fix-get_custody_columns
Fix `get_custody_columns`
2024-05-07 22:43:46 +08:00