ethereum / py_ecc

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

[EXPERIMENT] Fields as subclass of int #54

Open Bhargavasomu opened 5 years ago

Bhargavasomu commented 5 years ago

What is wrong?

Currently, the FQ and FQP fields have a lot of isinstance checks. This can be eradicated by making the classes subclasses of int.

Reference Comment - https://github.com/ethereum/py_ecc/pull/41#discussion_r262129838

How can it be fixed

Fill this in if you know how to fix it.