diff --git a/tests/consensus/lstar/fork_choice/test_equivocation.py b/tests/consensus/lstar/fork_choice/test_equivocation.py index 68d16144e..871aa5f0a 100644 --- a/tests/consensus/lstar/fork_choice/test_equivocation.py +++ b/tests/consensus/lstar/fork_choice/test_equivocation.py @@ -259,7 +259,7 @@ def test_same_slot_equivocating_attesters_count_once( - one vote at slot 3 targets fork_b from V0, V1, V3, V4. - V0 and V1 equivocate by voting on both forks at the same slot. - the two votes tie on slot, so the larger attestation-data root wins. - - the fork_b vote carries the larger root. + - the fork_a vote carries the larger root. When ---- @@ -267,10 +267,10 @@ def test_same_slot_equivocating_attesters_count_once( Then ---- - - V0 and V1 count once, toward fork_b. - - fork_b has effective weight 4 from V0, V1, V3, V4. - - fork_a has effective weight 1 from V2. - - head is fork_b. + - V0 and V1 count once, toward fork_a. + - fork_a has effective weight 3 from V0, V1, V2. + - fork_b has effective weight 2 from V3, V4. + - head is fork_a. - no slot is justified by the below-threshold votes. """ fork_choice_test( @@ -317,8 +317,8 @@ def test_same_slot_equivocating_attesters_count_once( TickStep( time=16, checks=StoreChecks( - head_slot=Slot(3), - head_root_label="fork_b", + head_slot=Slot(2), + head_root_label="fork_a", latest_justified_slot=Slot(0), latest_finalized_slot=Slot(0), latest_known_aggregated_target_slots=[Slot(2), Slot(3)], @@ -327,13 +327,13 @@ def test_same_slot_equivocating_attesters_count_once( validator=ValidatorIndex(0), location="known", attestation_slot=Slot(3), - target_slot=Slot(3), + target_slot=Slot(2), ), AttestationCheck( validator=ValidatorIndex(1), location="known", attestation_slot=Slot(3), - target_slot=Slot(3), + target_slot=Slot(2), ), AttestationCheck( validator=ValidatorIndex(2), @@ -379,7 +379,7 @@ def test_equivocation_head_independent_of_arrival_order_a_then_b( - V1 backs fork_a alone; V2 backs fork_b alone. - without V0 the two forks tie one-to-one, so V0's vote decides the head. - the two votes tie on slot, so the larger attestation-data root wins. - - the fork_a vote carries the larger root. + - the fork_b vote carries the larger root. When ---- @@ -390,7 +390,7 @@ def test_equivocation_head_independent_of_arrival_order_a_then_b( - V0 counts once, toward the larger-root fork. - the larger-root fork has effective weight 2. - the smaller-root fork has effective weight 1. - - head is fork_a. + - head is fork_b. - no slot is justified by the below-threshold votes. """ fork_choice_test( @@ -428,8 +428,8 @@ def test_equivocation_head_independent_of_arrival_order_a_then_b( TickStep( time=16, checks=StoreChecks( - head_slot=Slot(2), - head_root_label="fork_a", + head_slot=Slot(3), + head_root_label="fork_b", latest_justified_slot=Slot(0), latest_finalized_slot=Slot(0), attestation_checks=[ @@ -437,7 +437,7 @@ def test_equivocation_head_independent_of_arrival_order_a_then_b( validator=ValidatorIndex(0), location="known", attestation_slot=Slot(3), - target_slot=Slot(2), + target_slot=Slot(3), ), ], ), @@ -465,7 +465,7 @@ def test_equivocation_head_independent_of_arrival_order_b_then_a( - V1 backs fork_a alone; V2 backs fork_b alone. - without V0 the two forks tie one-to-one, so V0's vote decides the head. - the two votes tie on slot, so the larger attestation-data root wins. - - the fork_a vote carries the larger root. + - the fork_b vote carries the larger root. When ---- @@ -476,7 +476,7 @@ def test_equivocation_head_independent_of_arrival_order_b_then_a( - V0 counts once, toward the larger-root fork. - the larger-root fork has effective weight 2. - the smaller-root fork has effective weight 1. - - head is fork_a, matching the opposite arrival order. + - head is fork_b, matching the opposite arrival order. - no slot is justified by the below-threshold votes. """ fork_choice_test( @@ -514,8 +514,8 @@ def test_equivocation_head_independent_of_arrival_order_b_then_a( TickStep( time=16, checks=StoreChecks( - head_slot=Slot(2), - head_root_label="fork_a", + head_slot=Slot(3), + head_root_label="fork_b", latest_justified_slot=Slot(0), latest_finalized_slot=Slot(0), attestation_checks=[ @@ -523,7 +523,7 @@ def test_equivocation_head_independent_of_arrival_order_b_then_a( validator=ValidatorIndex(0), location="known", attestation_slot=Slot(3), - target_slot=Slot(2), + target_slot=Slot(3), ), ], ),