Skip to content

Commit

Permalink
Revert leftover
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Apr 1, 2024
1 parent ce591f9 commit 4408837
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,7 @@ def test_invalid_too_few_aggregation_bits(spec, state):
next_slots(spec, state, spec.MIN_ATTESTATION_INCLUSION_DELAY)

attestation.aggregation_bits = Bitlist[spec.MAX_VALIDATORS_PER_COMMITTEE](
*([0b1] + [0b0] * (len(attestation.aggregation_bits) - 1))
)
*([0b1] + [0b0] * (len(attestation.aggregation_bits) - 1)))

sign_attestation(spec, state, attestation)

Expand Down
14 changes: 3 additions & 11 deletions tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ def _apply_base_block_a(spec, state, store, test_steps):
assert spec.get_head(store) == signed_block_a.message.hash_tree_root()


def _get_aggregation_bits(spec, attestation):
aggregation_bits = attestation.aggregation_bits
return aggregation_bits


@with_altair_and_later
@spec_state_test
def test_ex_ante_vanilla(spec, state):
Expand Down Expand Up @@ -83,8 +78,7 @@ def _filter_participant_set(participants):
spec, state_b, slot=state_b.slot, signed=False, filter_participant_set=_filter_participant_set
)
attestation.data.beacon_block_root = signed_block_b.message.hash_tree_root()
aggregation_bits = _get_aggregation_bits(spec, attestation)
assert len([i for i in aggregation_bits if i == 1]) == 1
assert len([i for i in attestation.aggregation_bits if i == 1]) == 1
sign_attestation(spec, state_b, attestation)

# Block C received at N+2 — C is head
Expand Down Expand Up @@ -186,8 +180,7 @@ def _filter_participant_set(participants):
spec, state_b, slot=state_b.slot, signed=False, filter_participant_set=_filter_participant_set
)
attestation.data.beacon_block_root = signed_block_b.message.hash_tree_root()
aggregation_bits = _get_aggregation_bits(spec, attestation)
assert len([i for i in aggregation_bits if i == 1]) == participant_num
assert len([i for i in attestation.aggregation_bits if i == 1]) == participant_num
sign_attestation(spec, state_b, attestation)

# Attestation_set_1 received at N+2 — B is head because B's attestation_score > C's proposer_score.
Expand Down Expand Up @@ -311,8 +304,7 @@ def _filter_participant_set(participants):
spec, state_c, slot=state_c.slot, signed=False, filter_participant_set=_filter_participant_set
)
attestation.data.beacon_block_root = signed_block_c.message.hash_tree_root()
aggregation_bits = _get_aggregation_bits(spec, attestation)
assert len([i for i in aggregation_bits if i == 1]) == 1
assert len([i for i in attestation.aggregation_bits if i == 1]) == 1
sign_attestation(spec, state_c, attestation)

# Block D at slot `N + 3`, parent is B
Expand Down

0 comments on commit 4408837

Please sign in to comment.