eth2.0-specs/tests/core/pyspec/eth2spec/test/helpers
Etan Kissling c4dbd241ac
Root `next_sync_committee` in `attested_header`
`LightClientUpdate` structures currently use different merkle proof root
depending on the presence of `finalized_header`. By always rooting it in
the same state (the `attested_header.state_root`), logic gets simpler.

Caveats:
- In periods of extended non-finality, `update.finalized_header` may now
  be outdated by several sync committee periods. The old implementation
  rejected such updates as the `next_sync_committee` in them was stale,
  but the new implementation can properly handle this case.
- The `next_sync_committee` can no longer be considered finalized based
  on `is_finality_update`. Instead, waiting until `finalized_header` is
  in the `attested_header`'s sync committee period is now necessary.
- Because `update.finalized_header > store.finalized_header` no longer
  holds (for updates with finality), an `is_better_update` helper is
  added to improve `best_valid_update` tracking (in the past, finalized
  updates with supermajority participation would always directly apply)

This PR builds on prior work from:
- @hwwhww at https://github.com/ethereum/consensus-specs/pull/2829
2022-07-01 14:49:24 -07:00
..
altair test generator fixes 2021-05-18 20:13:19 +02:00
bellatrix Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
capella toc 2022-03-22 08:22:35 -06:00
__init__.py reorg specs by fork and move ssz out to own folder. make all of the build and link changes to support move 2020-01-10 11:55:13 -07:00
attestations.py Move more unit tests to test vectors 2021-06-30 04:55:41 +08:00
attester_slashings.py multi-op tests 2020-10-20 17:00:16 -06:00
block.py Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
block_header.py reorg specs by fork and move ssz out to own folder. make all of the build and link changes to support move 2020-01-10 11:55:13 -07:00
block_processing.py Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
constants.py Resolve conflicts 2021-12-27 18:30:12 +08:00
custody.py Fix depth calculation...again(!) and add unittests 2020-12-16 15:01:22 +08:00
deposits.py fix validator state during deposit randomization 2021-08-19 07:43:15 -06:00
epoch_processing.py Partial withdrawals (#2862) 2022-06-08 13:16:12 -06:00
execution_payload.py Partial withdrawals (#2862) 2022-06-08 13:16:12 -06:00
fork_choice.py Fix `test_discard_equivocations` test vectors 2022-03-09 10:16:37 +08:00
fork_transition.py Resolve conflicts 2021-12-27 18:30:12 +08:00
genesis.py test address_change 2022-03-22 13:37:17 -06:00
inactivity_scores.py PR feedback 2021-10-14 22:40:29 +08:00
keys.py update test util 2021-05-18 13:59:26 +02:00
light_client.py Root `next_sync_committee` in `attested_header` 2022-07-01 14:49:24 -07:00
merkle.py Fix depth calculation...again(!) and add unittests 2020-12-16 15:01:22 +08:00
multi_operations.py Merge pull request #2570 from ralexstokes/fix-deposits-randomized-tests 2021-08-26 17:47:03 -06:00
pow_block.py Merge pull request #2726 from ethereum/get_pow_block_at_ttd-tests 2021-11-19 09:37:11 -07:00
proposer_slashings.py Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
random.py Fix SSZ underflow 2021-10-15 22:49:43 +08:00
rewards.py Merge -> Bellatrix 2021-12-23 14:25:43 +08:00
shard_block.py Refactor 2020-06-19 19:09:11 +08:00
state.py Use spec function for total active balance 2021-09-07 12:23:57 -07:00
sync_committee.py add test case for active/exited difference for sync rewards processing 2021-09-02 09:50:39 -07:00
typing.py updated config util 2021-05-18 09:55:25 +02:00
voluntary_exits.py ensure the test covers exited, unslashed validators 2021-09-02 08:48:32 -07:00