Fix to verify bitfields and aggregate signature.
In blockprocessing, `crosslink_committee` is not defined. This is a fix. In Phase 0 this check is redundant since we've already asserted that the custody bitfield is all zero, but it will matter in later phases.
This commit is contained in:
parent
989aae5dc6
commit
fb75c6dd55
|
@ -1632,7 +1632,8 @@ For each `attestation` in `block.body.attestations`:
|
||||||
assert attestation.custody_bitfield == b'\x00' * len(attestation.custody_bitfield) # [TO BE REMOVED IN PHASE 1]
|
assert attestation.custody_bitfield == b'\x00' * len(attestation.custody_bitfield) # [TO BE REMOVED IN PHASE 1]
|
||||||
assert attestation.aggregation_bitfield != b'\x00' * len(attestation.aggregation_bitfield)
|
assert attestation.aggregation_bitfield != b'\x00' * len(attestation.aggregation_bitfield)
|
||||||
|
|
||||||
for i in range(len(crosslink_committee)):
|
assert len(attestation.aggregation_bitfield) <= len(attestation.custody_bitfield)
|
||||||
|
for i in range(len(attestation.aggregation_bitfield)):
|
||||||
if get_bitfield_bit(attestation.aggregation_bitfield, i) == 0b0:
|
if get_bitfield_bit(attestation.aggregation_bitfield, i) == 0b0:
|
||||||
assert get_bitfield_bit(attestation.custody_bitfield, i) == 0b0
|
assert get_bitfield_bit(attestation.custody_bitfield, i) == 0b0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue