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
..
2021-05-18 20:13:19 +02:00
2021-12-23 14:25:43 +08:00
toc
2022-03-22 08:22:35 -06:00
2020-10-20 17:00:16 -06:00
2021-12-23 14:25:43 +08:00
2021-12-23 14:25:43 +08:00
2021-12-27 18:30:12 +08:00
2021-12-27 18:30:12 +08:00
2022-03-22 13:37:17 -06:00
2021-10-14 22:40:29 +08:00
2021-05-18 13:59:26 +02:00
2021-12-23 14:25:43 +08:00
2021-10-15 22:49:43 +08:00
2021-12-23 14:25:43 +08:00
2020-06-19 19:09:11 +08:00
2021-05-18 09:55:25 +02:00