Cleanups
This commit is contained in:
parent
88206117c6
commit
de15971ae8
|
@ -204,13 +204,6 @@ def get_safety_threshold(store: LightClientStore) -> uint64:
|
||||||
) // 2
|
) // 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`
|
### `get_subtree_index`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
@ -218,6 +211,13 @@ def get_subtree_index(generalized_index: GeneralizedIndex) -> uint64:
|
||||||
return uint64(generalized_index % 2**(floorlog2(generalized_index)))
|
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
|
## 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`.
|
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`.
|
||||||
|
|
|
@ -19,7 +19,7 @@ An SSZ-snappy encoded `bootstrap` object of type `LightClientBootstrap` to initi
|
||||||
|
|
||||||
The steps to execute in sequence.
|
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.
|
Each step includes checks to verify the expected impact on the `store` object.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue