Add tests for SyncAggregate with no participants and all zero signature.

This commit is contained in:
Adrian Sutton 2021-07-17 16:26:18 +10:00
parent b541b8e763
commit f668b2b433
No known key found for this signature in database
GPG Key ID: 50DB9092C29D7DC6

View File

@ -113,6 +113,21 @@ def test_invalid_signature_missing_participant(spec, state):
yield from run_sync_committee_processing(spec, state, block, expect_exception=True)
@with_altair_and_later
@spec_state_test
@always_bls
def test_invalid_signature_no_participants(spec, state):
committee_indices = compute_committee_indices(spec, state, state.current_sync_committee)
block = build_empty_block_for_next_slot(spec, state)
# Exclude one participant whose signature was included.
block.body.sync_aggregate = spec.SyncAggregate(
sync_committee_bits=[False for _ in committee_indices],
sync_committee_signature=b'\x00' * 96
)
yield from run_sync_committee_processing(spec, state, block, expect_exception=True)
@with_altair_and_later
@spec_state_test
@always_bls