Skip to content

Commit 4f74348

Browse files
authored
Fix weak subjectivity checkpoint check (#4620)
1 parent 6c9cf03 commit 4f74348

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

specs/electra/weak-subjectivity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def is_within_weak_subjectivity_period(
6262
store: Store, ws_state: BeaconState, ws_checkpoint: Checkpoint
6363
) -> bool:
6464
# Clients may choose to validate the input state against the input Weak Subjectivity Checkpoint
65-
assert ws_state.latest_block_header.state_root == ws_checkpoint.root
65+
assert get_block_root(ws_state, ws_checkpoint.epoch) == ws_checkpoint.root
6666
assert compute_epoch_at_slot(ws_state.slot) == ws_checkpoint.epoch
6767

6868
# [Modified in Electra]

specs/phase0/weak-subjectivity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def is_within_weak_subjectivity_period(
182182
store: Store, ws_state: BeaconState, ws_checkpoint: Checkpoint
183183
) -> bool:
184184
# Clients may choose to validate the input state against the input Weak Subjectivity Checkpoint
185-
assert ws_state.latest_block_header.state_root == ws_checkpoint.root
185+
assert get_block_root(ws_state, ws_checkpoint.epoch) == ws_checkpoint.root
186186
assert compute_epoch_at_slot(ws_state.slot) == ws_checkpoint.epoch
187187

188188
ws_period = compute_weak_subjectivity_period(ws_state)

0 commit comments

Comments
 (0)