nomos-specs/da/kzg_rs/utils.py
Daniel Sanchez 422359acd7
Da: fk20 proof generation (#95)
* Kickstart fk20

* Implement i/fft from ethspecs

* Expand test to different sizes

* Implement toeplizt

* Finish implementing fk20

* Fix roots of unity generation

* Implement fft for g1 values

* Fix fk20 and tests

* Add len assertion in test

* Fix roots computations

* Fix test

* Fix imports

* Fmt

* Docs and format
2024-06-17 09:20:11 +02:00

6 lines
105 B
Python

POWERS_OF_2 = {2**i for i in range(1, 32)}
def is_power_of_two(n) -> bool:
return n in POWERS_OF_2