ethereum / py_ecc

Python implementation of ECC pairing and bn_128 and bls12_381 curve operations
MIT License
183 stars 82 forks source link

AggregateVerify accepts publc keys and messages as separate parameters, aligning README with it. #115

Closed SmartLayer closed 3 years ago

SmartLayer commented 3 years ago

What was wrong?

The code in README.md would produce the following error:

Traceback (most recent call last):
  File "test.py", line 34, in <module>
    assert bls_pop.AggregateVerify(cls, BLSSignature(agg_sig))
TypeError: AggregateVerify() missing 1 required positional argument: 'signature'

How was it fixed?

Because AggregateVerify expects a list of public keys and a list of messages as separate arguments, it has mistaken the supplied agg_sig as the list of messages and begs for the non-existing signature list. Updating document to match the code.

Cute Animal Picture

e