You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Altair spec currently uses a function bls.AggregatePKs to aggregate a batch of BLS pubkeys in the function get_sync_committee.
This function is defined internal to the pyspec code but is not specified in the IETF signature standard which, according to the spec, is our source of bls functionality.
I'd say it is worth considering defining a helper like eth2_fast_aggregate_verify for this routine for the completeness of the spec.
defeth2_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) ->BLSPubkey:
""" Return the aggregate public key for the public keys in ``pubkeys``. NOTE: the `+` operation should be interpreted as elliptic curve point addition, which takes as input elliptic curve points that must be decoded from the input `BLSPubkey`s. This implementation is for demonstrative purposes only and ignores encoding/decoding concerns. Refer to the BLS signature draft standard for more information. """assertlen(pubkeys) >0result=copy(pubkeys[0])
forpubkeyinpubkeys[1:]:
result+=pubkeyreturnresult
The text was updated successfully, but these errors were encountered:
If we do so, can we be more explicit about pubkey copies here?
result = pubkeys[0] and result += looks like in-place modification of the pubkey, but it shouldn't look like it changes the inputs (even though it doesn't). We could change it to start at 0, or copy() it.
The Altair spec currently uses a function
bls.AggregatePKs
to aggregate a batch of BLS pubkeys in the functionget_sync_committee
.This function is defined internal to the
pyspec
code but is not specified in the IETF signature standard which, according to the spec, is our source ofbls
functionality.I'd say it is worth considering defining a helper like
eth2_fast_aggregate_verify
for this routine for the completeness of the spec.edit: implementation incorporating feedback below:
The text was updated successfully, but these errors were encountered: