Skip to content

Commit

Permalink
Use bellatrix in upgrade_x_to_capella helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
etan-status committed Jan 13, 2023
1 parent a580f82 commit 514d443
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions specs/capella/light-client/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ This document describes how to upgrade existing light client objects based on th
A Capella `LightClientStore` can still process earlier light client data. In order to do so, that pre-Capella data needs to be locally upgraded to Capella before processing.

```python
def upgrade_lc_header_to_capella(pre: altair.LightClientHeader) -> LightClientHeader:
def upgrade_lc_header_to_capella(pre: bellatrix.LightClientHeader) -> LightClientHeader:
return LightClientHeader(
beacon=pre.beacon,
)
```

```python
def upgrade_lc_bootstrap_to_capella(pre: altair.LightClientBootstrap) -> LightClientBootstrap:
def upgrade_lc_bootstrap_to_capella(pre: bellatrix.LightClientBootstrap) -> LightClientBootstrap:
return LightClientBootstrap(
header=upgrade_lc_header_to_capella(pre.header),
current_sync_committee=pre.current_sync_committee,
Expand All @@ -38,7 +38,7 @@ def upgrade_lc_bootstrap_to_capella(pre: altair.LightClientBootstrap) -> LightCl
```

```python
def upgrade_lc_update_to_capella(pre: altair.LightClientUpdate) -> LightClientUpdate:
def upgrade_lc_update_to_capella(pre: bellatrix.LightClientUpdate) -> LightClientUpdate:
return LightClientUpdate(
attested_header=upgrade_lc_header_to_capella(pre.attested_header),
next_sync_committee=pre.next_sync_committee,
Expand All @@ -51,7 +51,7 @@ def upgrade_lc_update_to_capella(pre: altair.LightClientUpdate) -> LightClientUp
```

```python
def upgrade_lc_finality_update_to_capella(pre: altair.LightClientFinalityUpdate) -> LightClientFinalityUpdate:
def upgrade_lc_finality_update_to_capella(pre: bellatrix.LightClientFinalityUpdate) -> LightClientFinalityUpdate:
return LightClientFinalityUpdate(
attested_header=upgrade_lc_header_to_capella(pre.attested_header),
finalized_header=upgrade_lc_header_to_capella(pre.finalized_header),
Expand All @@ -62,7 +62,7 @@ def upgrade_lc_finality_update_to_capella(pre: altair.LightClientFinalityUpdate)
```

```python
def upgrade_lc_optimistic_update_to_capella(pre: altair.LightClientOptimisticUpdate) -> LightClientOptimisticUpdate:
def upgrade_lc_optimistic_update_to_capella(pre: bellatrix.LightClientOptimisticUpdate) -> LightClientOptimisticUpdate:
return LightClientOptimisticUpdate(
attested_header=upgrade_lc_header_to_capella(pre.attested_header),
sync_aggregate=pre.sync_aggregate,
Expand All @@ -75,7 +75,7 @@ def upgrade_lc_optimistic_update_to_capella(pre: altair.LightClientOptimisticUpd
Existing `LightClientStore` objects based on Altair MUST be upgraded to Capella before Capella based light client data can be processed. The `LightClientStore` upgrade MAY be performed before `CAPELLA_FORK_EPOCH`.

```python
def upgrade_lc_store_to_capella(pre: altair.LightClientStore) -> LightClientStore:
def upgrade_lc_store_to_capella(pre: bellatrix.LightClientStore) -> LightClientStore:
if pre.best_valid_update is None:
best_valid_update = None
else:
Expand Down

0 comments on commit 514d443

Please sign in to comment.