Commit Graph

6074 Commits

Author SHA1 Message Date
Hsiao-Wei Wang f4e3908801
Merge pull request #3868 from mkalinin/fix-consolidation
Fix off-by-one in process_pending_consolidations
2024-08-08 14:43:56 +09:00
Hsiao-Wei Wang bd396a6cee
Merge pull request #3873 from jtraglia/nits-in-7594-p2p-interface
Fix nits in eip7594 p2p-interface spec
2024-08-08 14:21:22 +09:00
Justin Traglia 54093964c9 Fix nits in eip7594 p2p-interface spec 2024-08-07 21:22:00 -05:00
Justin Traglia 80b94ba058
Fix bad suggestion 2024-08-07 15:24:48 -05:00
fradamt 06ead3aa0d
Apply suggestions from code review
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-08-07 22:13:41 +02:00
fradamt 7a6770a732 fix headers
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
2024-08-07 16:52:06 +02:00
fradamt 111123723a fix function comment 2024-08-07 15:07:37 +02:00
fradamt 376ab85406 Split peer sampling spec from das-core.md 2024-08-07 14:52:36 +02:00
fradamt 4bd2f924de custody-based fork-choice 2024-08-07 11:28:16 +02:00
terence tsao 7c1092216c p2p: clean up payload_attestation_message conditions 2024-08-06 13:30:44 -04: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 572ca9e032
Merge pull request #3821 from dapplion/csc
Add MetadataV3 with custody_subnet_count
2024-08-06 19:43:38 +09:00
Potuz 74124f521b Typo in validator.md 2024-08-02 12:50:25 -03:00
vbuterin 7ab2bbe89b
Make process_withdrawals slightly cleaner (equivalent functionality) (#3761) 2024-08-02 08:35:25 -05:00
George Kadianakis 92aeafeab9
Merge pull request #3863 from b-wagn/patch-3
EIP7594: Remove dead link
2024-08-02 15:35:21 +03: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
Benedikt Wagner ef3c9dc84d
Remove dead link to no longer existing public method. 2024-08-02 08:35:02 +02:00
b-wagn 225c486183 some punctuation 2024-07-31 17:30:36 +02:00
b-wagn 85a42cd7bf improve comments in recovery 2024-07-31 11:56:39 +02:00
Potuz b082140312 Revert "Remove block_timeliness from the store"
The damned linter complains and there's no problem having it

This reverts commit b7461ac174.
2024-07-24 16:02:53 -03:00
Potuz 0c9ca6de24 solve ties by block slot first 2024-07-23 13:31:21 -03:00
Potuz d0fad1f380 Advance best child with empty until it is higher than every children 2024-07-23 13:06:54 -03:00
Potuz b7461ac174 Remove block_timeliness from the store 2024-07-23 07:53:50 -03:00
Potuz 8c9514ecc1 Restore proposer_boost timeliness calculation 2024-07-22 16:29:55 -03:00
0xTylerHolmes 80092b1b14 remove beacon_attestation_subnet from global topics 2024-07-19 12:52:59 -04:00
Hsiao-Wei Wang a42d6706d8
Merge pull request #3811 from etan-status/lc-electra
Update light client specifications for Electra
2024-07-19 23:18:25 +08:00
kevaundray 233129122b
Replace `recover_data` with `recover_polynomialcoeff` (#3820)
* chore: remove recover_data

* make it look closer to final code

* Improve comments

* Fix lint issue

* Fix tests & clean things up a bit

* Replace a couple uses of "monomial" with "coefficient"

* Revert "Replace a couple uses of "monomial" with "coefficient""

This reverts commit c9a1a757d1a09190eee78767b3d36b2a84066e42.

* Only replace "monomial" with "coefficient"

---------

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Co-authored-by: Justin Traglia <jtraglia@pm.me>
2024-07-17 16:23:59 +03: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
Potuz 5bb25c8088 remove spurious config prefix 2024-07-15 17:11:26 -03:00
Justin Traglia 5961e26931
Remove unnecessary comment 2024-07-15 15:09:01 -05:00
Potuz 4b43b96f83 doctoc 2024-07-15 15:17:20 -03: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
Potuz 3529b46149 Fix block_header.state_root and forkchoice filtering 2024-07-15 11:31:39 -03:00
Etan Kissling 9db6d3f2ef
Remove unnecessary cast 2024-07-15 14:02:07 +02:00
Etan Kissling e2c06c32b1
Fix link 2024-07-15 13:56:54 +02:00
dapplion db717702a8 Move to peerdas eip 2024-07-11 14:07:16 +02: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 a86eeb3ee0
Freeze Altair constants at Deneb 2024-07-09 20:23:27 +02:00
Etan Kissling 63433ec847
Use separate constant names for post-Electra gindices 2024-07-09 20:15:31 +02:00
Potuz 096e5649c9 Verify kzg-commitments length with the payload 2024-07-09 13:58:10 -03:00
Justin Traglia c402414489
Merge branch 'dev' into remove-verify-cell-kzg-proof 2024-07-09 11:32:28 -05:00
Mikhail Kalinin 85b752be5e
Fix by @pawanjay176
Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
2024-07-09 18:52:23 +06:00
Alex Stokes b7149ef5fa
Update beacon-chain.md
Typo fix in deneb comment
2024-07-08 17:52:06 -06:00
Justin Traglia 8da90b2702 Fix linter issues 2024-07-08 14:20:45 -05:00
Justin Traglia 1dbb68d3d7 Update get_data_column_sidecars to take cells/proofs 2024-07-08 14:07:53 -05:00
Potuz f97f0b4ef2 use List with limit to hash withdrawals 2024-07-08 15:12:56 -03:00
Potuz 9274a66199 fix Merkle proof generator 2024-07-08 14:36:50 -03:00
Potuz 0e94fc956b Rename changed preset 2024-07-08 14:36:50 -03:00
Potuz b556420e5a linter 2 2024-07-08 14:36:50 -03:00
Potuz 19c6f84562 linter 2024-07-08 14:36:50 -03:00
Potuz 17b7905e5c modify get_blob_sidecars to use nested proof 2024-07-08 14:36:50 -03:00
Potuz 9181e2937f modify get_blob_sidecars to take the commitments 2024-07-08 14:36:49 -03:00
Potuz e93f923bb5 fix typo last_withdrawals_root 2024-07-08 14:36:49 -03:00
Potuz bb7ce4fa6e minor fixes 2024-07-08 14:36:49 -03:00
Hsiao-Wei Wang 2af6e7d22c Minor refactoring 2024-07-08 14:36:49 -03:00
terence 614284c32a Fix p2p to use eip7732 (#14) 2024-07-08 14:36:49 -03:00
Potuz 3d48e72570 Deal with attestations from previous forks 2024-07-08 14:36:49 -03:00
Potuz 53aaf26ba2 Fix python execution 7 2024-07-08 14:36:49 -03:00
Potuz 603cf53fab add fork fixes 2024-07-08 14:36:49 -03:00
Hsiao-Wei Wang b2d6e68e62 Fix and add `EIP7732_FORK_EPOCH` and `EIP7594_FORK_VERSION` 2024-07-08 14:36:49 -03:00
Potuz a11ffb5278 use definitive EIP number 2024-07-08 14:36:49 -03:00
Potuz 181ce5e9dc add type annotation 2024-07-08 14:36:49 -03:00
terence 5013e5724e Fix epbs pre fork (#13) 2024-07-08 14:36:49 -03:00
Potuz d7a199fe09 Fix python execution 3 2024-07-08 14:36:49 -03:00
Potuz 4500eabf8c Fix python execution 2 2024-07-08 14:36:49 -03:00
Potuz 2a43ce54d6 doctoc 2024-07-08 14:36:49 -03:00
Potuz ad8d71dbdb Fix python execution 1 2024-07-08 14:36:49 -03:00
Potuz 4997588793 add fake value to KZG indices 2024-07-08 14:36:49 -03:00
Potuz 752a804db6 use boolean instead of bool in forkchoice 2024-07-08 14:36:49 -03:00
Potuz 95dd081357 codespell 2024-07-08 14:36:49 -03:00
Potuz ed7f17e0bf Add gas_limit to the execution payload header 2024-07-08 14:36:49 -03:00
Potuz 25a0fdc991 doctoc 2024-07-08 14:36:49 -03:00
DanGoron 51e47ff6e4 small typo fixes (#12) 2024-07-08 14:36:49 -03:00
Potuz b7b1de93e9 Verify withdrawals only when present 2024-07-08 14:36:49 -03:00
Potuz a01f124286 modify INTEVALS_PER_SLOT 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
Potuz 0d082fdc0e Add comment about attestations and sync committee duties 2024-07-08 14:36:49 -03:00
Potuz 6d6ef7baa4 Fork logic 2024-07-08 14:36:49 -03:00
Potuz cd7dbef16f P2P changes 2024-07-08 14:36:49 -03:00
Potuz 614e14ed8a Honest Builder Guide 2024-07-08 14:36:49 -03:00
Potuz 971c57c8ea Honest validator guide 2024-07-08 14:36:49 -03:00
Potuz 673c75cab3 Forkchoice changes 2024-07-08 14:36:49 -03:00
Potuz 104fbc7372 beacon chain changes 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 228752c0d9 In batch cell verification, check if there are zero cells 2024-07-05 15:31:07 -05:00
Mikhail Kalinin ee4da7b58a Refactor postponed deposit processing 2024-07-05 18:04:38 +06:00
Mikhail Kalinin 5a2f887f76 Merge remote-tracking branch 'origin/dev' into deposit-queue 2024-07-03 17:30:16 +06:00
Justin Traglia 0daa2acdff Remove verify_kzg_proof_multi_impl too 2024-07-02 17:05:40 -05:00
Justin Traglia c078a97f0c Remove verify_cell_kzg_proof (non-batch) 2024-07-02 15:38:15 -05:00
Mikhail Kalinin 5c0a8d3b71
Fix off-by-one found by @james-prysm 2024-07-02 15:30:42 +06:00
Justin Traglia 7b72cbdfad Fix link to Deneb spec 2024-07-01 18:42:32 -05:00
Justin Traglia 77c371b22a
Replace "updated" with "modified" in Electra spec (#3823) 2024-07-01 15:36:17 -05:00
Justin Traglia 0e03d8c08d Fix beacon-chain.md section header issues 2024-06-28 14:24:49 -05: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
dapplion f25aac6adf Add MetadataV3 with custody_subnet_count 2024-06-28 15:53:29 +02:00
Mikhail Kalinin 8f6b1e0ba9 Merge remote-tracking branch 'origin/dev' into deposit-queue 2024-06-28 14:55:54 +06: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 258c2c9020
Merge pull request #3794 from cskiraly/peer-das-reconstruction
EIP-7594: clarifying reconstruction and cross-seeding
2024-06-27 18:58:23 +08:00
Csaba Kiraly 1ad381dccb
adding get_extended_sample_count docsstring
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2024-06-27 10:28:21 +02:00
Csaba Kiraly 78b583d8b0
clarify use of get_extended_sample_count
Here we assume uniform random selection without replacement.
If other methods are used, the target false positive threshold
is the main rule to follow.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2024-06-27 09:48:32 +02:00
Csaba Kiraly 17dfb9ae57
fix get_extended_sample_count proc signature
Co-authored-by: Pop Chunhapanya <haxx.pop@gmail.com>
2024-06-27 09:30:39 +02:00
dapplion 9280cc7be9 Update doctoc 2024-06-26 12:46:16 +02:00
Mikhail Kalinin 43e7344143 Refactor process_pending_deposits 2024-06-26 13:42:48 +06:00
dapplion ded072af40 Make MAX_BLOBS_PER_BLOCK a config parameter 2024-06-25 18:22:56 +02:00
Mikhail Kalinin 179ee8ee78 Finalize deposit requests before processing 2024-06-25 17:47:18 +06:00
Mikhail Kalinin 5c3a51ae79 Process deposit requests after Eth1 bridge deposits are applied 2024-06-25 17:26:17 +06:00
Lion - dapplion fcd905cb3a
Update sync-protocol.md 2024-06-25 10:52:23 +02:00
Csaba Kiraly 4539265c55
moving part of text in custody section
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2024-06-25 10:36:53 +02:00
Hsiao-Wei Wang 1f87bbeac0
Merge branch 'dev' into pr3782 2024-06-25 16:21:00 +08:00
Hsiao-Wei Wang beedf852cb
Revert division change and add comments 2024-06-25 16:15:16 +08:00
Etan Kissling 67a053d6ce
Refer to Altair gindices as that's where they were introduced 2024-06-21 14:39:01 +02:00
Etan Kissling ea04148a0d
Lint 2024-06-21 11:44: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
Mikhail Kalinin 0b7fef37b3 Limit number of pending deposits to be processed per epoch 2024-06-20 19:09:41 +06:00
Mikhail Kalinin 2a202c8ecb Refactor pending deposit processing 2024-06-20 18:46:38 +06:00
Mikhail Kalinin fd75470eab Add pending_deposits queue and queue deposit requests 2024-06-20 15:48:46 +06:00
Hsiao-Wei Wang fb020456cb
Add `get_extended_sample_count` unit tests 2024-06-19 02:18:29 +08:00
Hsiao-Wei Wang 483a286ba5
Remove `assert len(missing_cell_indices) != 0` check 2024-06-14 23:57:33 +08: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
Mikhail Kalinin aa65fd7824
Apply suggestion from @hwwhww
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2024-06-14 13:26:47 +07:00
Benedikt Wagner 77eac20df6
Update specs/_features/eip7594/polynomial-commitments-sampling.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2024-06-13 17:20:04 +02:00
Benedikt Wagner 1c675ae4a1
Update polynomial-commitments-sampling.md - Fix dead link 2024-06-13 16:30:05 +02:00
Hsiao-Wei Wang cead0f3407
Merge pull request #3768 from etan-status/at-stability
EIP-7549: Append new `committee_bits` field to end of `Attestation`
2024-06-13 22:15:51 +08:00
Hsiao-Wei Wang 43d96cff3f
Merge pull request #3772 from nalepae/patch-3
EIP-7594 - Update ENR record
2024-06-12 23:16:04 +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
Justin Traglia 93dfcdaf4c Remove compute_cells from list of public methods 2024-06-11 19:17:46 +03:00
George Kadianakis 10bac07b39 Remove compute_cells method 2024-06-11 19:17:43 +03:00
George Kadianakis 7b7ada7d46
Merge pull request #3797 from jtraglia/rename-cellid-to-cellindex
Rename `CellID` to `CellIndex`
2024-06-11 18:45:32 +03:00
Benedikt Wagner c5e9c3cb4e
Add public methods section in KZG spec (#3795) 2024-06-11 07:43:40 -05: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
Csaba Kiraly 6711acf3e2
clarifying reconstruction and cross-seeding
- when should a node reconstruct
- how to cross-seed for subscribed and unsubscribed topics

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2024-06-11 02:31:22 +02:00
Hsiao-Wei Wang e53c10edb0
Merge pull request #3791 from prestonvanloon/rename-executionlayer-objs
Electra: Rename objects with prefix ExecutionLayerXXX
2024-06-10 20:01:20 +08:00
Csaba Kiraly 2ab4f1e12e
get_extended_sample_count: use SAMPLES_PER_SLOT constant
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2024-06-10 11:16:06 +02:00
b-wagn ac105f472a update polynomial-commitments-sampling.md -- fix shift_polynomialcoeff 2024-06-06 16:36:03 +02:00
Preston Van Loon 5dec87f90f Update TOC 2024-06-05 15:24:59 -05: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
Csaba Kiraly 4c57399887
self-contained get_extended_sample_count
Importing scipy is not preferred. This is a self-contained
version. Eventually an import of math and use of math.comb
makes it simpler.
Solving other formatting issues as well.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2024-06-04 09:41:29 +02:00