From 9bf8ad91306a055e251d83017252f9d751a0e2f3 Mon Sep 17 00:00:00 2001 From: Antonio Sanso Date: Thu, 2 Sep 2021 11:00:51 +0200 Subject: [PATCH 1/5] Update test_process_sync_aggregate.py --- .../sync_aggregate/test_process_sync_aggregate.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py index 4be6737e2..58acdbdde 100644 --- a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py +++ b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py @@ -23,7 +23,6 @@ from eth2spec.test.context import ( always_bls, ) - @with_altair_and_later @spec_state_test @always_bls @@ -33,9 +32,8 @@ def test_invalid_signature_bad_domain(spec, state): random_participant = rng.choice(committee_indices) 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=[index != random_participant for index in committee_indices], + sync_committee_bits= committee_indices, sync_committee_signature=compute_aggregate_sync_committee_signature( spec, state, From 2d736139d51cb8204cc10cb6522784f9b8177346 Mon Sep 17 00:00:00 2001 From: Antonio Sanso Date: Thu, 2 Sep 2021 11:19:58 +0200 Subject: [PATCH 2/5] Update test_process_sync_aggregate.py --- .../sync_aggregate/test_process_sync_aggregate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py index 58acdbdde..fdb872d6e 100644 --- a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py +++ b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py @@ -33,7 +33,7 @@ def test_invalid_signature_bad_domain(spec, state): block = build_empty_block_for_next_slot(spec, state) block.body.sync_aggregate = spec.SyncAggregate( - sync_committee_bits= committee_indices, + sync_committee_bits=committee_indices, sync_committee_signature=compute_aggregate_sync_committee_signature( spec, state, From 2206a583351a4e1bd8b27e230241b912e91f321f Mon Sep 17 00:00:00 2001 From: Antonio Sanso Date: Thu, 2 Sep 2021 11:33:12 +0200 Subject: [PATCH 3/5] Update test_process_sync_aggregate.py --- .../sync_aggregate/test_process_sync_aggregate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py index fdb872d6e..840d1d63d 100644 --- a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py +++ b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py @@ -23,6 +23,7 @@ from eth2spec.test.context import ( always_bls, ) + @with_altair_and_later @spec_state_test @always_bls From 5f1a444e70ef6c597bff1781ec1ab39d319fef36 Mon Sep 17 00:00:00 2001 From: Antonio Sanso Date: Thu, 2 Sep 2021 11:34:42 +0200 Subject: [PATCH 4/5] Update test_process_sync_aggregate.py --- .../sync_aggregate/test_process_sync_aggregate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py index 840d1d63d..95e0284d2 100644 --- a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py +++ b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py @@ -29,8 +29,6 @@ from eth2spec.test.context import ( @always_bls def test_invalid_signature_bad_domain(spec, state): committee_indices = compute_committee_indices(spec, state, state.current_sync_committee) - rng = random.Random(2020) - random_participant = rng.choice(committee_indices) block = build_empty_block_for_next_slot(spec, state) block.body.sync_aggregate = spec.SyncAggregate( From ae8c0447efbd89004107d4e15ca07b103f648737 Mon Sep 17 00:00:00 2001 From: Antonio Sanso Date: Thu, 2 Sep 2021 14:57:47 +0200 Subject: [PATCH 5/5] Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py Co-authored-by: Alex Stokes --- .../sync_aggregate/test_process_sync_aggregate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py index 95e0284d2..bd52ce727 100644 --- a/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py +++ b/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py @@ -32,7 +32,7 @@ def test_invalid_signature_bad_domain(spec, state): block = build_empty_block_for_next_slot(spec, state) block.body.sync_aggregate = spec.SyncAggregate( - sync_committee_bits=committee_indices, + sync_committee_bits=[True] * len(committee_indices), sync_committee_signature=compute_aggregate_sync_committee_signature( spec, state,