Commit Graph

7768 Commits

Author SHA1 Message Date
Alex Stokes 2b4613e3a3
Merge pull request #2943 from ethereum/compute_committee_indices
[Minor Refactoring] remove unused param `spec` from `compute_committee_indices`
2022-07-19 08:25:26 -06:00
Hsiao-Wei Wang 0f31fcdee4
[Refactor] remove useless `spec` param from `compute_committee_indices` 2022-07-19 22:17:35 +08:00
Hsiao-Wei Wang 3d28b37831 Add `polynomial-commitments.md` to README 2022-07-19 08:10:25 -06:00
dankrad 02a2b71d64
WIP implementation of Danksharding (#2792)
* Rough structure

* Most of the KZG checks in

* Fixes suggested by Vitalik

* Add low degree check for commitments

* Remove -1 check from degree proof (not needed)

* Require block builders to be validators to simplify things

* remove verify_intermediate_block_bid_commitment

* Rename back to process_block

* Degree check formula corrections

* Updated TOC, bid processing corrections

* Link to latest sharding doc

* Add shard samples + P2P

* Add validator guide for attestations and reconstruction

* Update specs/sharding/beacon-chain.md

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

* Update specs/sharding/beacon-chain.md

Co-authored-by: vbuterin <v@buterin.com>

* Update specs/sharding/beacon-chain.md

Co-authored-by: vbuterin <v@buterin.com>

* Refactor polynomial operations into separate file

* Add missing polynomial functions

* Fix polynomial commitment file toc levels

* Refactor the payload to make better use of unions

* Add reverse bit order convention

* Correct inequality in verify_degree_proof

* Small fix

* Fix polynomial evaluation

* Update specs/sharding/beacon-chain.md

Co-authored-by: George Kadianakis <desnacked@riseup.net>

* MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added

* Sample reconstruction estimate

* Update specs/sharding/beacon-chain.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Fix return value of roots_of_unity()

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/beacon-chain.md

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

* Update specs/sharding/beacon-chain.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/beacon-chain.md

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

* Intermediate block -> Builder block

* Some small omissions in intermediate -> builder

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

Co-authored-by: George Kadianakis <desnacked@riseup.net>

* Update specs/sharding/polynomial-commitments.md

Co-authored-by: George Kadianakis <desnacked@riseup.net>

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Update specs/sharding/polynomial-commitments.md

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

* Z1 -> inf_G1

* Fix degree proof bound

* SignedShardSample -> ShardSample

* Typo

* Don't allow 0 for `next_power_of_two`

* Remove unused `ROOT_OF_UNITY` constant

* Throwaway variable name

* Fix function documentation of `bls_modular_inverse`

* Builder block bid increase by at least 1%, no RANDAO processing in builder blocks

* Fix tocs

* Fix tocs

* Fix typo

* Update specs/sharding/polynomial-commitments.md

Co-authored-by: George Kadianakis <desnacked@riseup.net>

Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: vbuterin <v@buterin.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 11:20:25 -06:00
Etan Kissling 0941114acf
Merge branch 'dev' into lc-testsuite 2022-07-18 18:19:07 +02:00
Danny Ryan fed037fe89
Merge pull request #2940 from ethereum/fix-capella-genesis
Fix Capella genesis testing tool
2022-07-18 08:06:26 -06:00
Hsiao-Wei Wang a1546fdf4f
Merge branch 'dev' into fix-capella-genesis 2022-07-18 14:48:02 +08:00
Hsiao-Wei Wang 647e9d0ec0
PR feedback from @ralexstokes 2022-07-18 14:45:00 +08:00
Etan Kissling c9f0927d8b
Merge branch 'dev' into lc-testsuite 2022-07-17 06:34:52 +02:00
George Kadianakis 9e4f386324
Merge pull request #2937 from asn-d6/eip4844-exe-squashed-and-rebased
Executable EIP-4844 specs (PR #2901 squashed and rebased)
2022-07-16 16:59:20 +03:00
Etan Kissling 261c5317e1
Remove genesis check now that Capella is fixed
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-15 21:40:13 +02:00
Etan Kissling 63816debcc
Merge commit '9c798806355f67a32704a8cd5a98d90deccb8f69' into lc-testsuite 2022-07-15 21:38:18 +02:00
Etan Kissling 9d41c2306f
Align format of override `config.yaml` with base cfg 2022-07-15 21:37:18 +02:00
Etan Kissling 30d635259b
Move test files to `light_client` subdir 2022-07-15 21:36:26 +02:00
Hsiao-Wei Wang ec7c7c8589
Remove leftover print 2022-07-16 01:41:56 +08:00
Hsiao-Wei Wang 185f51ec0e
Merge branch 'dev' into pr2937 2022-07-16 01:40:39 +08:00
Hsiao-Wei Wang 5356fee282
Fix `test_override_config_fork_epoch` 2022-07-16 01:28:19 +08:00
Hsiao-Wei Wang ec980dae4c
Rework `blobs_sidecar` propagation guide 2022-07-16 01:13:31 +08:00
Hsiao-Wei Wang 400e1e54c1
Fix EIP4844 `create_genesis_state`, `EIP4844_FORK_VERSION`, and `config_fork_epoch_overrides`
`config_fork_epoch_overrides`: since Capella and EIP4844 are in parallel, need to check if the field exists

Update `compute_fork_version`
2022-07-16 01:13:25 +08:00
Hsiao-Wei Wang 808f9c7f7f
Use `validate_*` for the valdiation functions that return `None` 2022-07-16 00:54:01 +08:00
Hsiao-Wei Wang 4176781123
PR feedback from @djrtwo 2022-07-15 23:37:32 +08:00
Hsiao-Wei Wang a205e9314d
Make block proposal direction more clear 2022-07-15 23:33:31 +08:00
Danny Ryan d49c98c7aa
Merge pull request #2926 from ralexstokes/spec-diagnostis
Add summary diagnostics to spec test gen
2022-07-15 09:01:32 -06:00
Hsiao-Wei Wang 9c79880635
Fix genesis testing tool and add Capella version `initialize_beacon_state_from_eth1` helper 2022-07-15 22:22:19 +08:00
Etan Kissling c6cd35aea4
Tabs --> Spaces 2022-07-15 14:05:45 +02:00
Etan Kissling e75e35fad1
Update `make check_toc` list 2022-07-15 14:03:18 +02:00
Etan Kissling a126f22cd9
Sync tocs 2022-07-15 13:49:19 +02:00
Etan Kissling de15971ae8
Cleanups 2022-07-15 13:45:34 +02:00
Etan Kissling 88206117c6
Extract full node specifics to separate doc 2022-07-15 13:37:27 +02:00
Etan Kissling d06f44ef55
Move `sync-protocol.md` into `light-client` subdir 2022-07-15 13:22:14 +02:00
Etan Kissling 3c5d347cdc
Emit checks after each individual test step
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-15 13:13:33 +02:00
Etan Kissling 73279f8382
Explain why the tests check for Altair twice 2022-07-15 12:24:40 +02:00
Etan Kissling 88a69512b2
`finalize_test` --> `finish_test` 2022-07-15 12:04:56 +02:00
Etan Kissling 6146f01400
Flip order of `assert` and assignment
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-15 12:03:44 +02:00
Etan Kissling dbefbcf326
Explicitly mention optional `finalized_block` 2022-07-15 12:01:49 +02:00
Etan Kissling 95c07575b1
Hide `build_proof` and `get_backing` from spec 2022-07-15 11:54:47 +02:00
Etan Kissling 86fe93ca96
Add functions for deriving light client data
Adds `create_light_client_bootstrap` and `create_light_client_update`
functions as a reference implementation for serving light client data.
This also enables a new test harness to verify that light client data
gets applied to a `LightClientStore` as expected.
2022-07-14 09:36:09 +02:00
Hsiao-Wei Wang 3b6222d74e
Merge pull request #2935 from etan-status/lc-bootstrap
Add `LightClientBootstrap`
2022-07-14 14:01:07 +08:00
Etan Kissling 66325d0e9b
Use helper variables to make ifs more readable
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 14:08:51 +02:00
George Kadianakis 2558282e6d EIP-4844: Introduce KZG and blob verification unittests
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:14:31 +03:00
George Kadianakis 567a25f883 EIP-4844: Make the spec executable
- Implement all the required glue code to make things executable
- Implement a dummy KZG trusted setup

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:14:05 +03:00
George Kadianakis 5b9bf41de6 EIP-4844: Further improvements on the spec
- Move constants around
- Implement missing functions to make the spec executable

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:13:30 +03:00
George Kadianakis 221f3687bd EIP-4844: Improve the cryptographic parts of the spec
- Move more code into polynomial-commitments.md
- Implement aggregated sidecar verification logic from PR #2915
- Rename `kzgs` to `kzg_commitments`

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:12:31 +03:00
Etan Kissling 6048f1abf6
More concise finality ranking 2022-07-12 07:37:12 +02:00
Etan Kissling 654970c605
Add `LightClientBootstrap`
Introduces a new `LightClientBootstrap` structure to allow setting up a
`LightClientStore` with the initial sync committee and block header from
a user-configured trusted block root.

This leads to new cases where the `LightClientStore` is only aware of
the current but not the next sync committee. As a side effect of these
new cases, the store's `finalized_header` may now  advance into the next
sync committee period before a corresponding `LightClientUpdate` with
the new sync committee is obtained, improving responsiveness.

Note that so far, `LightClientUpdate.attested_header.slot` needed to be
newer than `LightClientStore.finalized_header.slot`. However, it is now
necessary to also consider certain older updates to try and backfill the
`next_sync_committee`. The `is_better_update` helper is also updated to
improve `best_valid_update` tracking.
2022-07-12 07:27:00 +02:00
Hsiao-Wei Wang 739587b9c2
Merge pull request #2932 from etan-status/lc-attestedroot
Root `next_sync_committee` in `attested_header`
2022-07-12 13:19:04 +08:00
Etan Kissling b7a0e532e4
Prefix update `period` variables 2022-07-10 22:05:18 -07:00
Etan Kissling 2ddb3833ff
Extend documentation for forced updates 2022-07-08 22:25:33 -07:00
Etan Kissling 33f572c98d
More concise sync committee finality ranking
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-08 22:05:48 -07:00
Etan Kissling fa85648385
`==` on new line
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-08 22:04:05 -07:00