remove bad length checks from process attestation; ensure committee count and committee size not equal
This commit is contained in:
parent
2abb81d4e9
commit
d0b4dc2b01
|
@ -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]
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue