From de15971ae81b7422e41546ee5a266c71d37f7fe4 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 15 Jul 2022 13:45:34 +0200 Subject: [PATCH] Cleanups --- specs/altair/light-client/sync-protocol.md | 14 +++++++------- tests/formats/sync_protocol/light_client_sync.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/specs/altair/light-client/sync-protocol.md b/specs/altair/light-client/sync-protocol.md index a7ac8e367..feda4dd5f 100644 --- a/specs/altair/light-client/sync-protocol.md +++ b/specs/altair/light-client/sync-protocol.md @@ -204,13 +204,6 @@ def get_safety_threshold(store: LightClientStore) -> uint64: ) // 2 ``` -### `compute_sync_committee_period_at_slot` - -```python -def compute_sync_committee_period_at_slot(slot: Slot) -> uint64: - return compute_sync_committee_period(compute_epoch_at_slot(slot)) -``` - ### `get_subtree_index` ```python @@ -218,6 +211,13 @@ def get_subtree_index(generalized_index: GeneralizedIndex) -> uint64: return uint64(generalized_index % 2**(floorlog2(generalized_index))) ``` +### `compute_sync_committee_period_at_slot` + +```python +def compute_sync_committee_period_at_slot(slot: Slot) -> uint64: + return compute_sync_committee_period(compute_epoch_at_slot(slot)) +``` + ## Light client initialization A light client maintains its state in a `store` object of type `LightClientStore`. `initialize_light_client_store` initializes a new `store` with a received `LightClientBootstrap` derived from a given `trusted_block_root`. diff --git a/tests/formats/sync_protocol/light_client_sync.md b/tests/formats/sync_protocol/light_client_sync.md index 6940ced87..31ecf6036 100644 --- a/tests/formats/sync_protocol/light_client_sync.md +++ b/tests/formats/sync_protocol/light_client_sync.md @@ -19,7 +19,7 @@ An SSZ-snappy encoded `bootstrap` object of type `LightClientBootstrap` to initi The steps to execute in sequence. -#### `checks` execution step +#### Checks to run after each step Each step includes checks to verify the expected impact on the `store` object.