diff --git a/benchmarks/zkalc.nim b/benchmarks/zkalc.nim index c4308ca4..fb452d66 100644 --- a/benchmarks/zkalc.nim +++ b/benchmarks/zkalc.nim @@ -32,6 +32,9 @@ import # Third-party jsony, cliche +# Workarounds generic sandwich bug in 1.6.x +from constantine/named/algebras import matchingBigInt, matchingOrderBigInt, getLimbs2x + type ZkalcBenchDetails = object `range`: seq[int] @@ -110,7 +113,7 @@ template bench(body: untyped): AggStats = # We can store integers up to 2⁵³ in a float64 without loss of precision (see also ulp) # 1 billion is ~ 2³⁰, so you would need 2²³ seconds = 8388608s = 13 weeks 6 days 2 hours 10 minutes 8 seconds - stats.push(elapsedNs) + stats.push(elapsedNs.int) (stats, batchSize) diff --git a/constantine/named/zoo_subgroups.nim b/constantine/named/zoo_subgroups.nim index 2a9e584e..2942ade0 100644 --- a/constantine/named/zoo_subgroups.nim +++ b/constantine/named/zoo_subgroups.nim @@ -33,7 +33,7 @@ export func clearCofactor*[EC](P: var EC) {.inline.} = ## Clear the cofactor of a point on the curve ## From a point on the curve, returns a point on the subgroup of order r - when EC.getName() in {BN254_Nogami, BN254_Snarks, BLS12_377, BLS12_381}: + when EC.F.Name in {BN254_Nogami, BN254_Snarks, BLS12_377, BLS12_381}: P.clearCofactorFast() else: P.clearCofactorReference()