From d0b4dc2b0164c626df766b25ad6ecddd57de9a18 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Tue, 27 Aug 2019 09:16:02 -0600 Subject: [PATCH] remove bad length checks from process attestation; ensure committee count and committee size not equal --- specs/core/0_beacon-chain.md | 5 ----- test_libs/pyspec/eth2spec/test/context.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 01a6ca352..4970a3b00 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1615,11 +1615,6 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None: proposer_index=get_beacon_proposer_index(state), ) - # Check bitlist lengths - committee_size = get_committee_count(state, attestation.data.target.epoch) - assert len(attestation.aggregation_bits) == committee_size - assert len(attestation.custody_bits) == committee_size - if data.target.epoch == get_current_epoch(state): assert data.source == state.current_justified_checkpoint parent_crosslink = state.current_crosslinks[data.crosslink.shard] diff --git a/test_libs/pyspec/eth2spec/test/context.py b/test_libs/pyspec/eth2spec/test/context.py index 5cc42c510..9f7fc41d4 100644 --- a/test_libs/pyspec/eth2spec/test/context.py +++ b/test_libs/pyspec/eth2spec/test/context.py @@ -10,7 +10,7 @@ from .utils import vector_test, with_meta_tags def with_state(fn): def entry(*args, **kw): try: - kw['state'] = create_genesis_state(spec=kw['spec'], num_validators=spec_phase0.SLOTS_PER_EPOCH * 8) + kw['state'] = create_genesis_state(spec=kw['spec'], num_validators=spec_phase0.SLOTS_PER_EPOCH * 9) except KeyError: raise TypeError('Spec decorator must come within state decorator to inject spec into state.') return fn(*args, **kw)