Commit Graph

5744 Commits

Author SHA1 Message Date
Hsiao-Wei Wang 15e48f712b
Fix Phase 1 epoch_processing and fix epoch_processing testgen 2021-01-27 03:02:12 +08:00
Danny Ryan b47f083168
Merge pull request #2181 from ethereum/adjust_minimal_config
Adjust minimal config and fix sync committee tests
2021-01-26 08:05:28 -06:00
Hsiao-Wei Wang 1e7c33810f
Merge pull request #2189 from ralexstokes/duplicate-sync-committee-patch
test refactor to use helper for duplicates in light client committees
2021-01-22 09:55:52 +08:00
Aditya Asgaonkar c932fc2798 Fix linter errors 2021-01-21 17:07:45 -08:00
Alex Stokes 0e415fe7c7 comments no longer apply 2021-01-21 15:39:04 -08:00
Alex Stokes 3847e425b1 refactor to use helper for duplicates in light client committees, rather than config changes 2021-01-21 15:39:04 -08:00
Hsiao-Wei Wang 17a04c2728
PR feedback from @ralexstokes 2021-01-21 23:03:44 +08:00
Aditya Asgaonkar 900eb4a83c Fixed CI errors 2021-01-20 19:33:25 -08:00
Hsiao-Wei Wang e53213a585
Minor refactor 2021-01-20 13:06:24 +08:00
Hsiao-Wei Wang 93d19bdf40
Update and add tests 2021-01-19 22:03:01 +08:00
Hsiao-Wei Wang fa6094837b
Update lightclient patch and phase1 specs 2021-01-19 22:03:00 +08:00
Hsiao-Wei Wang daa4798704
Break down process_final_updates 2021-01-19 21:41:55 +08:00
Justin 12593e8782
Update comments 2021-01-19 12:52:40 +00:00
Hsiao-Wei Wang f3d7dee71f
Apply @djrtwo's suggestion 2021-01-19 20:44:21 +08:00
Hsiao-Wei Wang fb0c6d54f8
Add @ralexstokes's fix 2021-01-19 20:27:18 +08:00
Hsiao-Wei Wang c877d142bd
Add duplicate elements warning to the docstring 2021-01-19 20:24:25 +08:00
Hsiao-Wei Wang c5d9aa2502
Fix test cases for minimal and mainnet configs 2021-01-19 20:00:43 +08:00
Aditya Asgaonkar 93c4c62900
Remove python tag from fenced code block 2021-01-19 02:04:55 -08:00
Aditya Asgaonkar 37874f9b79 Update WS calc 2021-01-19 01:53:12 -08:00
Danny Ryan 977cc6bd81
Merge pull request #2184 from ethereum/attestation-typo
p2p spec, fix typo: same condition, but non-aggregate attestation here
2021-01-18 08:51:26 -06:00
protolambda 65696ca68b
fix typo: same condition, but non-aggregate attestation here 2021-01-16 22:48:22 +01:00
Hsiao-Wei Wang 2a6699290f
Revert "Fix SyncCommittee"
This reverts commit b2658f1091.
2021-01-14 01:47:40 +08:00
Hsiao-Wei Wang b2658f1091
Fix SyncCommittee
1. Make `get_sync_committee_indices` do not return duplicate indices
2. Pad default values to Vectors
2021-01-13 20:12:52 +08:00
Hsiao-Wei Wang 002dfaa891
Set minimal config's `SYNC_COMMITTEE_SIZE` to 32 2021-01-13 19:15:32 +08:00
Hsiao-Wei Wang 50765edc30
Set minimal config's `EPOCHS_PER_SYNC_COMMITTEE_PERIOD` to 8 2021-01-13 15:11:38 +08:00
Hsiao-Wei Wang a340f30e61
Merge branch 'dev' into accounting-reform 2021-01-13 14:44:17 +08:00
Hsiao-Wei Wang 252c331255
Fix existing tests on #2176 (accounting reform) (#2180)
* Fixing tests

* Add `is_post_lightclient_patch` helper to determine the fork version condition
2021-01-13 14:29:18 +08:00
Danny Ryan f73189c30f
Merge pull request #2175 from ralexstokes/add-light-client-tests
Add light client tests
2021-01-12 11:52:42 -06:00
Alex Stokes e518c4d04d update test to use fresh sync committees
the way the test infra is built we end up with
two identical sync committees at epoch 0.
2021-01-12 09:31:07 -08:00
Hsiao-Wei Wang f113413e5b
Fix ToC 2021-01-11 18:06:37 +08:00
Alex Stokes 5001588285 Add additional sync committee tests 2021-01-07 12:53:16 -08:00
Alex Stokes ac6dbd1c35 Add sync committee test for signature over incorrect block 2021-01-07 11:28:21 -08:00
Alex Stokes 61d141b4db Use more clear names for tests 2021-01-07 10:57:54 -08:00
Alex Stokes 1a3fefcc93 Refactor epoch processing test helpers 2021-01-07 10:55:51 -08:00
Alex Stokes 049075b44a Refactor sync committee helpers 2021-01-07 10:42:21 -08:00
Alex Stokes 7e82b54131
Update tests/core/pyspec/eth2spec/test/lightclient_patch/block_processing/test_process_sync_committee.py
Add clarifying comment

Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-01-07 09:45:20 -08:00
Hsiao-Wei Wang ce87914326
Fix the 2/3 threshold calculation
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-01-07 11:14:32 +08:00
Alex Stokes cc7ae4abd0 Add test for sync committee block rewards 2021-01-06 10:25:55 -08:00
Alex Stokes 547cb0f38f Add epoch processing test for sync committee updates 2021-01-06 09:45:17 -08:00
Alex Stokes 781f344409 Add test for invalid sync committee signature 2021-01-06 09:45:17 -08:00
Alex Stokes 955a01c49b Add basic test for invalid sync committee bits 2021-01-06 09:45:17 -08:00
Alex Stokes b94af435da Refactor helpers into separate module 2021-01-06 09:45:17 -08:00
Danny Ryan ca35773d2b
Merge pull request #2178 from ethereum/ralexstokes-patch-1
Bugfix in sync committee proposer rewards
2021-01-06 10:47:28 -06:00
Alex Stokes a3bf632b4f
Bugfix in sync committee proposer rewards
The variable used to accumulate proposer rewards across the sync committee processing was shadowed by the per-participant proposer reward.

This means the total proposer reward would simply be twice the output of `get_proposer_reward` for the last participant in the sync committee.

I believe we want to sum all contributions to the proposer reward across sync committee participants which is what this PR does.
2021-01-06 08:39:21 -08:00
Hsiao-Wei Wang 5cb47a4ecb
Merge pull request #2173 from farazdagi/ws-fix-typo
Fix typo
2021-01-06 13:34:43 +08:00
Victor Farazdagi 70e25e6390
Update specs/phase0/weak-subjectivity.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-01-05 21:13:35 -08:00
Danny Ryan 271b9dff83
toc 2021-01-05 14:17:34 -07:00
Danny Ryan b8d3589b46
remove global quotient penalties from fork spec [temp] 2021-01-05 13:48:26 -07:00
Hsiao-Wei Wang 9c75c3819d
Fix `previous_epoch_participation` and `current_epoch_participation` initialization 2021-01-06 02:09:39 +08:00
Hsiao-Wei Wang 53ad66a4e8
Arrange constants and configurations 2021-01-06 01:11:46 +08:00