crate-crypto / go-eth-kzg

Apache License 2.0
29 stars 22 forks source link

Change `findRootIndex` to use a an int64 #13

Closed GottfriedHerold closed 1 year ago

GottfriedHerold commented 1 year ago

This PR changes some index variables from plain ints to uint64 / int64s. The reason is that Domain.Cardinality can be up to 2^32, so signed indices could overflow if int is only 32 bits (the Go spec allows int to be either 32 or 64 bits). Note that this also contains some other commits (duplicated in the other PRs) that would otherwise cause merge conflicts. I fully expect (harmless) merge conflicts with #12 to happen anyway, so I guess #12 should be resolved first.